[STATEMENT]
theorem (in TC2) compT_wt_instrs: "\<And>E T A ST.
  \<lbrakk> P,E \<turnstile>\<^sub>1 e :: T; \<D> e A; \ e (size E);
    size ST + max_stack e \<le> mxs; size E + max_vars e \<le> mxl \<rbrakk>
  \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (size ST) [::]
                 ty\<^sub>i' ST E A # compT E A ST e @ [after E A ST e]"
(*<*)(is "\<And>E T A ST. PROP ?P e E T A ST")(*>*)

and "\<And>E Ts A ST.
  \<lbrakk> P,E \<turnstile>\<^sub>1 es[::]Ts;  \<D>s es A; \s es (size E);
    size ST + max_stacks es \<le> mxs; size E + max_varss es \<le> mxl \<rbrakk>
  \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST es in
       \<turnstile> compEs\<^sub>2 es,compxEs\<^sub>2 es 0 (size ST) [::] \<tau>s \<and>
       last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s es)"
(*<*)
(is "\<And>E Ts A ST. PROP ?Ps es E Ts A ST")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 e :: T; \<D> e A; \ e (length E); length ST + max_stack e \<le> mxs; length E + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [after E A ST e]) &&& (\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 es [::] Ts; \<D>s es A; \s es (length E); length ST + max_stacks es \<le> mxs; length E + max_varss es \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST es in \<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s es))
[PROOF STEP]
proof(induct e and es rule: compxE\<^sub>2.induct compxEs\<^sub>2.induct)
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
case (TryCatch e\<^sub>1 C i e\<^sub>2)
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 try e\<^sub>1 catch(C i) e\<^sub>2 :: T
\<D> (try e\<^sub>1 catch(C i) e\<^sub>2) A
\ (try e\<^sub>1 catch(C i) e\<^sub>2) (length E)
length ST + max_stack (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxs
length E + max_vars (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxl

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
hence [simp]: "i = size E"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 try e\<^sub>1 catch(C i) e\<^sub>2 :: T
\<D> (try e\<^sub>1 catch(C i) e\<^sub>2) A
\ (try e\<^sub>1 catch(C i) e\<^sub>2) (length E)
length ST + max_stack (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxs
length E + max_vars (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxl

goal (1 subgoal):
 1. i = length E
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
i = length E

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have wt\<^sub>1: "P,E \<turnstile>\<^sub>1 e\<^sub>1 :: T" and wt\<^sub>2: "P,E@[Class C] \<turnstile>\<^sub>1 e\<^sub>2 :: T"
    and "class": "is_class P C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E \<turnstile>\<^sub>1 e\<^sub>1 :: T &&& P,E @ [Class C] \<turnstile>\<^sub>1 e\<^sub>2 :: T &&& is_class P C
[PROOF STEP]
using TryCatch
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 try e\<^sub>1 catch(C i) e\<^sub>2 :: T
\<D> (try e\<^sub>1 catch(C i) e\<^sub>2) A
\ (try e\<^sub>1 catch(C i) e\<^sub>2) (length E)
length ST + max_stack (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxs
length E + max_vars (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxl

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

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
let ?A\<^sub>1 = "A \<squnion> \ e\<^sub>1"
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
let ?A\<^sub>i = "A \<squnion> \<lfloor>{i}\<rfloor>"
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
let ?E\<^sub>i = "E @ [Class C]"
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
let ?\<tau> = "ty\<^sub>i' ST E A"
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
let ?\<tau>s\<^sub>1 = "compT E A ST e\<^sub>1"
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
let ?\<tau>\<^sub>1 = "ty\<^sub>i' (T#ST) E ?A\<^sub>1"
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
let ?\<tau>\<^sub>2 = "ty\<^sub>i' (Class C#ST) E A"
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
let ?\<tau>\<^sub>3 = "ty\<^sub>i' ST ?E\<^sub>i ?A\<^sub>i"
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
let ?\<tau>s\<^sub>2 = "compT ?E\<^sub>i ?A\<^sub>i ST e\<^sub>2"
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
let ?\<tau>\<^sub>2' = "ty\<^sub>i' (T#ST) ?E\<^sub>i (?A\<^sub>i \<squnion> \ e\<^sub>2)"
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
let ?\<tau>' = "ty\<^sub>i' (T#ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))"
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
let ?go = "Goto (int(size(compE\<^sub>2 e\<^sub>2)) + 2)"
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "PROP ?P e\<^sub>2 ?E\<^sub>i T ?A\<^sub>i ST"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P,E @ [Class C] \<turnstile>\<^sub>1 e\<^sub>2 :: T; \<D> e\<^sub>2 (A \<squnion> \<lfloor>{i}\<rfloor>); \ e\<^sub>2 (length (E @ [Class C])); length ST + max_stack e\<^sub>2 \<le> mxs; length (E @ [Class C]) + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [after (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2]
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,E @ [Class C] \<turnstile>\<^sub>1 e\<^sub>2 :: T; \<D> e\<^sub>2 (A \<squnion> \<lfloor>{i}\<rfloor>); \ e\<^sub>2 (length (E @ [Class C])); length ST + max_stack e\<^sub>2 \<le> mxs; length (E @ [Class C]) + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [after (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
hence "\<turnstile> compE\<^sub>2 e\<^sub>2,compxE\<^sub>2 e\<^sub>2 0 (size ST) [::] (?\<tau>\<^sub>3 # ?\<tau>s\<^sub>2) @ [?\<tau>\<^sub>2']"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,E @ [Class C] \<turnstile>\<^sub>1 e\<^sub>2 :: T; \<D> e\<^sub>2 (A \<squnion> \<lfloor>{i}\<rfloor>); \ e\<^sub>2 (length (E @ [Class C])); length ST + max_stack e\<^sub>2 \<le> mxs; length (E @ [Class C]) + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [after (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2]

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] (ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2) @ [ty\<^sub>i' (T # ST) (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor> \<squnion> \ e\<^sub>2)]
[PROOF STEP]
using TryCatch.prems
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,E @ [Class C] \<turnstile>\<^sub>1 e\<^sub>2 :: T; \<D> e\<^sub>2 (A \<squnion> \<lfloor>{i}\<rfloor>); \ e\<^sub>2 (length (E @ [Class C])); length ST + max_stack e\<^sub>2 \<le> mxs; length (E @ [Class C]) + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [after (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2]
P,E \<turnstile>\<^sub>1 try e\<^sub>1 catch(C i) e\<^sub>2 :: T
\<D> (try e\<^sub>1 catch(C i) e\<^sub>2) A
\ (try e\<^sub>1 catch(C i) e\<^sub>2) (length E)
length ST + max_stack (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxs
length E + max_vars (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxl

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] (ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2) @ [ty\<^sub>i' (T # ST) (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor> \<squnion> \ e\<^sub>2)]
[PROOF STEP]
by(auto simp:after_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] (ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2) @ [ty\<^sub>i' (T # ST) (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor> \<squnion> \ e\<^sub>2)]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] (ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2) @ [ty\<^sub>i' (T # ST) (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor> \<squnion> \ e\<^sub>2)]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "?A\<^sub>i \<squnion> \ e\<^sub>2 = (A \<squnion> \ e\<^sub>2) \<squnion> \<lfloor>{size E}\<rfloor>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<squnion> \<lfloor>{i}\<rfloor> \<squnion> \ e\<^sub>2 = A \<squnion> \ e\<^sub>2 \<squnion> \<lfloor>{length E}\<rfloor>
[PROOF STEP]
by(fastforce simp:hyperset_defs)
[PROOF STATE]
proof (state)
this:
A \<squnion> \<lfloor>{i}\<rfloor> \<squnion> \ e\<^sub>2 = A \<squnion> \ e\<^sub>2 \<squnion> \<lfloor>{length E}\<rfloor>

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
A \<squnion> \<lfloor>{i}\<rfloor> \<squnion> \ e\<^sub>2 = A \<squnion> \ e\<^sub>2 \<squnion> \<lfloor>{length E}\<rfloor>

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "P \<turnstile> ty\<^sub>i' (T#ST) ?E\<^sub>i \<dots> \<le>' ty\<^sub>i' (T#ST) E (A \<squnion> \ e\<^sub>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P \<turnstile> ty\<^sub>i' (T # ST) (E @ [Class C]) (A \<squnion> \ e\<^sub>2 \<squnion> \<lfloor>{length E}\<rfloor>) \<le>' ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>2)
[PROOF STEP]
by(simp add:hyperset_defs ty\<^sub>l_incr ty\<^sub>i'_def)
[PROOF STATE]
proof (state)
this:
P \<turnstile> ty\<^sub>i' (T # ST) (E @ [Class C]) (A \<squnion> \ e\<^sub>2 \<squnion> \<lfloor>{length E}\<rfloor>) \<le>' ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>2)

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
P \<turnstile> ty\<^sub>i' (T # ST) (E @ [Class C]) (A \<squnion> \ e\<^sub>2 \<squnion> \<lfloor>{length E}\<rfloor>) \<le>' ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>2)

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "P \<turnstile> \<dots> \<le>' ty\<^sub>i' (T#ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P \<turnstile> ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>2) \<le>' ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))
[PROOF STEP]
by(auto intro!: ty\<^sub>l_antimono simp:hyperset_defs ty\<^sub>i'_def)
[PROOF STATE]
proof (state)
this:
P \<turnstile> ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>2) \<le>' ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
P \<turnstile> ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>2) \<le>' ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "(?\<tau>\<^sub>3 # ?\<tau>s\<^sub>2) @ [?\<tau>'] = ?\<tau>\<^sub>3 # ?\<tau>s\<^sub>2 @ [?\<tau>']"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2) @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))] = ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2) @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))] = ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2) @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))] = ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "\<turnstile> [Store i],[] [::] ?\<tau>\<^sub>2 # [] @ [?\<tau>\<^sub>3]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> [Store i], [] [::] ty\<^sub>i' (Class C # ST) E A # [] @ [ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>)]
[PROOF STEP]
using TryCatch.prems
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 try e\<^sub>1 catch(C i) e\<^sub>2 :: T
\<D> (try e\<^sub>1 catch(C i) e\<^sub>2) A
\ (try e\<^sub>1 catch(C i) e\<^sub>2) (length E)
length ST + max_stack (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxs
length E + max_vars (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxl

goal (1 subgoal):
 1. \<turnstile> [Store i], [] [::] ty\<^sub>i' (Class C # ST) E A # [] @ [ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>)]
[PROOF STEP]
by(auto simp:nth_list_update wt_defs ty\<^sub>i'_def ty\<^sub>l_def
      list_all2_conv_all_nth hyperset_defs)
[PROOF STATE]
proof (state)
this:
\<turnstile> [Store i], [] [::] ty\<^sub>i' (Class C # ST) E A # [] @ [ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>)]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> [Store i], [] [::] ty\<^sub>i' (Class C # ST) E A # [] @ [ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>)]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "[] @ (?\<tau>\<^sub>3 # ?\<tau>s\<^sub>2 @ [?\<tau>']) = (?\<tau>\<^sub>3 # ?\<tau>s\<^sub>2 @ [?\<tau>'])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [] @ ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))] = ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
[] @ ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))] = ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
[] @ ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))] = ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "P,T\<^sub>r,mxs,size(compE\<^sub>2 e\<^sub>2)+3,[] \<turnstile> ?go,0 :: ?\<tau>\<^sub>1#?\<tau>\<^sub>2#?\<tau>\<^sub>3#?\<tau>s\<^sub>2 @ [?\<tau>']"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,T\<^sub>r,mxs,length (compE\<^sub>2 e\<^sub>2) + 3,[] \<turnstile> Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2),0 :: ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1) # ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]
[PROOF STEP]
using wt\<^sub>2
[PROOF STATE]
proof (prove)
using this:
P,E @ [Class C] \<turnstile>\<^sub>1 e\<^sub>2 :: T

goal (1 subgoal):
 1. P,T\<^sub>r,mxs,length (compE\<^sub>2 e\<^sub>2) + 3,[] \<turnstile> Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2),0 :: ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1) # ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]
[PROOF STEP]
by (auto simp: hyperset_defs ty\<^sub>i'_def wt_defs nth_Cons nat_add_distrib
      fun_of_def intro: ty\<^sub>l_antimono list_all2_refl split:nat.split)
[PROOF STATE]
proof (state)
this:
P,T\<^sub>r,mxs,length (compE\<^sub>2 e\<^sub>2) + 3,[] \<turnstile> Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2),0 :: ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1) # ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
P,T\<^sub>r,mxs,length (compE\<^sub>2 e\<^sub>2) + 3,[] \<turnstile> Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2),0 :: ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1) # ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "\<turnstile> compE\<^sub>2 e\<^sub>1,compxE\<^sub>2 e\<^sub>1 0 (size ST) [::] ?\<tau> # ?\<tau>s\<^sub>1 @ [?\<tau>\<^sub>1]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]
[PROOF STEP]
using TryCatch
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 try e\<^sub>1 catch(C i) e\<^sub>2 :: T
\<D> (try e\<^sub>1 catch(C i) e\<^sub>2) A
\ (try e\<^sub>1 catch(C i) e\<^sub>2) (length E)
length ST + max_stack (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxs
length E + max_vars (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxl

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]
[PROOF STEP]
by(auto simp:after_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "?\<tau> # ?\<tau>s\<^sub>1 @ ?\<tau>\<^sub>1 # ?\<tau>\<^sub>2 # ?\<tau>\<^sub>3 # ?\<tau>s\<^sub>2 @ [?\<tau>'] =
             (?\<tau> # ?\<tau>s\<^sub>1 @ [?\<tau>\<^sub>1]) @ ?\<tau>\<^sub>2 # ?\<tau>\<^sub>3 # ?\<tau>s\<^sub>2 @ [?\<tau>']"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1) # ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))] = (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]) @ ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1) # ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))] = (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]) @ ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1) # ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))] = (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]) @ ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "compE\<^sub>2 e\<^sub>1 @ ?go  # [Store i] @ compE\<^sub>2 e\<^sub>2 =
             (compE\<^sub>2 e\<^sub>1 @ [?go]) @ (Store i # compE\<^sub>2 e\<^sub>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compE\<^sub>2 e\<^sub>1 @ Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2) # [Store i] @ compE\<^sub>2 e\<^sub>2 = (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]) @ Store i # compE\<^sub>2 e\<^sub>2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
compE\<^sub>2 e\<^sub>1 @ Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2) # [Store i] @ compE\<^sub>2 e\<^sub>2 = (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]) @ Store i # compE\<^sub>2 e\<^sub>2

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
compE\<^sub>2 e\<^sub>1 @ Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2) # [Store i] @ compE\<^sub>2 e\<^sub>2 = (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]) @ Store i # compE\<^sub>2 e\<^sub>2

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
let "?Q \<tau>" = "\<forall>ST' LT'. \<tau> = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow>
    size ST \<le> size ST' \<and> P \<turnstile> Some (drop (size ST' - size ST) ST',LT') \<le>' ty\<^sub>i' ST E A"
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "?Q (ty\<^sub>i' ST E A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>ST' LT'. ty\<^sub>i' ST E A = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A
[PROOF STEP]
by (clarsimp simp add: ty\<^sub>i'_def)
[PROOF STATE]
proof (state)
this:
\<forall>ST' LT'. ty\<^sub>i' ST E A = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>ST' LT'. ty\<^sub>i' ST E A = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "?Q (ty\<^sub>i' (T # ST) E ?A\<^sub>1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>ST' LT'. ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1) = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A
[PROOF STEP]
by (fastforce simp add: ty\<^sub>i'_def hyperset_defs intro!: ty\<^sub>l_antimono)
[PROOF STATE]
proof (state)
this:
\<forall>ST' LT'. ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1) = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>ST' LT'. ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1) = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
have "\<And>\<tau>. \<tau> \<in> set (compT E A ST e\<^sub>1) \<Longrightarrow> ?Q \<tau>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>\<tau>. \<tau> \<in> set (compT E A ST e\<^sub>1) \<Longrightarrow> \<forall>ST' LT'. \<tau> = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A
[PROOF STEP]
using TryCatch.prems
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 try e\<^sub>1 catch(C i) e\<^sub>2 :: T
\<D> (try e\<^sub>1 catch(C i) e\<^sub>2) A
\ (try e\<^sub>1 catch(C i) e\<^sub>2) (length E)
length ST + max_stack (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxs
length E + max_vars (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxl

goal (1 subgoal):
 1. \<And>\<tau>. \<tau> \<in> set (compT E A ST e\<^sub>1) \<Longrightarrow> \<forall>ST' LT'. \<tau> = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A
[PROOF STEP]
by clarsimp (frule compT_ST_prefix,
                   fastforce dest!: compT_LT_prefix simp add: ty\<^sub>i'_def)
[PROOF STATE]
proof (state)
this:
?\<tau>2 \<in> set (compT E A ST e\<^sub>1) \<Longrightarrow> \<forall>ST' LT'. ?\<tau>2 = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>ST' LT'. ty\<^sub>i' ST E A = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A
\<forall>ST' LT'. ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1) = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A
?\<tau>2 \<in> set (compT E A ST e\<^sub>1) \<Longrightarrow> \<forall>ST' LT'. ?\<tau>2 = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A
[PROOF STEP]
have "\<forall>\<tau>\<in>set (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E ?A\<^sub>1]). ?Q \<tau>"
[PROOF STATE]
proof (prove)
using this:
\<forall>ST' LT'. ty\<^sub>i' ST E A = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A
\<forall>ST' LT'. ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1) = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A
?\<tau>2 \<in> set (compT E A ST e\<^sub>1) \<Longrightarrow> \<forall>ST' LT'. ?\<tau>2 = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A

goal (1 subgoal):
 1. \<forall>\<tau>\<in>set (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]). \<forall>ST' LT'. \<tau> = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>\<tau>\<in>set (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]). \<forall>ST' LT'. \<tau> = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<forall>\<tau>\<in>set (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]). \<forall>ST' LT'. \<tau> = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<forall>\<tau>\<in>set (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]). \<forall>ST' LT'. \<tau> = \<lfloor>(ST', LT')\<rfloor> \<longrightarrow> length ST \<le> length ST' \<and> P \<turnstile> \<lfloor>(drop (length ST' - length ST) ST', LT')\<rfloor> \<le>' ty\<^sub>i' ST E A

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
from TryCatch.prems max_stack1[OF wt\<^sub>1]
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile>\<^sub>1 try e\<^sub>1 catch(C i) e\<^sub>2 :: T
\<D> (try e\<^sub>1 catch(C i) e\<^sub>2) A
\ (try e\<^sub>1 catch(C i) e\<^sub>2) (length E)
length ST + max_stack (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxs
length E + max_vars (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxl
1 \<le> max_stack e\<^sub>1
[PROOF STEP]
have "size ST + 1 \<le> mxs"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 try e\<^sub>1 catch(C i) e\<^sub>2 :: T
\<D> (try e\<^sub>1 catch(C i) e\<^sub>2) A
\ (try e\<^sub>1 catch(C i) e\<^sub>2) (length E)
length ST + max_stack (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxs
length E + max_vars (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxl
1 \<le> max_stack e\<^sub>1

goal (1 subgoal):
 1. length ST + 1 \<le> mxs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
length ST + 1 \<le> mxs

goal (22 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 22 subgoals...
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>length [] + 1 = length [Store i]; length (compE\<^sub>2 e\<^sub>2) + 3 = length (ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]) + 1; length (compT E A ST e\<^sub>1) + 1 = length (compE\<^sub>2 e\<^sub>1); length (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]) = length (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]); is_class P C; length ST < mxs\<rbrakk> \<Longrightarrow> \<turnstile> (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]) @ Store i # compE\<^sub>2 e\<^sub>2, (compxE\<^sub>2 e\<^sub>1 0 (length ST) @ shift (length (compE\<^sub>2 e\<^sub>1)) (shift 1 ([] @ shift (length [Store i]) (compxE\<^sub>2 e\<^sub>2 0 (length ST))))) @ [(0, length (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]) - 1, C, length (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]), length ST)] [::] (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]) @ ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]
length ST + 1 \<le> mxs
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>length [] + 1 = length [Store i]; length (compE\<^sub>2 e\<^sub>2) + 3 = length (ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]) + 1; length (compT E A ST e\<^sub>1) + 1 = length (compE\<^sub>2 e\<^sub>1); length (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]) = length (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]); is_class P C; length ST < mxs\<rbrakk> \<Longrightarrow> \<turnstile> (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]) @ Store i # compE\<^sub>2 e\<^sub>2, (compxE\<^sub>2 e\<^sub>1 0 (length ST) @ shift (length (compE\<^sub>2 e\<^sub>1)) (shift 1 ([] @ shift (length [Store i]) (compxE\<^sub>2 e\<^sub>2 0 (length ST))))) @ [(0, length (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]) - 1, C, length (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]), length ST)] [::] (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]) @ ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]
length ST + 1 \<le> mxs

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (try e\<^sub>1 catch(C i) e\<^sub>2), compxE\<^sub>2 (try e\<^sub>1 catch(C i) e\<^sub>2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (try e\<^sub>1 catch(C i) e\<^sub>2) @ [after E A ST (try e\<^sub>1 catch(C i) e\<^sub>2)]
[PROOF STEP]
using wt\<^sub>1 wt\<^sub>2 TryCatch.prems "class"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>length [] + 1 = length [Store i]; length (compE\<^sub>2 e\<^sub>2) + 3 = length (ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]) + 1; length (compT E A ST e\<^sub>1) + 1 = length (compE\<^sub>2 e\<^sub>1); length (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]) = length (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]); is_class P C; length ST < mxs\<rbrakk> \<Longrightarrow> \<turnstile> (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]) @ Store i # compE\<^sub>2 e\<^sub>2, (compxE\<^sub>2 e\<^sub>1 0 (length ST) @ shift (length (compE\<^sub>2 e\<^sub>1)) (shift 1 ([] @ shift (length [Store i]) (compxE\<^sub>2 e\<^sub>2 0 (length ST))))) @ [(0, length (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]) - 1, C, length (compE\<^sub>2 e\<^sub>1 @ [Goto (int (length (compE\<^sub>2 e\<^sub>2)) + 2)]), length ST)] [::] (ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1)]) @ ty\<^sub>i' (Class C # ST) E A # ty\<^sub>i' ST (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) # compT (E @ [Class C]) (A \<squnion> \<lfloor>{i}\<rfloor>) ST e\<^sub>2 @ [ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<sqinter> (\ e\<^sub>2 \<ominus> i))]
length ST + 1 \<le> mxs
P,E \<turnstile>\<^sub>1 e\<^sub>1 :: T
P,E @ [Class C] \<turnstile>\<^sub>1 e\<^sub>2 :: T
P,E \<turnstile>\<^sub>1 try e\<^sub>1 catch(C i) e\<^sub>2 :: T
\<D> (try e\<^sub>1 catch(C i) e\<^sub>2) A
\ (try e\<^sub>1 catch(C i) e\<^sub>2) (length E)
length ST + max_stack (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxs
length E + max_vars (try e\<^sub>1 catch(C i) e\<^sub>2) \<le> mxl
is_class P C

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (try e\<^sub>1 catch(C i) e\<^sub>2), compxE\<^sub>2 (try e\<^sub>1 catch(C i) e\<^sub>2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (try e\<^sub>1 catch(C i) e\<^sub>2) @ [after E A ST (try e\<^sub>1 catch(C i) e\<^sub>2)]
[PROOF STEP]
by (simp add:after_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 (try e\<^sub>1 catch(C i) e\<^sub>2), compxE\<^sub>2 (try e\<^sub>1 catch(C i) e\<^sub>2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (try e\<^sub>1 catch(C i) e\<^sub>2) @ [after E A ST (try e\<^sub>1 catch(C i) e\<^sub>2)]

goal (21 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 21 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (21 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 21 subgoals...
[PROOF STEP]
case new
[PROOF STATE]
proof (state)
this:
P,E \<turnstile>\<^sub>1 new x_ :: T
\<D> (new x_) A
\ (new x_) (length E)
length ST + max_stack (new x_) \<le> mxs
length E + max_vars (new x_) \<le> mxl

goal (21 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 new x :: T; \<D> (new x) A; \ (new x) (length E); length ST + max_stack (new x) \<le> mxs; length E + max_vars (new x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (new x), compxE\<^sub>2 (new x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x) @ [after E A ST (new x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 5. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
A total of 21 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 new x_ :: T
\<D> (new x_) A
\ (new x_) (length E)
length ST + max_stack (new x_) \<le> mxs
length E + max_vars (new x_) \<le> mxl

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (new x_), compxE\<^sub>2 (new x_) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x_) @ [after E A ST (new x_)]
[PROOF STEP]
by(auto simp add:after_def wt_New)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 (new x_), compxE\<^sub>2 (new x_) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (new x_) @ [after E A ST (new x_)]

goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
case (BinOp e\<^sub>1 bop e\<^sub>2)
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2 :: T
\<D> (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) A
\ (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) (length E)
length ST + max_stack (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) \<le> mxs
length E + max_vars (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) \<le> mxl

goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
let ?op = "case bop of Eq \<Rightarrow> [CmpEq] | Add \<Rightarrow> [IAdd]"
[PROOF STATE]
proof (state)
goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
have T: "P,E \<turnstile>\<^sub>1 e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2 :: T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E \<turnstile>\<^sub>1 e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2 :: T
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
P,E \<turnstile>\<^sub>1 e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2 :: T

goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile>\<^sub>1 e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2 :: T
[PROOF STEP]
obtain T\<^sub>1 T\<^sub>2 where T\<^sub>1: "P,E \<turnstile>\<^sub>1 e\<^sub>1 :: T\<^sub>1" and T\<^sub>2: "P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2" and
    bopT: "case bop of Eq \<Rightarrow> (P \<turnstile> T\<^sub>1 \<le> T\<^sub>2 \<or> P \<turnstile> T\<^sub>2 \<le> T\<^sub>1) \<and> T = Boolean
                    | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2 :: T

goal (1 subgoal):
 1. (\<And>T\<^sub>1 T\<^sub>2. \<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>1 :: T\<^sub>1; P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2; case bop of Eq \<Rightarrow> (subtype P T\<^sub>1 T\<^sub>2 \<or> subtype P T\<^sub>2 T\<^sub>1) \<and> 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 \<turnstile>\<^sub>1 e\<^sub>1 :: T\<^sub>1
P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2
case bop of Eq \<Rightarrow> (subtype P T\<^sub>1 T\<^sub>2 \<or> subtype P T\<^sub>2 T\<^sub>1) \<and> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer

goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
let ?A\<^sub>1 = "A \<squnion> \ e\<^sub>1"
[PROOF STATE]
proof (state)
goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
let ?A\<^sub>2 = "?A\<^sub>1 \<squnion> \ e\<^sub>2"
[PROOF STATE]
proof (state)
goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
let ?\<tau> = "ty\<^sub>i' ST E A"
[PROOF STATE]
proof (state)
goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
let ?\<tau>s\<^sub>1 = "compT E A ST e\<^sub>1"
[PROOF STATE]
proof (state)
goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
let ?\<tau>\<^sub>1 = "ty\<^sub>i' (T\<^sub>1#ST) E ?A\<^sub>1"
[PROOF STATE]
proof (state)
goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
let ?\<tau>s\<^sub>2 = "compT E ?A\<^sub>1 (T\<^sub>1#ST) e\<^sub>2"
[PROOF STATE]
proof (state)
goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
let ?\<tau>\<^sub>2 = "ty\<^sub>i' (T\<^sub>2#T\<^sub>1#ST) E ?A\<^sub>2"
[PROOF STATE]
proof (state)
goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
let ?\<tau>' = "ty\<^sub>i' (T#ST) E ?A\<^sub>2"
[PROOF STATE]
proof (state)
goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
from bopT
[PROOF STATE]
proof (chain)
picking this:
case bop of Eq \<Rightarrow> (subtype P T\<^sub>1 T\<^sub>2 \<or> subtype P T\<^sub>2 T\<^sub>1) \<and> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
[PROOF STEP]
have "\<turnstile> ?op,[] [::] [?\<tau>\<^sub>2,?\<tau>']"
[PROOF STATE]
proof (prove)
using this:
case bop of Eq \<Rightarrow> (subtype P T\<^sub>1 T\<^sub>2 \<or> subtype P T\<^sub>2 T\<^sub>1) \<and> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer

goal (1 subgoal):
 1. \<turnstile> case bop of Eq \<Rightarrow> [CmpEq] | Add \<Rightarrow> [IAdd], [] [::] [ty\<^sub>i' (T\<^sub>2 # T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]
[PROOF STEP]
by (cases bop) (auto simp add: wt_CmpEq wt_IAdd)
[PROOF STATE]
proof (state)
this:
\<turnstile> case bop of Eq \<Rightarrow> [CmpEq] | Add \<Rightarrow> [IAdd], [] [::] [ty\<^sub>i' (T\<^sub>2 # T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]

goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> case bop of Eq \<Rightarrow> [CmpEq] | Add \<Rightarrow> [IAdd], [] [::] [ty\<^sub>i' (T\<^sub>2 # T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]

goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
have "PROP ?P e\<^sub>2 E T\<^sub>2 ?A\<^sub>1 (T\<^sub>1#ST)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2; \<D> e\<^sub>2 (A \<squnion> \ e\<^sub>1); \ e\<^sub>2 (length E); length (T\<^sub>1 # ST) + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length (T\<^sub>1 # ST)) [::] ty\<^sub>i' (T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2 @ [after E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2]
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2; \<D> e\<^sub>2 (A \<squnion> \ e\<^sub>1); \ e\<^sub>2 (length E); length (T\<^sub>1 # ST) + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length (T\<^sub>1 # ST)) [::] ty\<^sub>i' (T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2 @ [after E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2]

goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
with BinOp.prems T\<^sub>2
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile>\<^sub>1 e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2 :: T
\<D> (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) A
\ (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) (length E)
length ST + max_stack (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) \<le> mxs
length E + max_vars (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) \<le> mxl
P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2
\<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2; \<D> e\<^sub>2 (A \<squnion> \ e\<^sub>1); \ e\<^sub>2 (length E); length (T\<^sub>1 # ST) + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length (T\<^sub>1 # ST)) [::] ty\<^sub>i' (T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2 @ [after E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2]
[PROOF STEP]
have "\<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (size (T\<^sub>1#ST)) [::] ?\<tau>\<^sub>1#?\<tau>s\<^sub>2@[?\<tau>\<^sub>2]"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2 :: T
\<D> (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) A
\ (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) (length E)
length ST + max_stack (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) \<le> mxs
length E + max_vars (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) \<le> mxl
P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2
\<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2; \<D> e\<^sub>2 (A \<squnion> \ e\<^sub>1); \ e\<^sub>2 (length E); length (T\<^sub>1 # ST) + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length (T\<^sub>1 # ST)) [::] ty\<^sub>i' (T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2 @ [after E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2]

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length (T\<^sub>1 # ST)) [::] ty\<^sub>i' (T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2 @ [ty\<^sub>i' (T\<^sub>2 # T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]
[PROOF STEP]
by (auto simp: after_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length (T\<^sub>1 # ST)) [::] ty\<^sub>i' (T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2 @ [ty\<^sub>i' (T\<^sub>2 # T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]

goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length (T\<^sub>1 # ST)) [::] ty\<^sub>i' (T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2 @ [ty\<^sub>i' (T\<^sub>2 # T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]

goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
from BinOp T\<^sub>1
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2 :: T
\<D> (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) A
\ (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) (length E)
length ST + max_stack (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) \<le> mxs
length E + max_vars (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) \<le> mxl
P,E \<turnstile>\<^sub>1 e\<^sub>1 :: T\<^sub>1
[PROOF STEP]
have "\<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (size ST) [::] ?\<tau>#?\<tau>s\<^sub>1@[?\<tau>\<^sub>1]"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2 :: T
\<D> (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) A
\ (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) (length E)
length ST + max_stack (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) \<le> mxs
length E + max_vars (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) \<le> mxl
P,E \<turnstile>\<^sub>1 e\<^sub>1 :: T\<^sub>1

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1)]
[PROOF STEP]
by (auto simp: after_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1)]

goal (20 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 x1 \<guillemotleft>x2\<guillemotright> x3 :: T; \<D> (x1 \<guillemotleft>x2\<guillemotright> x3) A; \ (x1 \<guillemotleft>x2\<guillemotright> x3) (length E); length ST + max_stack (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxs; length E + max_vars (x1 \<guillemotleft>x2\<guillemotright> x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3), compxE\<^sub>2 (x1 \<guillemotleft>x2\<guillemotright> x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1 \<guillemotleft>x2\<guillemotright> x3) @ [after E A ST (x1 \<guillemotleft>x2\<guillemotright> x3)]
 4. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
A total of 20 subgoals...
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>length (compT E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2) + 1 = length (compE\<^sub>2 e\<^sub>2); length (compT E A ST e\<^sub>1) + 1 = length (compE\<^sub>2 e\<^sub>1)\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1 @ compE\<^sub>2 e\<^sub>2 @ (case bop of Eq \<Rightarrow> [CmpEq] | Add \<Rightarrow> [IAdd]), compxE\<^sub>2 e\<^sub>1 0 (length ST) @ shift (length (compE\<^sub>2 e\<^sub>1)) (compxE\<^sub>2 e\<^sub>2 0 (length (T\<^sub>1 # ST)) @ shift (length (compE\<^sub>2 e\<^sub>2)) []) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ ty\<^sub>i' (T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2 @ [ty\<^sub>i' (T\<^sub>2 # T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>length (compT E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2) + 1 = length (compE\<^sub>2 e\<^sub>2); length (compT E A ST e\<^sub>1) + 1 = length (compE\<^sub>2 e\<^sub>1)\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1 @ compE\<^sub>2 e\<^sub>2 @ (case bop of Eq \<Rightarrow> [CmpEq] | Add \<Rightarrow> [IAdd]), compxE\<^sub>2 e\<^sub>1 0 (length ST) @ shift (length (compE\<^sub>2 e\<^sub>1)) (compxE\<^sub>2 e\<^sub>2 0 (length (T\<^sub>1 # ST)) @ shift (length (compE\<^sub>2 e\<^sub>2)) []) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ ty\<^sub>i' (T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2 @ [ty\<^sub>i' (T\<^sub>2 # T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2), compxE\<^sub>2 (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) @ [after E A ST (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2)]
[PROOF STEP]
using T T\<^sub>1 T\<^sub>2
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>length (compT E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2) + 1 = length (compE\<^sub>2 e\<^sub>2); length (compT E A ST e\<^sub>1) + 1 = length (compE\<^sub>2 e\<^sub>1)\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1 @ compE\<^sub>2 e\<^sub>2 @ (case bop of Eq \<Rightarrow> [CmpEq] | Add \<Rightarrow> [IAdd]), compxE\<^sub>2 e\<^sub>1 0 (length ST) @ shift (length (compE\<^sub>2 e\<^sub>1)) (compxE\<^sub>2 e\<^sub>2 0 (length (T\<^sub>1 # ST)) @ shift (length (compE\<^sub>2 e\<^sub>2)) []) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ ty\<^sub>i' (T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (T\<^sub>1 # ST) e\<^sub>2 @ [ty\<^sub>i' (T\<^sub>2 # T\<^sub>1 # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' (T # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]
P,E \<turnstile>\<^sub>1 e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2 :: T
P,E \<turnstile>\<^sub>1 e\<^sub>1 :: T\<^sub>1
P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2), compxE\<^sub>2 (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) @ [after E A ST (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2)]
[PROOF STEP]
by (simp add: after_def hyperUn_assoc)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2), compxE\<^sub>2 (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2) @ [after E A ST (e\<^sub>1 \<guillemotleft>bop\<guillemotright> e\<^sub>2)]

goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
case (Cons_exp e es)
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 es [::] ?Ts2; \<D>s es ?A2; \s es (length ?E2); length ?ST2 + max_stacks es \<le> mxs; length ?E2 + max_varss es \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ?ST2 ?E2 ?A2 # compTs ?E2 ?A2 ?ST2 es in \<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length ?ST2) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev ?Ts2 @ ?ST2) ?E2 (?A2 \<squnion> \s es)
P,E \<turnstile>\<^sub>1 e # es [::] Ts
\<D>s (e # es) A
\s (e # es) (length E)
length ST + max_stacks (e # es) \<le> mxs
length E + max_varss (e # es) \<le> mxl

goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
have "P,E \<turnstile>\<^sub>1 e # es [::] Ts"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E \<turnstile>\<^sub>1 e # es [::] Ts
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
P,E \<turnstile>\<^sub>1 e # es [::] Ts

goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile>\<^sub>1 e # es [::] Ts
[PROOF STEP]
obtain T\<^sub>e Ts' where
    T\<^sub>e: "P,E \<turnstile>\<^sub>1 e :: T\<^sub>e" and Ts': "P,E \<turnstile>\<^sub>1 es [::] Ts'" and
    Ts: "Ts = T\<^sub>e#Ts'"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 e # es [::] Ts

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

goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
let ?A\<^sub>e = "A \<squnion> \ e"
[PROOF STATE]
proof (state)
goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
let ?\<tau> = "ty\<^sub>i' ST E A"
[PROOF STATE]
proof (state)
goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
let ?\<tau>s\<^sub>e = "compT E A ST e"
[PROOF STATE]
proof (state)
goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
let ?\<tau>\<^sub>e = "ty\<^sub>i' (T\<^sub>e#ST) E ?A\<^sub>e"
[PROOF STATE]
proof (state)
goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
let ?\<tau>s' = "compTs E ?A\<^sub>e (T\<^sub>e#ST) es"
[PROOF STATE]
proof (state)
goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
let ?\<tau>s = "?\<tau> # ?\<tau>s\<^sub>e @ (?\<tau>\<^sub>e # ?\<tau>s')"
[PROOF STATE]
proof (state)
goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
have Ps: "PROP ?Ps es E Ts' ?A\<^sub>e (T\<^sub>e#ST)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P,E \<turnstile>\<^sub>1 es [::] Ts'; \<D>s es (A \<squnion> \ e); \s es (length E); length (T\<^sub>e # ST) + max_stacks es \<le> mxs; length E + max_varss es \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es in \<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length (T\<^sub>e # ST)) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts' @ T\<^sub>e # ST) E (A \<squnion> \ e \<squnion> \s es)
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,E \<turnstile>\<^sub>1 es [::] Ts'; \<D>s es (A \<squnion> \ e); \s es (length E); length (T\<^sub>e # ST) + max_stacks es \<le> mxs; length E + max_varss es \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es in \<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length (T\<^sub>e # ST)) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts' @ T\<^sub>e # ST) E (A \<squnion> \ e \<squnion> \s es)

goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
with Cons_exp.prems T\<^sub>e Ts'
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile>\<^sub>1 e # es [::] Ts
\<D>s (e # es) A
\s (e # es) (length E)
length ST + max_stacks (e # es) \<le> mxs
length E + max_varss (e # es) \<le> mxl
P,E \<turnstile>\<^sub>1 e :: T\<^sub>e
P,E \<turnstile>\<^sub>1 es [::] Ts'
\<lbrakk>P,E \<turnstile>\<^sub>1 es [::] Ts'; \<D>s es (A \<squnion> \ e); \s es (length E); length (T\<^sub>e # ST) + max_stacks es \<le> mxs; length E + max_varss es \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es in \<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length (T\<^sub>e # ST)) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts' @ T\<^sub>e # ST) E (A \<squnion> \ e \<squnion> \s es)
[PROOF STEP]
have "\<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (size (T\<^sub>e#ST)) [::] ?\<tau>\<^sub>e#?\<tau>s'"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 e # es [::] Ts
\<D>s (e # es) A
\s (e # es) (length E)
length ST + max_stacks (e # es) \<le> mxs
length E + max_varss (e # es) \<le> mxl
P,E \<turnstile>\<^sub>1 e :: T\<^sub>e
P,E \<turnstile>\<^sub>1 es [::] Ts'
\<lbrakk>P,E \<turnstile>\<^sub>1 es [::] Ts'; \<D>s es (A \<squnion> \ e); \s es (length E); length (T\<^sub>e # ST) + max_stacks es \<le> mxs; length E + max_varss es \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es in \<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length (T\<^sub>e # ST)) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts' @ T\<^sub>e # ST) E (A \<squnion> \ e \<squnion> \s es)

goal (1 subgoal):
 1. \<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length (T\<^sub>e # ST)) [::] ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es
[PROOF STEP]
by (simp add: after_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length (T\<^sub>e # ST)) [::] ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es

goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length (T\<^sub>e # ST)) [::] ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es

goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
from Cons_exp T\<^sub>e
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 es [::] ?Ts2; \<D>s es ?A2; \s es (length ?E2); length ?ST2 + max_stacks es \<le> mxs; length ?E2 + max_varss es \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ?ST2 ?E2 ?A2 # compTs ?E2 ?A2 ?ST2 es in \<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length ?ST2) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev ?Ts2 @ ?ST2) ?E2 (?A2 \<squnion> \s es)
P,E \<turnstile>\<^sub>1 e # es [::] Ts
\<D>s (e # es) A
\s (e # es) (length E)
length ST + max_stacks (e # es) \<le> mxs
length E + max_varss (e # es) \<le> mxl
P,E \<turnstile>\<^sub>1 e :: T\<^sub>e
[PROOF STEP]
have "\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (size ST) [::] ?\<tau>#?\<tau>s\<^sub>e@[?\<tau>\<^sub>e]"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 es [::] ?Ts2; \<D>s es ?A2; \s es (length ?E2); length ?ST2 + max_stacks es \<le> mxs; length ?E2 + max_varss es \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ?ST2 ?E2 ?A2 # compTs ?E2 ?A2 ?ST2 es in \<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length ?ST2) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev ?Ts2 @ ?ST2) ?E2 (?A2 \<squnion> \s es)
P,E \<turnstile>\<^sub>1 e # es [::] Ts
\<D>s (e # es) A
\s (e # es) (length E)
length ST + max_stacks (e # es) \<le> mxs
length E + max_varss (e # es) \<le> mxl
P,E \<turnstile>\<^sub>1 e :: T\<^sub>e

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e)]
[PROOF STEP]
by (auto simp: after_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e)]

goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e)]

goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
from Ps Cons_exp.prems T\<^sub>e Ts' Ts
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>P,E \<turnstile>\<^sub>1 es [::] Ts'; \<D>s es (A \<squnion> \ e); \s es (length E); length (T\<^sub>e # ST) + max_stacks es \<le> mxs; length E + max_varss es \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es in \<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length (T\<^sub>e # ST)) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts' @ T\<^sub>e # ST) E (A \<squnion> \ e \<squnion> \s es)
P,E \<turnstile>\<^sub>1 e # es [::] Ts
\<D>s (e # es) A
\s (e # es) (length E)
length ST + max_stacks (e # es) \<le> mxs
length E + max_varss (e # es) \<le> mxl
P,E \<turnstile>\<^sub>1 e :: T\<^sub>e
P,E \<turnstile>\<^sub>1 es [::] Ts'
Ts = T\<^sub>e # Ts'
[PROOF STEP]
have "last ?\<tau>s = ty\<^sub>i' (rev Ts@ST) E (?A\<^sub>e \<squnion> \s es)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,E \<turnstile>\<^sub>1 es [::] Ts'; \<D>s es (A \<squnion> \ e); \s es (length E); length (T\<^sub>e # ST) + max_stacks es \<le> mxs; length E + max_varss es \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es in \<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length (T\<^sub>e # ST)) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts' @ T\<^sub>e # ST) E (A \<squnion> \ e \<squnion> \s es)
P,E \<turnstile>\<^sub>1 e # es [::] Ts
\<D>s (e # es) A
\s (e # es) (length E)
length ST + max_stacks (e # es) \<le> mxs
length E + max_varss (e # es) \<le> mxl
P,E \<turnstile>\<^sub>1 e :: T\<^sub>e
P,E \<turnstile>\<^sub>1 es [::] Ts'
Ts = T\<^sub>e # Ts'

goal (1 subgoal):
 1. last (ty\<^sub>i' ST E A # compT E A ST e @ ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es) = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \ e \<squnion> \s es)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
last (ty\<^sub>i' ST E A # compT E A ST e @ ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es) = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \ e \<squnion> \s es)

goal (19 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 19 subgoals...
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length (T\<^sub>e # ST)) [::] ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es
\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e)]
last (ty\<^sub>i' ST E A # compT E A ST e @ ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es) = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \ e \<squnion> \s es)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length (T\<^sub>e # ST)) [::] ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es
\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e)]
last (ty\<^sub>i' ST E A # compT E A ST e @ ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es) = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \ e \<squnion> \s es)

goal (1 subgoal):
 1. let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST (e # es) in \<turnstile> compEs\<^sub>2 (e # es), compxEs\<^sub>2 (e # es) 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s (e # es))
[PROOF STEP]
using T\<^sub>e
[PROOF STATE]
proof (prove)
using this:
\<turnstile> compEs\<^sub>2 es, compxEs\<^sub>2 es 0 (length (T\<^sub>e # ST)) [::] ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es
\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e)]
last (ty\<^sub>i' ST E A # compT E A ST e @ ty\<^sub>i' (T\<^sub>e # ST) E (A \<squnion> \ e) # compTs E (A \<squnion> \ e) (T\<^sub>e # ST) es) = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \ e \<squnion> \s es)
P,E \<turnstile>\<^sub>1 e :: T\<^sub>e

goal (1 subgoal):
 1. let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST (e # es) in \<turnstile> compEs\<^sub>2 (e # es), compxEs\<^sub>2 (e # es) 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s (e # es))
[PROOF STEP]
by (simp add: after_def hyperUn_assoc)
[PROOF STATE]
proof (state)
this:
let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST (e # es) in \<turnstile> compEs\<^sub>2 (e # es), compxEs\<^sub>2 (e # es) 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s (e # es))

goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
case (FAss e\<^sub>1 F D e\<^sub>2)
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: T
\<D> (e\<^sub>1\<bullet>F{D} := e\<^sub>2) A
\ (e\<^sub>1\<bullet>F{D} := e\<^sub>2) (length E)
length ST + max_stack (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxs
length E + max_vars (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxl

goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
hence Void: "P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: Void"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: T
\<D> (e\<^sub>1\<bullet>F{D} := e\<^sub>2) A
\ (e\<^sub>1\<bullet>F{D} := e\<^sub>2) (length E)
length ST + max_stack (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxs
length E + max_vars (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxl

goal (1 subgoal):
 1. P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: Void
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: Void

goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: Void
[PROOF STEP]
obtain C T T' where
    C: "P,E \<turnstile>\<^sub>1 e\<^sub>1 :: Class C" and sees: "P \<turnstile> C sees F,NonStatic:T in D" and
    T': "P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'" and T'_T: "P \<turnstile> T' \<le> T"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: Void

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

goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
let ?A\<^sub>1 = "A \<squnion> \ e\<^sub>1"
[PROOF STATE]
proof (state)
goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
let ?A\<^sub>2 = "?A\<^sub>1 \<squnion> \ e\<^sub>2"
[PROOF STATE]
proof (state)
goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
let ?\<tau> = "ty\<^sub>i' ST E A"
[PROOF STATE]
proof (state)
goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
let ?\<tau>s\<^sub>1 = "compT E A ST e\<^sub>1"
[PROOF STATE]
proof (state)
goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
let ?\<tau>\<^sub>1 = "ty\<^sub>i' (Class C#ST) E ?A\<^sub>1"
[PROOF STATE]
proof (state)
goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
let ?\<tau>s\<^sub>2 = "compT E ?A\<^sub>1 (Class C#ST) e\<^sub>2"
[PROOF STATE]
proof (state)
goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
let ?\<tau>\<^sub>2 = "ty\<^sub>i' (T'#Class C#ST) E ?A\<^sub>2"
[PROOF STATE]
proof (state)
goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
let ?\<tau>\<^sub>3 = "ty\<^sub>i' ST E ?A\<^sub>2"
[PROOF STATE]
proof (state)
goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
let ?\<tau>' = "ty\<^sub>i' (Void#ST) E ?A\<^sub>2"
[PROOF STATE]
proof (state)
goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
from FAss.prems sees T'_T
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: T__
\<D> (e\<^sub>1\<bullet>F{D} := e\<^sub>2) A
\ (e\<^sub>1\<bullet>F{D} := e\<^sub>2) (length E)
length ST + max_stack (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxs
length E + max_vars (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxl
P \<turnstile> C sees F,NonStatic:T in D
subtype P T' T
[PROOF STEP]
have "\<turnstile> [Putfield F D,Push Unit],[] [::] [?\<tau>\<^sub>2,?\<tau>\<^sub>3,?\<tau>']"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: T__
\<D> (e\<^sub>1\<bullet>F{D} := e\<^sub>2) A
\ (e\<^sub>1\<bullet>F{D} := e\<^sub>2) (length E)
length ST + max_stack (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxs
length E + max_vars (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxl
P \<turnstile> C sees F,NonStatic:T in D
subtype P T' T

goal (1 subgoal):
 1. \<turnstile> [Putfield F D, Push Unit], [] [::] [ty\<^sub>i' (T' # Class C # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' ST E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]
[PROOF STEP]
by (fastforce simp add: wt_Push wt_Put)
[PROOF STATE]
proof (state)
this:
\<turnstile> [Putfield F D, Push Unit], [] [::] [ty\<^sub>i' (T' # Class C # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' ST E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]

goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> [Putfield F D, Push Unit], [] [::] [ty\<^sub>i' (T' # Class C # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' ST E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]

goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
have "PROP ?P e\<^sub>2 E T' ?A\<^sub>1 (Class C#ST)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'; \<D> e\<^sub>2 (A \<squnion> \ e\<^sub>1); \ e\<^sub>2 (length E); length (Class C # ST) + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length (Class C # ST)) [::] ty\<^sub>i' (Class C # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2 @ [after E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2]
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'; \<D> e\<^sub>2 (A \<squnion> \ e\<^sub>1); \ e\<^sub>2 (length E); length (Class C # ST) + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length (Class C # ST)) [::] ty\<^sub>i' (Class C # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2 @ [after E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2]

goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
with FAss.prems T'
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: T__
\<D> (e\<^sub>1\<bullet>F{D} := e\<^sub>2) A
\ (e\<^sub>1\<bullet>F{D} := e\<^sub>2) (length E)
length ST + max_stack (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxs
length E + max_vars (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxl
P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'
\<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'; \<D> e\<^sub>2 (A \<squnion> \ e\<^sub>1); \ e\<^sub>2 (length E); length (Class C # ST) + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length (Class C # ST)) [::] ty\<^sub>i' (Class C # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2 @ [after E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2]
[PROOF STEP]
have "\<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (size ST+1) [::] ?\<tau>\<^sub>1#?\<tau>s\<^sub>2@[?\<tau>\<^sub>2]"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: T__
\<D> (e\<^sub>1\<bullet>F{D} := e\<^sub>2) A
\ (e\<^sub>1\<bullet>F{D} := e\<^sub>2) (length E)
length ST + max_stack (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxs
length E + max_vars (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxl
P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'
\<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'; \<D> e\<^sub>2 (A \<squnion> \ e\<^sub>1); \ e\<^sub>2 (length E); length (Class C # ST) + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length (Class C # ST)) [::] ty\<^sub>i' (Class C # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2 @ [after E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2]

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST + 1) [::] ty\<^sub>i' (Class C # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2 @ [ty\<^sub>i' (T' # Class C # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]
[PROOF STEP]
by (auto simp add: after_def hyperUn_assoc)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST + 1) [::] ty\<^sub>i' (Class C # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2 @ [ty\<^sub>i' (T' # Class C # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]

goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST + 1) [::] ty\<^sub>i' (Class C # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2 @ [ty\<^sub>i' (T' # Class C # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]

goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
from FAss C
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: T__
\<D> (e\<^sub>1\<bullet>F{D} := e\<^sub>2) A
\ (e\<^sub>1\<bullet>F{D} := e\<^sub>2) (length E)
length ST + max_stack (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxs
length E + max_vars (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxl
P,E \<turnstile>\<^sub>1 e\<^sub>1 :: Class C
[PROOF STEP]
have "\<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (size ST) [::] ?\<tau>#?\<tau>s\<^sub>1@[?\<tau>\<^sub>1]"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: T__
\<D> (e\<^sub>1\<bullet>F{D} := e\<^sub>2) A
\ (e\<^sub>1\<bullet>F{D} := e\<^sub>2) (length E)
length ST + max_stack (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxs
length E + max_vars (e\<^sub>1\<bullet>F{D} := e\<^sub>2) \<le> mxl
P,E \<turnstile>\<^sub>1 e\<^sub>1 :: Class C

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (Class C # ST) E (A \<squnion> \ e\<^sub>1)]
[PROOF STEP]
by (auto simp add: after_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ [ty\<^sub>i' (Class C # ST) E (A \<squnion> \ e\<^sub>1)]

goal (18 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} := x4 :: T; \<D> (x1\<bullet>x2{x3} := x4) A; \ (x1\<bullet>x2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>x2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3} := x4), compxE\<^sub>2 (x1\<bullet>x2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3} := x4) @ [after E A ST (x1\<bullet>x2{x3} := x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
A total of 18 subgoals...
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>length (compT E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2) + 1 = length (compE\<^sub>2 e\<^sub>2); length (compT E A ST e\<^sub>1) + 1 = length (compE\<^sub>2 e\<^sub>1)\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1 @ compE\<^sub>2 e\<^sub>2 @ [Putfield F D, Push Unit], compxE\<^sub>2 e\<^sub>1 0 (length ST) @ shift (length (compE\<^sub>2 e\<^sub>1)) (compxE\<^sub>2 e\<^sub>2 0 (length ST + 1) @ shift (length (compE\<^sub>2 e\<^sub>2)) []) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ ty\<^sub>i' (Class C # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2 @ [ty\<^sub>i' (T' # Class C # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' ST E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>length (compT E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2) + 1 = length (compE\<^sub>2 e\<^sub>2); length (compT E A ST e\<^sub>1) + 1 = length (compE\<^sub>2 e\<^sub>1)\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1 @ compE\<^sub>2 e\<^sub>2 @ [Putfield F D, Push Unit], compxE\<^sub>2 e\<^sub>1 0 (length ST) @ shift (length (compE\<^sub>2 e\<^sub>1)) (compxE\<^sub>2 e\<^sub>2 0 (length ST + 1) @ shift (length (compE\<^sub>2 e\<^sub>2)) []) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ ty\<^sub>i' (Class C # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2 @ [ty\<^sub>i' (T' # Class C # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' ST E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (e\<^sub>1\<bullet>F{D} := e\<^sub>2), compxE\<^sub>2 (e\<^sub>1\<bullet>F{D} := e\<^sub>2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (e\<^sub>1\<bullet>F{D} := e\<^sub>2) @ [after E A ST (e\<^sub>1\<bullet>F{D} := e\<^sub>2)]
[PROOF STEP]
using Void C T'
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>length (compT E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2) + 1 = length (compE\<^sub>2 e\<^sub>2); length (compT E A ST e\<^sub>1) + 1 = length (compE\<^sub>2 e\<^sub>1)\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1 @ compE\<^sub>2 e\<^sub>2 @ [Putfield F D, Push Unit], compxE\<^sub>2 e\<^sub>1 0 (length ST) @ shift (length (compE\<^sub>2 e\<^sub>1)) (compxE\<^sub>2 e\<^sub>2 0 (length ST + 1) @ shift (length (compE\<^sub>2 e\<^sub>2)) []) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>1 @ ty\<^sub>i' (Class C # ST) E (A \<squnion> \ e\<^sub>1) # compT E (A \<squnion> \ e\<^sub>1) (Class C # ST) e\<^sub>2 @ [ty\<^sub>i' (T' # Class C # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' ST E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e\<^sub>1 \<squnion> \ e\<^sub>2)]
P,E \<turnstile>\<^sub>1 e\<^sub>1\<bullet>F{D} := e\<^sub>2 :: Void
P,E \<turnstile>\<^sub>1 e\<^sub>1 :: Class C
P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (e\<^sub>1\<bullet>F{D} := e\<^sub>2), compxE\<^sub>2 (e\<^sub>1\<bullet>F{D} := e\<^sub>2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (e\<^sub>1\<bullet>F{D} := e\<^sub>2) @ [after E A ST (e\<^sub>1\<bullet>F{D} := e\<^sub>2)]
[PROOF STEP]
by (simp add: after_def hyperUn_assoc)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 (e\<^sub>1\<bullet>F{D} := e\<^sub>2), compxE\<^sub>2 (e\<^sub>1\<bullet>F{D} := e\<^sub>2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (e\<^sub>1\<bullet>F{D} := e\<^sub>2) @ [after E A ST (e\<^sub>1\<bullet>F{D} := e\<^sub>2)]

goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
case (SFAss C F D e\<^sub>2)
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 C\<bullet>\<^sub>sF{D} := e\<^sub>2 :: T
\<D> (C\<bullet>\<^sub>sF{D} := e\<^sub>2) A
\ (C\<bullet>\<^sub>sF{D} := e\<^sub>2) (length E)
length ST + max_stack (C\<bullet>\<^sub>sF{D} := e\<^sub>2) \<le> mxs
length E + max_vars (C\<bullet>\<^sub>sF{D} := e\<^sub>2) \<le> mxl

goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
hence Void: "P,E \<turnstile>\<^sub>1 C\<bullet>\<^sub>sF{D} := e\<^sub>2 :: Void"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 C\<bullet>\<^sub>sF{D} := e\<^sub>2 :: T
\<D> (C\<bullet>\<^sub>sF{D} := e\<^sub>2) A
\ (C\<bullet>\<^sub>sF{D} := e\<^sub>2) (length E)
length ST + max_stack (C\<bullet>\<^sub>sF{D} := e\<^sub>2) \<le> mxs
length E + max_vars (C\<bullet>\<^sub>sF{D} := e\<^sub>2) \<le> mxl

goal (1 subgoal):
 1. P,E \<turnstile>\<^sub>1 C\<bullet>\<^sub>sF{D} := e\<^sub>2 :: Void
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E \<turnstile>\<^sub>1 C\<bullet>\<^sub>sF{D} := e\<^sub>2 :: Void

goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile>\<^sub>1 C\<bullet>\<^sub>sF{D} := e\<^sub>2 :: Void
[PROOF STEP]
obtain T T' where
    sees: "P \<turnstile> C sees F,Static:T in D" and
    T': "P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'" and T'_T: "P \<turnstile> T' \<le> T"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 C\<bullet>\<^sub>sF{D} := e\<^sub>2 :: Void

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

goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
let ?A\<^sub>2 = "A \<squnion> \ e\<^sub>2"
[PROOF STATE]
proof (state)
goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
let ?\<tau> = "ty\<^sub>i' ST E A"
[PROOF STATE]
proof (state)
goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
let ?\<tau>s\<^sub>2 = "compT E A ST e\<^sub>2"
[PROOF STATE]
proof (state)
goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
let ?\<tau>\<^sub>2 = "ty\<^sub>i' (T'#ST) E ?A\<^sub>2"
[PROOF STATE]
proof (state)
goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
let ?\<tau>\<^sub>3 = "ty\<^sub>i' ST E ?A\<^sub>2"
[PROOF STATE]
proof (state)
goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
let ?\<tau>' = "ty\<^sub>i' (Void#ST) E ?A\<^sub>2"
[PROOF STATE]
proof (state)
goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
from SFAss.prems sees T'_T max_stack1[OF T']
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile>\<^sub>1 C\<bullet>\<^sub>sF{D} := e\<^sub>2 :: T__
\<D> (C\<bullet>\<^sub>sF{D} := e\<^sub>2) A
\ (C\<bullet>\<^sub>sF{D} := e\<^sub>2) (length E)
length ST + max_stack (C\<bullet>\<^sub>sF{D} := e\<^sub>2) \<le> mxs
length E + max_vars (C\<bullet>\<^sub>sF{D} := e\<^sub>2) \<le> mxl
P \<turnstile> C sees F,Static:T in D
subtype P T' T
1 \<le> max_stack e\<^sub>2
[PROOF STEP]
have "\<turnstile> [Putstatic C F D,Push Unit],[] [::] [?\<tau>\<^sub>2,?\<tau>\<^sub>3,?\<tau>']"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 C\<bullet>\<^sub>sF{D} := e\<^sub>2 :: T__
\<D> (C\<bullet>\<^sub>sF{D} := e\<^sub>2) A
\ (C\<bullet>\<^sub>sF{D} := e\<^sub>2) (length E)
length ST + max_stack (C\<bullet>\<^sub>sF{D} := e\<^sub>2) \<le> mxs
length E + max_vars (C\<bullet>\<^sub>sF{D} := e\<^sub>2) \<le> mxl
P \<turnstile> C sees F,Static:T in D
subtype P T' T
1 \<le> max_stack e\<^sub>2

goal (1 subgoal):
 1. \<turnstile> [Putstatic C F D, Push Unit], [] [::] [ty\<^sub>i' (T' # ST) E (A \<squnion> \ e\<^sub>2), ty\<^sub>i' ST E (A \<squnion> \ e\<^sub>2), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e\<^sub>2)]
[PROOF STEP]
by (fastforce simp add: wt_Push wt_PutS)
[PROOF STATE]
proof (state)
this:
\<turnstile> [Putstatic C F D, Push Unit], [] [::] [ty\<^sub>i' (T' # ST) E (A \<squnion> \ e\<^sub>2), ty\<^sub>i' ST E (A \<squnion> \ e\<^sub>2), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e\<^sub>2)]

goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> [Putstatic C F D, Push Unit], [] [::] [ty\<^sub>i' (T' # ST) E (A \<squnion> \ e\<^sub>2), ty\<^sub>i' ST E (A \<squnion> \ e\<^sub>2), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e\<^sub>2)]

goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
have "PROP ?P e\<^sub>2 E T' A ST"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'; \<D> e\<^sub>2 A; \ e\<^sub>2 (length E); length ST + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>2 @ [after E A ST e\<^sub>2]
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'; \<D> e\<^sub>2 A; \ e\<^sub>2 (length E); length ST + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>2 @ [after E A ST e\<^sub>2]

goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
with SFAss.prems T'
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile>\<^sub>1 C\<bullet>\<^sub>sF{D} := e\<^sub>2 :: T__
\<D> (C\<bullet>\<^sub>sF{D} := e\<^sub>2) A
\ (C\<bullet>\<^sub>sF{D} := e\<^sub>2) (length E)
length ST + max_stack (C\<bullet>\<^sub>sF{D} := e\<^sub>2) \<le> mxs
length E + max_vars (C\<bullet>\<^sub>sF{D} := e\<^sub>2) \<le> mxl
P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'
\<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'; \<D> e\<^sub>2 A; \ e\<^sub>2 (length E); length ST + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>2 @ [after E A ST e\<^sub>2]
[PROOF STEP]
have "\<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (size ST) [::] ?\<tau>#?\<tau>s\<^sub>2@[?\<tau>\<^sub>2]"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 C\<bullet>\<^sub>sF{D} := e\<^sub>2 :: T__
\<D> (C\<bullet>\<^sub>sF{D} := e\<^sub>2) A
\ (C\<bullet>\<^sub>sF{D} := e\<^sub>2) (length E)
length ST + max_stack (C\<bullet>\<^sub>sF{D} := e\<^sub>2) \<le> mxs
length E + max_vars (C\<bullet>\<^sub>sF{D} := e\<^sub>2) \<le> mxl
P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'
\<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'; \<D> e\<^sub>2 A; \ e\<^sub>2 (length E); length ST + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>2 @ [after E A ST e\<^sub>2]

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>2 @ [ty\<^sub>i' (T' # ST) E (A \<squnion> \ e\<^sub>2)]
[PROOF STEP]
by (auto simp add: after_def hyperUn_assoc)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>2 @ [ty\<^sub>i' (T' # ST) E (A \<squnion> \ e\<^sub>2)]

goal (17 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} := x4 :: T; \<D> (x1\<bullet>\<^sub>sx2{x3} := x4) A; \ (x1\<bullet>\<^sub>sx2{x3} := x4) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3} := x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3} := x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3} := x4) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3} := x4)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
A total of 17 subgoals...
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
length (compT E A ST e\<^sub>2) + 1 = length (compE\<^sub>2 e\<^sub>2) \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2 @ [Putstatic C F D, Push Unit], compxE\<^sub>2 e\<^sub>2 0 (length ST) @ shift (length (compE\<^sub>2 e\<^sub>2)) [] [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>2 @ [ty\<^sub>i' (T' # ST) E (A \<squnion> \ e\<^sub>2), ty\<^sub>i' ST E (A \<squnion> \ e\<^sub>2), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e\<^sub>2)]
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
length (compT E A ST e\<^sub>2) + 1 = length (compE\<^sub>2 e\<^sub>2) \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2 @ [Putstatic C F D, Push Unit], compxE\<^sub>2 e\<^sub>2 0 (length ST) @ shift (length (compE\<^sub>2 e\<^sub>2)) [] [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>2 @ [ty\<^sub>i' (T' # ST) E (A \<squnion> \ e\<^sub>2), ty\<^sub>i' ST E (A \<squnion> \ e\<^sub>2), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e\<^sub>2)]

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (C\<bullet>\<^sub>sF{D} := e\<^sub>2), compxE\<^sub>2 (C\<bullet>\<^sub>sF{D} := e\<^sub>2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (C\<bullet>\<^sub>sF{D} := e\<^sub>2) @ [after E A ST (C\<bullet>\<^sub>sF{D} := e\<^sub>2)]
[PROOF STEP]
using Void T'
[PROOF STATE]
proof (prove)
using this:
length (compT E A ST e\<^sub>2) + 1 = length (compE\<^sub>2 e\<^sub>2) \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2 @ [Putstatic C F D, Push Unit], compxE\<^sub>2 e\<^sub>2 0 (length ST) @ shift (length (compE\<^sub>2 e\<^sub>2)) [] [::] ty\<^sub>i' ST E A # compT E A ST e\<^sub>2 @ [ty\<^sub>i' (T' # ST) E (A \<squnion> \ e\<^sub>2), ty\<^sub>i' ST E (A \<squnion> \ e\<^sub>2), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e\<^sub>2)]
P,E \<turnstile>\<^sub>1 C\<bullet>\<^sub>sF{D} := e\<^sub>2 :: Void
P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T'

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (C\<bullet>\<^sub>sF{D} := e\<^sub>2), compxE\<^sub>2 (C\<bullet>\<^sub>sF{D} := e\<^sub>2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (C\<bullet>\<^sub>sF{D} := e\<^sub>2) @ [after E A ST (C\<bullet>\<^sub>sF{D} := e\<^sub>2)]
[PROOF STEP]
by (simp add: after_def hyperUn_assoc)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 (C\<bullet>\<^sub>sF{D} := e\<^sub>2), compxE\<^sub>2 (C\<bullet>\<^sub>sF{D} := e\<^sub>2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (C\<bullet>\<^sub>sF{D} := e\<^sub>2) @ [after E A ST (C\<bullet>\<^sub>sF{D} := e\<^sub>2)]

goal (16 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
A total of 16 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (16 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
A total of 16 subgoals...
[PROOF STEP]
case Val
[PROOF STATE]
proof (state)
this:
P,E \<turnstile>\<^sub>1 Val x_ :: T
\<D> (Val x_) A
\ (Val x_) (length E)
length ST + max_stack (Val x_) \<le> mxs
length E + max_vars (Val x_) \<le> mxl

goal (16 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Val x :: T; \<D> (Val x) A; \ (Val x) (length E); length ST + max_stack (Val x) \<le> mxs; length E + max_vars (Val x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Val x), compxE\<^sub>2 (Val x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x) @ [after E A ST (Val x)]
 3. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
A total of 16 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 Val x_ :: T
\<D> (Val x_) A
\ (Val x_) (length E)
length ST + max_stack (Val x_) \<le> mxs
length E + max_vars (Val x_) \<le> mxl

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (Val x_), compxE\<^sub>2 (Val x_) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x_) @ [after E A ST (Val x_)]
[PROOF STEP]
by(auto simp:after_def wt_Push)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 (Val x_), compxE\<^sub>2 (Val x_) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Val x_) @ [after E A ST (Val x_)]

goal (15 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 9. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
A total of 15 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (15 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 9. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
A total of 15 subgoals...
[PROOF STEP]
case Cast
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 x2_ :: ?T2; \<D> x2_ ?A2; \ x2_ (length ?E2); length ?ST2 + max_stack x2_ \<le> mxs; length ?E2 + max_vars x2_ \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2_, compxE\<^sub>2 x2_ 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 x2_ @ [after ?E2 ?A2 ?ST2 x2_]
P,E \<turnstile>\<^sub>1 Cast x1_ x2_ :: T
\<D> (Cast x1_ x2_) A
\ (Cast x1_ x2_) (length E)
length ST + max_stack (Cast x1_ x2_) \<le> mxs
length E + max_vars (Cast x1_ x2_) \<le> mxl

goal (15 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 Cast x1 x2 :: T; \<D> (Cast x1 x2) A; \ (Cast x1 x2) (length E); length ST + max_stack (Cast x1 x2) \<le> mxs; length E + max_vars (Cast x1 x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Cast x1 x2), compxE\<^sub>2 (Cast x1 x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1 x2) @ [after E A ST (Cast x1 x2)]
 2. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 9. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 10. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
A total of 15 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 x2_ :: ?T2; \<D> x2_ ?A2; \ x2_ (length ?E2); length ?ST2 + max_stack x2_ \<le> mxs; length ?E2 + max_vars x2_ \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2_, compxE\<^sub>2 x2_ 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 x2_ @ [after ?E2 ?A2 ?ST2 x2_]
P,E \<turnstile>\<^sub>1 Cast x1_ x2_ :: T
\<D> (Cast x1_ x2_) A
\ (Cast x1_ x2_) (length E)
length ST + max_stack (Cast x1_ x2_) \<le> mxs
length E + max_vars (Cast x1_ x2_) \<le> mxl

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (Cast x1_ x2_), compxE\<^sub>2 (Cast x1_ x2_) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1_ x2_) @ [after E A ST (Cast x1_ x2_)]
[PROOF STEP]
by (auto simp:after_def wt_Cast)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 (Cast x1_ x2_), compxE\<^sub>2 (Cast x1_ x2_) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Cast x1_ x2_) @ [after E A ST (Cast x1_ x2_)]

goal (14 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
A total of 14 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (14 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
A total of 14 subgoals...
[PROOF STEP]
case (Block i T\<^sub>i e)
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
P,E \<turnstile>\<^sub>1 {i:T\<^sub>i; e} :: T
\<D> {i:T\<^sub>i; e} A
\ {i:T\<^sub>i; e} (length E)
length ST + max_stack {i:T\<^sub>i; e} \<le> mxs
length E + max_vars {i:T\<^sub>i; e} \<le> mxl

goal (14 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
A total of 14 subgoals...
[PROOF STEP]
let ?\<tau>s = "ty\<^sub>i' ST E A # compT (E @ [T\<^sub>i]) (A\<ominus>i) ST e"
[PROOF STATE]
proof (state)
goal (14 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
A total of 14 subgoals...
[PROOF STEP]
have IH: "PROP ?P e (E@[T\<^sub>i]) T (A\<ominus>i) ST"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P,E @ [T\<^sub>i] \<turnstile>\<^sub>1 e :: T; \<D> e (A \<ominus> i); \ e (length (E @ [T\<^sub>i])); length ST + max_stack e \<le> mxs; length (E @ [T\<^sub>i]) + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST (E @ [T\<^sub>i]) (A \<ominus> i) # compT (E @ [T\<^sub>i]) (A \<ominus> i) ST e @ [after (E @ [T\<^sub>i]) (A \<ominus> i) ST e]
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,E @ [T\<^sub>i] \<turnstile>\<^sub>1 e :: T; \<D> e (A \<ominus> i); \ e (length (E @ [T\<^sub>i])); length ST + max_stack e \<le> mxs; length (E @ [T\<^sub>i]) + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST (E @ [T\<^sub>i]) (A \<ominus> i) # compT (E @ [T\<^sub>i]) (A \<ominus> i) ST e @ [after (E @ [T\<^sub>i]) (A \<ominus> i) ST e]

goal (14 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
A total of 14 subgoals...
[PROOF STEP]
hence "\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (size ST) [::]
         ?\<tau>s @ [ty\<^sub>i' (T#ST) (E@[T\<^sub>i]) (A\<ominus>(size E) \<squnion> \ e)]"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,E @ [T\<^sub>i] \<turnstile>\<^sub>1 e :: T; \<D> e (A \<ominus> i); \ e (length (E @ [T\<^sub>i])); length ST + max_stack e \<le> mxs; length (E @ [T\<^sub>i]) + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST (E @ [T\<^sub>i]) (A \<ominus> i) # compT (E @ [T\<^sub>i]) (A \<ominus> i) ST e @ [after (E @ [T\<^sub>i]) (A \<ominus> i) ST e]

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] (ty\<^sub>i' ST E A # compT (E @ [T\<^sub>i]) (A \<ominus> i) ST e) @ [ty\<^sub>i' (T # ST) (E @ [T\<^sub>i]) (A \<ominus> length E \<squnion> \ e)]
[PROOF STEP]
using Block.prems
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,E @ [T\<^sub>i] \<turnstile>\<^sub>1 e :: T; \<D> e (A \<ominus> i); \ e (length (E @ [T\<^sub>i])); length ST + max_stack e \<le> mxs; length (E @ [T\<^sub>i]) + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST (E @ [T\<^sub>i]) (A \<ominus> i) # compT (E @ [T\<^sub>i]) (A \<ominus> i) ST e @ [after (E @ [T\<^sub>i]) (A \<ominus> i) ST e]
P,E \<turnstile>\<^sub>1 {i:T\<^sub>i; e} :: T
\<D> {i:T\<^sub>i; e} A
\ {i:T\<^sub>i; e} (length E)
length ST + max_stack {i:T\<^sub>i; e} \<le> mxs
length E + max_vars {i:T\<^sub>i; e} \<le> mxl

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] (ty\<^sub>i' ST E A # compT (E @ [T\<^sub>i]) (A \<ominus> i) ST e) @ [ty\<^sub>i' (T # ST) (E @ [T\<^sub>i]) (A \<ominus> length E \<squnion> \ e)]
[PROOF STEP]
by (auto simp add: after_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] (ty\<^sub>i' ST E A # compT (E @ [T\<^sub>i]) (A \<ominus> i) ST e) @ [ty\<^sub>i' (T # ST) (E @ [T\<^sub>i]) (A \<ominus> length E \<squnion> \ e)]

goal (14 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
A total of 14 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] (ty\<^sub>i' ST E A # compT (E @ [T\<^sub>i]) (A \<ominus> i) ST e) @ [ty\<^sub>i' (T # ST) (E @ [T\<^sub>i]) (A \<ominus> length E \<squnion> \ e)]

goal (14 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
A total of 14 subgoals...
[PROOF STEP]
have "P \<turnstile> ty\<^sub>i' (T # ST) (E@[T\<^sub>i]) (A \<ominus> size E \<squnion> \ e) \<le>'
                 ty\<^sub>i' (T # ST) (E@[T\<^sub>i]) ((A \<squnion> \ e) \<ominus> size E)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P \<turnstile> ty\<^sub>i' (T # ST) (E @ [T\<^sub>i]) (A \<ominus> length E \<squnion> \ e) \<le>' ty\<^sub>i' (T # ST) (E @ [T\<^sub>i]) (A \<squnion> \ e \<ominus> length E)
[PROOF STEP]
by(auto simp add:hyperset_defs intro: ty\<^sub>i'_antimono)
[PROOF STATE]
proof (state)
this:
P \<turnstile> ty\<^sub>i' (T # ST) (E @ [T\<^sub>i]) (A \<ominus> length E \<squnion> \ e) \<le>' ty\<^sub>i' (T # ST) (E @ [T\<^sub>i]) (A \<squnion> \ e \<ominus> length E)

goal (14 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
A total of 14 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
P \<turnstile> ty\<^sub>i' (T # ST) (E @ [T\<^sub>i]) (A \<ominus> length E \<squnion> \ e) \<le>' ty\<^sub>i' (T # ST) (E @ [T\<^sub>i]) (A \<squnion> \ e \<ominus> length E)

goal (14 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
A total of 14 subgoals...
[PROOF STEP]
have "\<dots> = ty\<^sub>i' (T # ST) E (A \<squnion> \ e)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ty\<^sub>i' (T # ST) (E @ [T\<^sub>i]) (A \<squnion> \ e \<ominus> length E) = ty\<^sub>i' (T # ST) E (A \<squnion> \ e)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ty\<^sub>i' (T # ST) (E @ [T\<^sub>i]) (A \<squnion> \ e \<ominus> length E) = ty\<^sub>i' (T # ST) E (A \<squnion> \ e)

goal (14 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
A total of 14 subgoals...
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ty\<^sub>i' (T # ST) (E @ [T\<^sub>i]) (A \<squnion> \ e \<ominus> length E) = ty\<^sub>i' (T # ST) E (A \<squnion> \ e)

goal (14 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
A total of 14 subgoals...
[PROOF STEP]
have "P \<turnstile> \<dots> \<le>' ty\<^sub>i' (T # ST) E (A \<squnion> (\ e \<ominus> i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P \<turnstile> ty\<^sub>i' (T # ST) E (A \<squnion> \ e) \<le>' ty\<^sub>i' (T # ST) E (A \<squnion> (\ e \<ominus> i))
[PROOF STEP]
by(auto simp add:hyperset_defs intro: ty\<^sub>i'_antimono)
[PROOF STATE]
proof (state)
this:
P \<turnstile> ty\<^sub>i' (T # ST) E (A \<squnion> \ e) \<le>' ty\<^sub>i' (T # ST) E (A \<squnion> (\ e \<ominus> i))

goal (14 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 {x1:x2; x3} :: T; \<D> {x1:x2; x3} A; \ {x1:x2; x3} (length E); length ST + max_stack {x1:x2; x3} \<le> mxs; length E + max_vars {x1:x2; x3} \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 {x1:x2; x3}, compxE\<^sub>2 {x1:x2; x3} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {x1:x2; x3} @ [after E A ST {x1:x2; x3}]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 9. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 10. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
A total of 14 subgoals...
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] (ty\<^sub>i' ST E A # compT (E @ [T\<^sub>i]) (A \<ominus> i) ST e) @ [ty\<^sub>i' (T # ST) E (A \<squnion> (\ e \<ominus> i))]
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] (ty\<^sub>i' ST E A # compT (E @ [T\<^sub>i]) (A \<ominus> i) ST e) @ [ty\<^sub>i' (T # ST) E (A \<squnion> (\ e \<ominus> i))]

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 {i:T\<^sub>i; e}, compxE\<^sub>2 {i:T\<^sub>i; e} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {i:T\<^sub>i; e} @ [after E A ST {i:T\<^sub>i; e}]
[PROOF STEP]
using Block.prems
[PROOF STATE]
proof (prove)
using this:
\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] (ty\<^sub>i' ST E A # compT (E @ [T\<^sub>i]) (A \<ominus> i) ST e) @ [ty\<^sub>i' (T # ST) E (A \<squnion> (\ e \<ominus> i))]
P,E \<turnstile>\<^sub>1 {i:T\<^sub>i; e} :: T
\<D> {i:T\<^sub>i; e} A
\ {i:T\<^sub>i; e} (length E)
length ST + max_stack {i:T\<^sub>i; e} \<le> mxs
length E + max_vars {i:T\<^sub>i; e} \<le> mxl

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 {i:T\<^sub>i; e}, compxE\<^sub>2 {i:T\<^sub>i; e} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {i:T\<^sub>i; e} @ [after E A ST {i:T\<^sub>i; e}]
[PROOF STEP]
by(simp add: after_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 {i:T\<^sub>i; e}, compxE\<^sub>2 {i:T\<^sub>i; e} 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST {i:T\<^sub>i; e} @ [after E A ST {i:T\<^sub>i; e}]

goal (13 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 9. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 10. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
A total of 13 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (13 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 9. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 10. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
A total of 13 subgoals...
[PROOF STEP]
case Var
[PROOF STATE]
proof (state)
this:
P,E \<turnstile>\<^sub>1 Var x_ :: T
\<D> (Var x_) A
\ (Var x_) (length E)
length ST + max_stack (Var x_) \<le> mxs
length E + max_vars (Var x_) \<le> mxl

goal (13 subgoals):
 1. \<And>x E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 Var x :: T; \<D> (Var x) A; \ (Var x) (length E); length ST + max_stack (Var x) \<le> mxs; length E + max_vars (Var x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (Var x), compxE\<^sub>2 (Var x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x) @ [after E A ST (Var x)]
 2. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 7. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 8. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 9. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 10. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
A total of 13 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 Var x_ :: T
\<D> (Var x_) A
\ (Var x_) (length E)
length ST + max_stack (Var x_) \<le> mxs
length E + max_vars (Var x_) \<le> mxl

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (Var x_), compxE\<^sub>2 (Var x_) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x_) @ [after E A ST (Var x_)]
[PROOF STEP]
by(auto simp:after_def wt_Load)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 (Var x_), compxE\<^sub>2 (Var x_) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (Var x_) @ [after E A ST (Var x_)]

goal (12 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 9. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
A total of 12 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (12 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 9. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
A total of 12 subgoals...
[PROOF STEP]
case FAcc
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 x1_ :: ?T2; \<D> x1_ ?A2; \ x1_ (length ?E2); length ?ST2 + max_stack x1_ \<le> mxs; length ?E2 + max_vars x1_ \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1_, compxE\<^sub>2 x1_ 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 x1_ @ [after ?E2 ?A2 ?ST2 x1_]
P,E \<turnstile>\<^sub>1 x1_\<bullet>x2_{x3_} :: T
\<D> (x1_\<bullet>x2_{x3_}) A
\ (x1_\<bullet>x2_{x3_}) (length E)
length ST + max_stack (x1_\<bullet>x2_{x3_}) \<le> mxs
length E + max_vars (x1_\<bullet>x2_{x3_}) \<le> mxl

goal (12 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; P,E \<turnstile>\<^sub>1 x1\<bullet>x2{x3} :: T; \<D> (x1\<bullet>x2{x3}) A; \ (x1\<bullet>x2{x3}) (length E); length ST + max_stack (x1\<bullet>x2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>x2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2{x3}), compxE\<^sub>2 (x1\<bullet>x2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2{x3}) @ [after E A ST (x1\<bullet>x2{x3})]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 7. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 8. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 9. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
A total of 12 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 x1_ :: ?T2; \<D> x1_ ?A2; \ x1_ (length ?E2); length ?ST2 + max_stack x1_ \<le> mxs; length ?E2 + max_vars x1_ \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1_, compxE\<^sub>2 x1_ 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 x1_ @ [after ?E2 ?A2 ?ST2 x1_]
P,E \<turnstile>\<^sub>1 x1_\<bullet>x2_{x3_} :: T
\<D> (x1_\<bullet>x2_{x3_}) A
\ (x1_\<bullet>x2_{x3_}) (length E)
length ST + max_stack (x1_\<bullet>x2_{x3_}) \<le> mxs
length E + max_vars (x1_\<bullet>x2_{x3_}) \<le> mxl

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (x1_\<bullet>x2_{x3_}), compxE\<^sub>2 (x1_\<bullet>x2_{x3_}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1_\<bullet>x2_{x3_}) @ [after E A ST (x1_\<bullet>x2_{x3_})]
[PROOF STEP]
by(auto simp:after_def wt_Get)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 (x1_\<bullet>x2_{x3_}), compxE\<^sub>2 (x1_\<bullet>x2_{x3_}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1_\<bullet>x2_{x3_}) @ [after E A ST (x1_\<bullet>x2_{x3_})]

goal (11 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 7. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 8. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
A total of 11 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (11 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 7. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 8. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
A total of 11 subgoals...
[PROOF STEP]
case SFAcc
[PROOF STATE]
proof (state)
this:
P,E \<turnstile>\<^sub>1 x1_\<bullet>\<^sub>sx2_{x3_} :: T
\<D> (x1_\<bullet>\<^sub>sx2_{x3_}) A
\ (x1_\<bullet>\<^sub>sx2_{x3_}) (length E)
length ST + max_stack (x1_\<bullet>\<^sub>sx2_{x3_}) \<le> mxs
length E + max_vars (x1_\<bullet>\<^sub>sx2_{x3_}) \<le> mxl

goal (11 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2{x3} :: T; \<D> (x1\<bullet>\<^sub>sx2{x3}) A; \ (x1\<bullet>\<^sub>sx2{x3}) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2{x3}) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2{x3}) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2{x3}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2{x3}) @ [after E A ST (x1\<bullet>\<^sub>sx2{x3})]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 6. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 7. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 8. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 10. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
A total of 11 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 x1_\<bullet>\<^sub>sx2_{x3_} :: T
\<D> (x1_\<bullet>\<^sub>sx2_{x3_}) A
\ (x1_\<bullet>\<^sub>sx2_{x3_}) (length E)
length ST + max_stack (x1_\<bullet>\<^sub>sx2_{x3_}) \<le> mxs
length E + max_vars (x1_\<bullet>\<^sub>sx2_{x3_}) \<le> mxl

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (x1_\<bullet>\<^sub>sx2_{x3_}), compxE\<^sub>2 (x1_\<bullet>\<^sub>sx2_{x3_}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1_\<bullet>\<^sub>sx2_{x3_}) @ [after E A ST (x1_\<bullet>\<^sub>sx2_{x3_})]
[PROOF STEP]
by(auto simp: after_def wt_GetS)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 (x1_\<bullet>\<^sub>sx2_{x3_}), compxE\<^sub>2 (x1_\<bullet>\<^sub>sx2_{x3_}) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1_\<bullet>\<^sub>sx2_{x3_}) @ [after E A ST (x1_\<bullet>\<^sub>sx2_{x3_})]

goal (10 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 7. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
 10. \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 [] [::] Ts; \<D>s [] A; \s [] (length E); length ST + max_stacks [] \<le> mxs; length E + max_varss [] \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST [] in \<turnstile> compEs\<^sub>2 [], compxEs\<^sub>2 [] 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s [])
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (10 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 7. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
 10. \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 [] [::] Ts; \<D>s [] A; \s [] (length E); length ST + max_stacks [] \<le> mxs; length E + max_varss [] \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST [] in \<turnstile> compEs\<^sub>2 [], compxEs\<^sub>2 [] 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s [])
[PROOF STEP]
case (LAss i e)
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
P,E \<turnstile>\<^sub>1 i:=e :: T
\<D> (i:=e) A
\ (i:=e) (length E)
length ST + max_stack (i:=e) \<le> mxs
length E + max_vars (i:=e) \<le> mxl

goal (10 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 7. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
 10. \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 [] [::] Ts; \<D>s [] A; \s [] (length E); length ST + max_stacks [] \<le> mxs; length E + max_varss [] \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST [] in \<turnstile> compEs\<^sub>2 [], compxEs\<^sub>2 [] 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s [])
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
P,E \<turnstile>\<^sub>1 i:=e :: T
\<D> (i:=e) A
\ (i:=e) (length E)
length ST + max_stack (i:=e) \<le> mxs
length E + max_vars (i:=e) \<le> mxl
[PROOF STEP]
obtain T' where wt: "P,E \<turnstile>\<^sub>1 e :: T'"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
P,E \<turnstile>\<^sub>1 i:=e :: T
\<D> (i:=e) A
\ (i:=e) (length E)
length ST + max_stack (i:=e) \<le> mxs
length E + max_vars (i:=e) \<le> mxl

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

goal (10 subgoals):
 1. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1:=x2 :: T; \<D> (x1:=x2) A; \ (x1:=x2) (length E); length ST + max_stack (x1:=x2) \<le> mxs; length E + max_vars (x1:=x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1:=x2), compxE\<^sub>2 (x1:=x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1:=x2) @ [after E A ST (x1:=x2)]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 3. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 4. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 5. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 6. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 7. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 9. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
 10. \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 [] [::] Ts; \<D>s [] A; \s [] (length E); length ST + max_stacks [] \<le> mxs; length E + max_varss [] \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST [] in \<turnstile> compEs\<^sub>2 [], compxEs\<^sub>2 [] 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s [])
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (i:=e), compxE\<^sub>2 (i:=e) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (i:=e) @ [after E A ST (i:=e)]
[PROOF STEP]
using max_stack1[OF wt] LAss
[PROOF STATE]
proof (prove)
using this:
1 \<le> max_stack e
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
P,E \<turnstile>\<^sub>1 i:=e :: T
\<D> (i:=e) A
\ (i:=e) (length E)
length ST + max_stack (i:=e) \<le> mxs
length E + max_vars (i:=e) \<le> mxl

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (i:=e), compxE\<^sub>2 (i:=e) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (i:=e) @ [after E A ST (i:=e)]
[PROOF STEP]
by(auto simp: hyper_insert_comm after_def wt_Store wt_Push)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 (i:=e), compxE\<^sub>2 (i:=e) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (i:=e) @ [after E A ST (i:=e)]

goal (9 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
 9. \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 [] [::] Ts; \<D>s [] A; \s [] (length E); length ST + max_stacks [] \<le> mxs; length E + max_varss [] \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST [] in \<turnstile> compEs\<^sub>2 [], compxEs\<^sub>2 [] 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s [])
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (9 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
 9. \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 [] [::] Ts; \<D>s [] A; \s [] (length E); length ST + max_stacks [] \<le> mxs; length E + max_varss [] \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST [] in \<turnstile> compEs\<^sub>2 [], compxEs\<^sub>2 [] 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s [])
[PROOF STEP]
case Nil_exp
[PROOF STATE]
proof (state)
this:
P,E \<turnstile>\<^sub>1 [] [::] Ts
\<D>s [] A
\s [] (length E)
length ST + max_stacks [] \<le> mxs
length E + max_varss [] \<le> mxl

goal (9 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
 9. \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 [] [::] Ts; \<D>s [] A; \s [] (length E); length ST + max_stacks [] \<le> mxs; length E + max_varss [] \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST [] in \<turnstile> compEs\<^sub>2 [], compxEs\<^sub>2 [] 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s [])
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 [] [::] Ts
\<D>s [] A
\s [] (length E)
length ST + max_stacks [] \<le> mxs
length E + max_varss [] \<le> mxl

goal (1 subgoal):
 1. let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST [] in \<turnstile> compEs\<^sub>2 [], compxEs\<^sub>2 [] 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s [])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST [] in \<turnstile> compEs\<^sub>2 [], compxEs\<^sub>2 [] 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s [])

goal (8 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
case throw
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 x_ :: ?T2; \<D> x_ ?A2; \ x_ (length ?E2); length ?ST2 + max_stack x_ \<le> mxs; length ?E2 + max_vars x_ \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x_, compxE\<^sub>2 x_ 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 x_ @ [after ?E2 ?A2 ?ST2 x_]
P,E \<turnstile>\<^sub>1 throw x_ :: T
\<D> (throw x_) A
\ (throw x_) (length E)
length ST + max_stack (throw x_) \<le> mxs
length E + max_vars (throw x_) \<le> mxl

goal (8 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x :: T; \<D> x A; \ x (length E); length ST + max_stack x \<le> mxs; length E + max_vars x \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x, compxE\<^sub>2 x 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x @ [after E A ST x]; P,E \<turnstile>\<^sub>1 throw x :: T; \<D> (throw x) A; \ (throw x) (length E); length ST + max_stack (throw x) \<le> mxs; length E + max_vars (throw x) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (throw x), compxE\<^sub>2 (throw x) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x) @ [after E A ST (throw x)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 8. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 x_ :: ?T2; \<D> x_ ?A2; \ x_ (length ?E2); length ?ST2 + max_stack x_ \<le> mxs; length ?E2 + max_vars x_ \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x_, compxE\<^sub>2 x_ 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 x_ @ [after ?E2 ?A2 ?ST2 x_]
P,E \<turnstile>\<^sub>1 throw x_ :: T
\<D> (throw x_) A
\ (throw x_) (length E)
length ST + max_stack (throw x_) \<le> mxs
length E + max_vars (throw x_) \<le> mxl

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (throw x_), compxE\<^sub>2 (throw x_) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x_) @ [after E A ST (throw x_)]
[PROOF STEP]
by(auto simp add: after_def wt_Throw)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 (throw x_), compxE\<^sub>2 (throw x_) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (throw x_) @ [after E A ST (throw x_)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
case (While e c)
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 c :: ?T2; \<D> c ?A2; \ c (length ?E2); length ?ST2 + max_stack c \<le> mxs; length ?E2 + max_vars c \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 c, compxE\<^sub>2 c 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 c @ [after ?E2 ?A2 ?ST2 c]
P,E \<turnstile>\<^sub>1 while (e) c :: T
\<D> (while (e) c) A
\ (while (e) c) (length E)
length ST + max_stack (while (e) c) \<le> mxs
length E + max_vars (while (e) c) \<le> mxl

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
obtain Tc where wte: "P,E \<turnstile>\<^sub>1 e :: Boolean" and wtc: "P,E \<turnstile>\<^sub>1 c :: Tc"
    and [simp]: "T = Void"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>Tc. \<lbrakk>P,E \<turnstile>\<^sub>1 e :: Boolean; P,E \<turnstile>\<^sub>1 c :: Tc; T = Void\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using While
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 c :: ?T2; \<D> c ?A2; \ c (length ?E2); length ?ST2 + max_stack c \<le> mxs; length ?E2 + max_vars c \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 c, compxE\<^sub>2 c 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 c @ [after ?E2 ?A2 ?ST2 c]
P,E \<turnstile>\<^sub>1 while (e) c :: T
\<D> (while (e) c) A
\ (while (e) c) (length E)
length ST + max_stack (while (e) c) \<le> mxs
length E + max_vars (while (e) c) \<le> mxl

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

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have [simp]: "ty E (while (e) c) = Void"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ty E (while (e) c) = Void
[PROOF STEP]
using While
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 c :: ?T2; \<D> c ?A2; \ c (length ?E2); length ?ST2 + max_stack c \<le> mxs; length ?E2 + max_vars c \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 c, compxE\<^sub>2 c 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 c @ [after ?E2 ?A2 ?ST2 c]
P,E \<turnstile>\<^sub>1 while (e) c :: T
\<D> (while (e) c) A
\ (while (e) c) (length E)
length ST + max_stack (while (e) c) \<le> mxs
length E + max_vars (while (e) c) \<le> mxl

goal (1 subgoal):
 1. ty E (while (e) c) = Void
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ty E (while (e) c) = Void

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?A\<^sub>0 = "A \<squnion> \ e"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?A\<^sub>1 = "?A\<^sub>0 \<squnion> \ c"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?\<tau> = "ty\<^sub>i' ST E A"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?\<tau>s\<^sub>e = "compT E A ST e"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?\<tau>\<^sub>e = "ty\<^sub>i' (Boolean#ST) E ?A\<^sub>0"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?\<tau>\<^sub>1 = "ty\<^sub>i' ST E ?A\<^sub>0"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?\<tau>s\<^sub>c = "compT E ?A\<^sub>0 ST c"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?\<tau>\<^sub>c = "ty\<^sub>i' (Tc#ST) E ?A\<^sub>1"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?\<tau>\<^sub>2 = "ty\<^sub>i' ST E ?A\<^sub>1"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?\<tau>' = "ty\<^sub>i' (Void#ST) E ?A\<^sub>0"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?\<tau>s = "(?\<tau> # ?\<tau>s\<^sub>e @ [?\<tau>\<^sub>e]) @ ?\<tau>\<^sub>1 # ?\<tau>s\<^sub>c @ [?\<tau>\<^sub>c, ?\<tau>\<^sub>2, ?\<tau>\<^sub>1, ?\<tau>']"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have "\<turnstile> [],[] [::] [] @ ?\<tau>s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> [], [] [::] [] @ (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
by(simp add:wt_instrs_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> [], [] [::] [] @ (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> [], [] [::] [] @ (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have "PROP ?P e E Boolean A ST"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P,E \<turnstile>\<^sub>1 e :: Boolean; \<D> e A; \ e (length E); length ST + max_stack e \<le> mxs; length E + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [after E A ST e]
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,E \<turnstile>\<^sub>1 e :: Boolean; \<D> e A; \ e (length E); length ST + max_stack e \<le> mxs; length E + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [after E A ST e]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
hence "\<turnstile> compE\<^sub>2 e,compxE\<^sub>2 e 0 (size ST) [::] ?\<tau> # ?\<tau>s\<^sub>e @ [?\<tau>\<^sub>e]"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,E \<turnstile>\<^sub>1 e :: Boolean; \<D> e A; \ e (length E); length ST + max_stack e \<le> mxs; length E + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [after E A ST e]

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]
[PROOF STEP]
using While.prems
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,E \<turnstile>\<^sub>1 e :: Boolean; \<D> e A; \ e (length E); length ST + max_stack e \<le> mxs; length E + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [after E A ST e]
P,E \<turnstile>\<^sub>1 while (e) c :: T
\<D> (while (e) c) A
\ (while (e) c) (length E)
length ST + max_stack (while (e) c) \<le> mxs
length E + max_vars (while (e) c) \<le> mxl

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]
[PROOF STEP]
by (auto simp:after_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have "[] @ ?\<tau>s = (?\<tau> # ?\<tau>s\<^sub>e) @ ?\<tau>\<^sub>e # ?\<tau>\<^sub>1 # ?\<tau>s\<^sub>c @ [?\<tau>\<^sub>c,?\<tau>\<^sub>2,?\<tau>\<^sub>1,?\<tau>']"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [] @ (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e) @ ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
[] @ (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e) @ ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
[] @ (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e) @ ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?n\<^sub>e = "size(compE\<^sub>2 e)"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?n\<^sub>c = "size(compE\<^sub>2 c)"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
thm compT_sizes(1)
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?if = "IfFalse (int ?n\<^sub>c + 3)"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
from wtc wte
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile>\<^sub>1 c :: Tc
P,E \<turnstile>\<^sub>1 e :: Boolean
[PROOF STEP]
have "compE\<^sub>2 c \<noteq> []" and "compE\<^sub>2 e \<noteq> []"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 c :: Tc
P,E \<turnstile>\<^sub>1 e :: Boolean

goal (1 subgoal):
 1. compE\<^sub>2 c \<noteq> [] &&& compE\<^sub>2 e \<noteq> []
[PROOF STEP]
using WT\<^sub>1_nsub_RI
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 c :: Tc
P,E \<turnstile>\<^sub>1 e :: Boolean
?P,?E \<turnstile>\<^sub>1 ?e :: ?T \<Longrightarrow> \<not> sub_RI ?e

goal (1 subgoal):
 1. compE\<^sub>2 c \<noteq> [] &&& compE\<^sub>2 e \<noteq> []
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
compE\<^sub>2 c \<noteq> []
compE\<^sub>2 e \<noteq> []

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
compE\<^sub>2 c \<noteq> []
compE\<^sub>2 e \<noteq> []
[PROOF STEP]
have compe2c: "length (compE\<^sub>2 c) > 0" and compe2e: "length (compE\<^sub>2 e) > 0"
[PROOF STATE]
proof (prove)
using this:
compE\<^sub>2 c \<noteq> []
compE\<^sub>2 e \<noteq> []

goal (1 subgoal):
 1. 0 < length (compE\<^sub>2 c) &&& 0 < length (compE\<^sub>2 e)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < length (compE\<^sub>2 c)
0 < length (compE\<^sub>2 e)

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have Suc_pred'_auxi: "\<And>n. 0 < n \<Longrightarrow> n = Suc (n - Suc 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> n = Suc (n - Suc 0)
[PROOF STEP]
using Suc_pred'[OF compe2c]
[PROOF STATE]
proof (prove)
using this:
length (compE\<^sub>2 c) = Suc (length (compE\<^sub>2 c) - 1)

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> n = Suc (n - Suc 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < ?n2 \<Longrightarrow> ?n2 = Suc (?n2 - Suc 0)

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have "\<turnstile> [?if],[] [::] ?\<tau>\<^sub>e # ?\<tau>\<^sub>1 # ?\<tau>s\<^sub>c @ [?\<tau>\<^sub>c, ?\<tau>\<^sub>2, ?\<tau>\<^sub>1, ?\<tau>']"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> [IfFalse (int (length (compE\<^sub>2 c)) + 3)], [] [::] ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<turnstile> [IfFalse (int (length (compE\<^sub>2 c)) + 3)], [] [::] ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<turnstile> [IfFalse (int (length (compE\<^sub>2 c)) + 3)], [] [::] ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> [IfFalse (int (length (compE\<^sub>2 c)) + 3)], [] [::] ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
apply (rule wt_IfFalse)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. 2 \<le> int (length (compE\<^sub>2 c)) + 3
 2. nat (int (length (compE\<^sub>2 c)) + 3) < length (compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) + 2
 3. P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e) \<le>' (compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 c)) + 3 - 2)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. nat (int (length (compE\<^sub>2 c)) + 3) < length (compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) + 2
 2. P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e) \<le>' (compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 c)) + 3 - 2)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. length (compE\<^sub>2 c) < 3 + length (compT E (A \<squnion> \ e) ST c)
 2. P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e) \<le>' (compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 c)) + 3 - 2)
[PROOF STEP]
apply (subgoal_tac "length (compE\<^sub>2 c) = length (compT E (A \<squnion> \ e) ST c) + 1"
                           "nat (int (length (compE\<^sub>2 c)) + 3 - 2) > length (compT E (A \<squnion> \ e) ST c)")
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>length (compE\<^sub>2 c) = length (compT E (A \<squnion> \ e) ST c) + 1; length (compT E (A \<squnion> \ e) ST c) < nat (int (length (compE\<^sub>2 c)) + 3 - 2)\<rbrakk> \<Longrightarrow> length (compE\<^sub>2 c) < 3 + length (compT E (A \<squnion> \ e) ST c)
 2. length (compE\<^sub>2 c) = length (compT E (A \<squnion> \ e) ST c) + 1 \<Longrightarrow> length (compT E (A \<squnion> \ e) ST c) < nat (int (length (compE\<^sub>2 c)) + 3 - 2)
 3. length (compE\<^sub>2 c) = length (compT E (A \<squnion> \ e) ST c) + 1
 4. P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e) \<le>' (compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 c)) + 3 - 2)
[PROOF STEP]
apply (insert Suc_pred'_auxi[OF compe2c])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>length (compE\<^sub>2 c) = length (compT E (A \<squnion> \ e) ST c) + 1; length (compT E (A \<squnion> \ e) ST c) < nat (int (length (compE\<^sub>2 c)) + 3 - 2); length (compE\<^sub>2 c) = Suc (length (compE\<^sub>2 c) - Suc 0)\<rbrakk> \<Longrightarrow> length (compE\<^sub>2 c) < 3 + length (compT E (A \<squnion> \ e) ST c)
 2. \<lbrakk>length (compE\<^sub>2 c) = length (compT E (A \<squnion> \ e) ST c) + 1; length (compE\<^sub>2 c) = Suc (length (compE\<^sub>2 c) - Suc 0)\<rbrakk> \<Longrightarrow> length (compT E (A \<squnion> \ e) ST c) < nat (int (length (compE\<^sub>2 c)) + 3 - 2)
 3. length (compE\<^sub>2 c) = Suc (length (compE\<^sub>2 c) - Suc 0) \<Longrightarrow> length (compE\<^sub>2 c) = length (compT E (A \<squnion> \ e) ST c) + 1
 4. length (compE\<^sub>2 c) = Suc (length (compE\<^sub>2 c) - Suc 0) \<Longrightarrow> P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e) \<le>' (compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 c)) + 3 - 2)
[PROOF STEP]
apply (simp add:compT_sizes(1)[OF wtc] )+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
\<turnstile> [IfFalse (int (length (compE\<^sub>2 c)) + 3)], [] [::] ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal:
No subgoals!
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<turnstile> [IfFalse (int (length (compE\<^sub>2 c)) + 3)], [] [::] ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<turnstile> [IfFalse (int (length (compE\<^sub>2 c)) + 3)], [] [::] ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> [IfFalse (int (length (compE\<^sub>2 c)) + 3)], [] [::] ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have "(?\<tau> # ?\<tau>s\<^sub>e) @ (?\<tau>\<^sub>e # ?\<tau>\<^sub>1 # ?\<tau>s\<^sub>c @ [?\<tau>\<^sub>c, ?\<tau>\<^sub>2, ?\<tau>\<^sub>1, ?\<tau>']) = ?\<tau>s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ty\<^sub>i' ST E A # compT E A ST e) @ ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(ty\<^sub>i' ST E A # compT E A ST e) @ ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(ty\<^sub>i' ST E A # compT E A ST e) @ ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have "PROP ?P c E Tc ?A\<^sub>0 ST"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P,E \<turnstile>\<^sub>1 c :: Tc; \<D> c (A \<squnion> \ e); \ c (length E); length ST + max_stack c \<le> mxs; length E + max_vars c \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 c, compxE\<^sub>2 c 0 (length ST) [::] ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [after E (A \<squnion> \ e) ST c]
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,E \<turnstile>\<^sub>1 c :: Tc; \<D> c (A \<squnion> \ e); \ c (length E); length ST + max_stack c \<le> mxs; length E + max_vars c \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 c, compxE\<^sub>2 c 0 (length ST) [::] ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [after E (A \<squnion> \ e) ST c]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
hence "\<turnstile> compE\<^sub>2 c,compxE\<^sub>2 c 0 (size ST) [::] ?\<tau>\<^sub>1 # ?\<tau>s\<^sub>c @ [?\<tau>\<^sub>c]"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,E \<turnstile>\<^sub>1 c :: Tc; \<D> c (A \<squnion> \ e); \ c (length E); length ST + max_stack c \<le> mxs; length E + max_vars c \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 c, compxE\<^sub>2 c 0 (length ST) [::] ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [after E (A \<squnion> \ e) ST c]

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 c, compxE\<^sub>2 c 0 (length ST) [::] ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c)]
[PROOF STEP]
using While.prems wtc
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,E \<turnstile>\<^sub>1 c :: Tc; \<D> c (A \<squnion> \ e); \ c (length E); length ST + max_stack c \<le> mxs; length E + max_vars c \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 c, compxE\<^sub>2 c 0 (length ST) [::] ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [after E (A \<squnion> \ e) ST c]
P,E \<turnstile>\<^sub>1 while (e) c :: T
\<D> (while (e) c) A
\ (while (e) c) (length E)
length ST + max_stack (while (e) c) \<le> mxs
length E + max_vars (while (e) c) \<le> mxl
P,E \<turnstile>\<^sub>1 c :: Tc

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 c, compxE\<^sub>2 c 0 (length ST) [::] ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c)]
[PROOF STEP]
by (auto simp:after_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 c, compxE\<^sub>2 c 0 (length ST) [::] ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 c, compxE\<^sub>2 c 0 (length ST) [::] ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have "?\<tau>s = (?\<tau> # ?\<tau>s\<^sub>e @ [?\<tau>\<^sub>e,?\<tau>\<^sub>1] @ ?\<tau>s\<^sub>c) @ [?\<tau>\<^sub>c,?\<tau>\<^sub>2,?\<tau>\<^sub>1,?\<tau>']"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have "\<turnstile> [Pop],[] [::] [?\<tau>\<^sub>c, ?\<tau>\<^sub>2]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> [Pop], [] [::] [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)]
[PROOF STEP]
by(simp add:wt_Pop)
[PROOF STATE]
proof (state)
this:
\<turnstile> [Pop], [] [::] [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<turnstile> [Pop], [] [::] [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have "(?\<tau> # ?\<tau>s\<^sub>e @ [?\<tau>\<^sub>e,?\<tau>\<^sub>1] @ ?\<tau>s\<^sub>c) @ [?\<tau>\<^sub>c,?\<tau>\<^sub>2,?\<tau>\<^sub>1,?\<tau>'] = ?\<tau>s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?go = "Goto (-int(?n\<^sub>c+?n\<^sub>e+2))"
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have "P \<turnstile> ?\<tau>\<^sub>2 \<le>' ?\<tau>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A
[PROOF STEP]
by(fastforce intro: ty\<^sub>i'_antimono simp: hyperset_defs)
[PROOF STATE]
proof (state)
this:
P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
hence "P,T\<^sub>r,mxs,size ?\<tau>s,[] \<turnstile> ?go,?n\<^sub>e+?n\<^sub>c+2 :: ?\<tau>s"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A

goal (1 subgoal):
 1. P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
using wte wtc
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A
P,E \<turnstile>\<^sub>1 e :: Boolean
P,E \<turnstile>\<^sub>1 c :: Tc

goal (1 subgoal):
 1. P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A; P,E \<turnstile>\<^sub>1 e :: Boolean; P,E \<turnstile>\<^sub>1 c :: Tc\<rbrakk> \<Longrightarrow> P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A; P,E \<turnstile>\<^sub>1 e :: Boolean; P,E \<turnstile>\<^sub>1 c :: Tc\<rbrakk> \<Longrightarrow> P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
let ?t1 = "ty\<^sub>i' ST E A"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A; P,E \<turnstile>\<^sub>1 e :: Boolean; P,E \<turnstile>\<^sub>1 c :: Tc\<rbrakk> \<Longrightarrow> P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
let ?t2 = "ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A; P,E \<turnstile>\<^sub>1 e :: Boolean; P,E \<turnstile>\<^sub>1 c :: Tc\<rbrakk> \<Longrightarrow> P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
let ?t3 = "ty\<^sub>i' ST E (A \<squnion> \ e)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A; P,E \<turnstile>\<^sub>1 e :: Boolean; P,E \<turnstile>\<^sub>1 c :: Tc\<rbrakk> \<Longrightarrow> P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
let ?t4 = "[ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A; P,E \<turnstile>\<^sub>1 e :: Boolean; P,E \<turnstile>\<^sub>1 c :: Tc\<rbrakk> \<Longrightarrow> P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
let ?c = " compT E (A \<squnion> \ e) ST c"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A; P,E \<turnstile>\<^sub>1 e :: Boolean; P,E \<turnstile>\<^sub>1 c :: Tc\<rbrakk> \<Longrightarrow> P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
let ?e = "compT E A ST e"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A; P,E \<turnstile>\<^sub>1 e :: Boolean; P,E \<turnstile>\<^sub>1 c :: Tc\<rbrakk> \<Longrightarrow> P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
assume ass: "P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ?t1"
[PROOF STATE]
proof (state)
this:
P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A

goal (1 subgoal):
 1. \<lbrakk>P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A; P,E \<turnstile>\<^sub>1 e :: Boolean; P,E \<turnstile>\<^sub>1 c :: Tc\<rbrakk> \<Longrightarrow> P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
apply (rule wt_Goto)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. 0 \<le> int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)
 2. nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)) < length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)])
 3. length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) \<le> length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)])
 4. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)) < length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)])
 2. length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) \<le> length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)])
 3. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) \<le> length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)])
 2. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
let ?s1 = "((?t1 # ?e @ [?t2]) @ ?t3 # ?c)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
have len1: "length ?c = length (compE\<^sub>2 c) - 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (compT E (A \<squnion> \ e) ST c) = length (compE\<^sub>2 c) - 1
[PROOF STEP]
using compT_sizes(1)[OF wtc]
[PROOF STATE]
proof (prove)
using this:
length (compT E ?A ?ST c) = length (compE\<^sub>2 c) - 1

goal (1 subgoal):
 1. length (compT E (A \<squnion> \ e) ST c) = length (compE\<^sub>2 c) - 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (compT E (A \<squnion> \ e) ST c) = length (compE\<^sub>2 c) - 1

goal (1 subgoal):
 1. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
have len2: "length ?e = length (compE\<^sub>2 e) - 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (compT E A ST e) = length (compE\<^sub>2 e) - 1
[PROOF STEP]
using compT_sizes(1)[OF wte]
[PROOF STATE]
proof (prove)
using this:
length (compT E ?A ?ST e) = length (compE\<^sub>2 e) - 1

goal (1 subgoal):
 1. length (compT E A ST e) = length (compE\<^sub>2 e) - 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (compT E A ST e) = length (compE\<^sub>2 e) - 1

goal (1 subgoal):
 1. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
hence "length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 > length ?s1"
[PROOF STATE]
proof (prove)
using this:
length (compT E A ST e) = length (compE\<^sub>2 e) - 1

goal (1 subgoal):
 1. length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) < length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2
[PROOF STEP]
using len1 compe2c compe2e
[PROOF STATE]
proof (prove)
using this:
length (compT E A ST e) = length (compE\<^sub>2 e) - 1
length (compT E (A \<squnion> \ e) ST c) = length (compE\<^sub>2 c) - 1
0 < length (compE\<^sub>2 c)
0 < length (compE\<^sub>2 e)

goal (1 subgoal):
 1. length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) < length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) < length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2

goal (1 subgoal):
 1. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
hence "(?s1 @ ?t4) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) =
                     ?t4 ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 - length ?s1)"
[PROOF STATE]
proof (prove)
using this:
length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) < length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2

goal (1 subgoal):
 1. (((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) = [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 - length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c))
[PROOF STEP]
by (auto simp only:nth_append split: if_splits)
[PROOF STATE]
proof (state)
this:
(((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) = [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 - length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c))

goal (1 subgoal):
 1. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
hence "(?s1 @ ?t4) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) = ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)"
[PROOF STATE]
proof (prove)
using this:
(((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) = [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 - length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c))

goal (1 subgoal):
 1. (((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) = ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)
[PROOF STEP]
using len1 len2 compe2c compe2e
[PROOF STATE]
proof (prove)
using this:
(((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) = [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 - length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c))
length (compT E (A \<squnion> \ e) ST c) = length (compE\<^sub>2 c) - 1
length (compT E A ST e) = length (compE\<^sub>2 e) - 1
0 < length (compE\<^sub>2 c)
0 < length (compE\<^sub>2 e)

goal (1 subgoal):
 1. (((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) = ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) = ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)

goal (1 subgoal):
 1. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
hence "P \<turnstile> (?s1 @ ?t4) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ty\<^sub>i' ST E A"
[PROOF STATE]
proof (prove)
using this:
(((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) = ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)

goal (1 subgoal):
 1. P \<turnstile> (((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ty\<^sub>i' ST E A
[PROOF STEP]
using ass
[PROOF STATE]
proof (prove)
using this:
(((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) = ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)
P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A

goal (1 subgoal):
 1. P \<turnstile> (((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ty\<^sub>i' ST E A
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P \<turnstile> (((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ty\<^sub>i' ST E A

goal (1 subgoal):
 1. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
thus "P \<turnstile> ((?t1 # ?e @ [?t2]) @ ?t3 # ?c @ ?t4) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>'
                    ((?t1 # ?e @ [?t2]) @ ?t3 # ?c @ ?t4) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) +
                      - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> (((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c) @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ty\<^sub>i' ST E A

goal (1 subgoal):
 1. P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))

goal:
No subgoals!
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
P \<turnstile> ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) \<le>' ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) ! nat (int (length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2) + - int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal:
No subgoals!
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
P \<turnstile> ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c) \<le>' ty\<^sub>i' ST E A \<Longrightarrow> P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
P,T\<^sub>r,mxs,length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]),[] \<turnstile> Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2)),length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 :: (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have "?\<tau>s = (?\<tau> # ?\<tau>s\<^sub>e @ [?\<tau>\<^sub>e,?\<tau>\<^sub>1] @ ?\<tau>s\<^sub>c @ [?\<tau>\<^sub>c, ?\<tau>\<^sub>2]) @ [?\<tau>\<^sub>1, ?\<tau>']"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)]) @ [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)]) @ [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] = (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)]) @ [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have "\<turnstile> [Push Unit],[] [::] [?\<tau>\<^sub>1,?\<tau>']"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> [Push Unit], [] [::] [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
using While.prems max_stack1[OF wtc]
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 while (e) c :: T
\<D> (while (e) c) A
\ (while (e) c) (length E)
length ST + max_stack (while (e) c) \<le> mxs
length E + max_vars (while (e) c) \<le> mxl
1 \<le> max_stack c

goal (1 subgoal):
 1. \<turnstile> [Push Unit], [] [::] [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
by(auto simp add:wt_Push)
[PROOF STATE]
proof (state)
this:
\<turnstile> [Push Unit], [] [::] [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (7 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 while (x1) x2 :: T; \<D> (while (x1) x2) A; \ (while (x1) x2) (length E); length ST + max_stack (while (x1) x2) \<le> mxs; length E + max_vars (while (x1) x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (while (x1) x2), compxE\<^sub>2 (while (x1) x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (x1) x2) @ [after E A ST (while (x1) x2)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 7. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>length [] = length []; prefix (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (ty\<^sub>i' ST E A # compT E A ST e) = length ([] @ compE\<^sub>2 e); prefix (ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) (ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) = length (([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]); prefix (ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c)]) (ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c) = length ((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c); prefix [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)] [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]; length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 = length (((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]); length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) = length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]) + 1 < length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)]) = length ((((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]) @ [Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))]); prefix [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]\<rbrakk> \<Longrightarrow> \<turnstile> ((((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]) @ [Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))]) @ [Push Unit], (((([] @ shift (length []) (compxE\<^sub>2 e 0 (length ST))) @ shift (length ([] @ compE\<^sub>2 e)) []) @ shift (length (([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)])) (compxE\<^sub>2 c 0 (length ST))) @ shift (length ((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c)) []) @ shift (length ((((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]) @ [Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))])) [] [::] (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)]) @ [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>length [] = length []; prefix (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (ty\<^sub>i' ST E A # compT E A ST e) = length ([] @ compE\<^sub>2 e); prefix (ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) (ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) = length (([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]); prefix (ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c)]) (ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c) = length ((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c); prefix [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)] [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]; length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 = length (((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]); length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) = length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]) + 1 < length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)]) = length ((((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]) @ [Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))]); prefix [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]\<rbrakk> \<Longrightarrow> \<turnstile> ((((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]) @ [Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))]) @ [Push Unit], (((([] @ shift (length []) (compxE\<^sub>2 e 0 (length ST))) @ shift (length ([] @ compE\<^sub>2 e)) []) @ shift (length (([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)])) (compxE\<^sub>2 c 0 (length ST))) @ shift (length ((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c)) []) @ shift (length ((((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]) @ [Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))])) [] [::] (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)]) @ [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (while (e) c), compxE\<^sub>2 (while (e) c) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (e) c) @ [after E A ST (while (e) c)]
[PROOF STEP]
using wtc wte
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>length [] = length []; prefix (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (ty\<^sub>i' ST E A # compT E A ST e) = length ([] @ compE\<^sub>2 e); prefix (ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) (ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e) # ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) = length (([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]); prefix (ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c)]) (ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c) = length ((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c); prefix [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)] [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]; length (compE\<^sub>2 e) + length (compE\<^sub>2 c) + 2 = length (((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]); length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]) = length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]) + 1 < length ((ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e)]) @ ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]); length (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)]) = length ((((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]) @ [Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))]); prefix [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)] [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]\<rbrakk> \<Longrightarrow> \<turnstile> ((((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]) @ [Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))]) @ [Push Unit], (((([] @ shift (length []) (compxE\<^sub>2 e 0 (length ST))) @ shift (length ([] @ compE\<^sub>2 e)) []) @ shift (length (([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)])) (compxE\<^sub>2 c 0 (length ST))) @ shift (length ((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c)) []) @ shift (length ((((([] @ compE\<^sub>2 e) @ [IfFalse (int (length (compE\<^sub>2 c)) + 3)]) @ compE\<^sub>2 c) @ [Pop]) @ [Goto (- int (length (compE\<^sub>2 c) + length (compE\<^sub>2 e) + 2))])) [] [::] (ty\<^sub>i' ST E A # compT E A ST e @ [ty\<^sub>i' (Boolean # ST) E (A \<squnion> \ e), ty\<^sub>i' ST E (A \<squnion> \ e)] @ compT E (A \<squnion> \ e) ST c @ [ty\<^sub>i' (Tc # ST) E (A \<squnion> \ e \<squnion> \ c), ty\<^sub>i' ST E (A \<squnion> \ e \<squnion> \ c)]) @ [ty\<^sub>i' ST E (A \<squnion> \ e), ty\<^sub>i' (Void # ST) E (A \<squnion> \ e)]
P,E \<turnstile>\<^sub>1 c :: Tc
P,E \<turnstile>\<^sub>1 e :: Boolean

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 (while (e) c), compxE\<^sub>2 (while (e) c) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (e) c) @ [after E A ST (while (e) c)]
[PROOF STEP]
by (simp add:after_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> compE\<^sub>2 (while (e) c), compxE\<^sub>2 (while (e) c) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (while (e) c) @ [after E A ST (while (e) c)]

goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
case (Cond e e\<^sub>1 e\<^sub>2)
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 if (e) e\<^sub>1 else e\<^sub>2 :: T
\<D> (if (e) e\<^sub>1 else e\<^sub>2) A
\ (if (e) e\<^sub>1 else e\<^sub>2) (length E)
length ST + max_stack (if (e) e\<^sub>1 else e\<^sub>2) \<le> mxs
length E + max_vars (if (e) e\<^sub>1 else e\<^sub>2) \<le> mxl

goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
obtain T\<^sub>1 T\<^sub>2 where wte: "P,E \<turnstile>\<^sub>1 e :: Boolean"
    and wt\<^sub>1: "P,E \<turnstile>\<^sub>1 e\<^sub>1 :: T\<^sub>1" and wt\<^sub>2: "P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2"
    and sub\<^sub>1: "P \<turnstile> T\<^sub>1 \<le> T" and sub\<^sub>2: "P \<turnstile> T\<^sub>2 \<le> T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>T\<^sub>1 T\<^sub>2. \<lbrakk>P,E \<turnstile>\<^sub>1 e :: Boolean; P,E \<turnstile>\<^sub>1 e\<^sub>1 :: T\<^sub>1; P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2; subtype P T\<^sub>1 T; subtype P T\<^sub>2 T\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Cond
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 if (e) e\<^sub>1 else e\<^sub>2 :: T
\<D> (if (e) e\<^sub>1 else e\<^sub>2) A
\ (if (e) e\<^sub>1 else e\<^sub>2) (length E)
length ST + max_stack (if (e) e\<^sub>1 else e\<^sub>2) \<le> mxs
length E + max_vars (if (e) e\<^sub>1 else e\<^sub>2) \<le> mxl

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

goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
from wte wt\<^sub>1  wt\<^sub>2
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile>\<^sub>1 e :: Boolean
P,E \<turnstile>\<^sub>1 e\<^sub>1 :: T\<^sub>1
P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2
[PROOF STEP]
have "compE\<^sub>2 e\<^sub>1 \<noteq> []" and "compE\<^sub>2 e\<^sub>2 \<noteq> []" and "compE\<^sub>2 e \<noteq> []"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 e :: Boolean
P,E \<turnstile>\<^sub>1 e\<^sub>1 :: T\<^sub>1
P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2

goal (1 subgoal):
 1. compE\<^sub>2 e\<^sub>1 \<noteq> [] &&& compE\<^sub>2 e\<^sub>2 \<noteq> [] &&& compE\<^sub>2 e \<noteq> []
[PROOF STEP]
using WT\<^sub>1_nsub_RI
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile>\<^sub>1 e :: Boolean
P,E \<turnstile>\<^sub>1 e\<^sub>1 :: T\<^sub>1
P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2
?P,?E \<turnstile>\<^sub>1 ?e :: ?T \<Longrightarrow> \<not> sub_RI ?e

goal (1 subgoal):
 1. compE\<^sub>2 e\<^sub>1 \<noteq> [] &&& compE\<^sub>2 e\<^sub>2 \<noteq> [] &&& compE\<^sub>2 e \<noteq> []
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
compE\<^sub>2 e\<^sub>1 \<noteq> []
compE\<^sub>2 e\<^sub>2 \<noteq> []
compE\<^sub>2 e \<noteq> []

goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
compE\<^sub>2 e\<^sub>1 \<noteq> []
compE\<^sub>2 e\<^sub>2 \<noteq> []
compE\<^sub>2 e \<noteq> []
[PROOF STEP]
have compe: "length (compE\<^sub>2 e) > 0"
        and compe1: "length (compE\<^sub>2 e\<^sub>1) > 0"
        and compe2: "length (compE\<^sub>2 e\<^sub>2) > 0"
[PROOF STATE]
proof (prove)
using this:
compE\<^sub>2 e\<^sub>1 \<noteq> []
compE\<^sub>2 e\<^sub>2 \<noteq> []
compE\<^sub>2 e \<noteq> []

goal (1 subgoal):
 1. 0 < length (compE\<^sub>2 e) &&& 0 < length (compE\<^sub>2 e\<^sub>1) &&& 0 < length (compE\<^sub>2 e\<^sub>2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < length (compE\<^sub>2 e)
0 < length (compE\<^sub>2 e\<^sub>1)
0 < length (compE\<^sub>2 e\<^sub>2)

goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have [simp]: "ty E (if (e) e\<^sub>1 else e\<^sub>2) = T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ty E (if (e) e\<^sub>1 else e\<^sub>2) = T
[PROOF STEP]
using Cond
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e :: ?T2; \<D> e ?A2; \ e (length ?E2); length ?ST2 + max_stack e \<le> mxs; length ?E2 + max_vars e \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e, compxE\<^sub>2 e 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e @ [after ?E2 ?A2 ?ST2 e]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>1 :: ?T2; \<D> e\<^sub>1 ?A2; \ e\<^sub>1 (length ?E2); length ?ST2 + max_stack e\<^sub>1 \<le> mxs; length ?E2 + max_vars e\<^sub>1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>1, compxE\<^sub>2 e\<^sub>1 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>1 @ [after ?E2 ?A2 ?ST2 e\<^sub>1]
\<lbrakk>P,?E2 \<turnstile>\<^sub>1 e\<^sub>2 :: ?T2; \<D> e\<^sub>2 ?A2; \ e\<^sub>2 (length ?E2); length ?ST2 + max_stack e\<^sub>2 \<le> mxs; length ?E2 + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ?ST2) [::] ty\<^sub>i' ?ST2 ?E2 ?A2 # compT ?E2 ?A2 ?ST2 e\<^sub>2 @ [after ?E2 ?A2 ?ST2 e\<^sub>2]
P,E \<turnstile>\<^sub>1 if (e) e\<^sub>1 else e\<^sub>2 :: T
\<D> (if (e) e\<^sub>1 else e\<^sub>2) A
\ (if (e) e\<^sub>1 else e\<^sub>2) (length E)
length ST + max_stack (if (e) e\<^sub>1 else e\<^sub>2) \<le> mxs
length E + max_vars (if (e) e\<^sub>1 else e\<^sub>2) \<le> mxl

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

goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?A\<^sub>0 = "A \<squnion> \ e"
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?A\<^sub>2 = "?A\<^sub>0 \<squnion> \ e\<^sub>2"
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?A\<^sub>1 = "?A\<^sub>0 \<squnion> \ e\<^sub>1"
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?A' = "?A\<^sub>0 \<squnion> \ e\<^sub>1 \<sqinter> \ e\<^sub>2"
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?\<tau>\<^sub>2 = "ty\<^sub>i' ST E ?A\<^sub>0"
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?\<tau>' = "ty\<^sub>i' (T#ST) E ?A'"
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
let ?\<tau>s\<^sub>2 = "compT E ?A\<^sub>0 ST e\<^sub>2"
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
have "PROP ?P e\<^sub>2 E T\<^sub>2 ?A\<^sub>0 ST"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2; \<D> e\<^sub>2 (A \<squnion> \ e); \ e\<^sub>2 (length E); length ST + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST e\<^sub>2 @ [after E (A \<squnion> \ e) ST e\<^sub>2]
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2; \<D> e\<^sub>2 (A \<squnion> \ e); \ e\<^sub>2 (length E); length ST + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST e\<^sub>2 @ [after E (A \<squnion> \ e) ST e\<^sub>2]

goal (6 subgoals):
 1. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>x2(x3) :: T; \<D> (x1\<bullet>x2(x3)) A; \ (x1\<bullet>x2(x3)) (length E); length ST + max_stack (x1\<bullet>x2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>x2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>x2(x3)), compxE\<^sub>2 (x1\<bullet>x2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>x2(x3)) @ [after E A ST (x1\<bullet>x2(x3))]
 2. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E Ts A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 [::] Ts; \<D>s x3 A; \s x3 (length E); length ST + max_stacks x3 \<le> mxs; length E + max_varss x3 \<le> mxl\<rbrakk> \<Longrightarrow> let \<tau>s = ty\<^sub>i' ST E A # compTs E A ST x3 in \<turnstile> compEs\<^sub>2 x3, compxEs\<^sub>2 x3 0 (length ST) [::] \<tau>s \<and> last \<tau>s = ty\<^sub>i' (rev Ts @ ST) E (A \<squnion> \s x3); P,E \<turnstile>\<^sub>1 x1\<bullet>\<^sub>sx2(x3) :: T; \<D> (x1\<bullet>\<^sub>sx2(x3)) A; \ (x1\<bullet>\<^sub>sx2(x3)) (length E); length ST + max_stack (x1\<bullet>\<^sub>sx2(x3)) \<le> mxs; length E + max_vars (x1\<bullet>\<^sub>sx2(x3)) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)), compxE\<^sub>2 (x1\<bullet>\<^sub>sx2(x3)) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1\<bullet>\<^sub>sx2(x3)) @ [after E A ST (x1\<bullet>\<^sub>sx2(x3))]
 3. \<And>x1 x2 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; P,E \<turnstile>\<^sub>1 x1;; x2 :: T; \<D> (x1;; x2) A; \ (x1;; x2) (length E); length ST + max_stack (x1;; x2) \<le> mxs; length E + max_vars (x1;; x2) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (x1;; x2), compxE\<^sub>2 (x1;; x2) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (x1;; x2) @ [after E A ST (x1;; x2)]
 4. \<And>x1 x2 x3 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x1 :: T; \<D> x1 A; \ x1 (length E); length ST + max_stack x1 \<le> mxs; length E + max_vars x1 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x1, compxE\<^sub>2 x1 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x1 @ [after E A ST x1]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x3 :: T; \<D> x3 A; \ x3 (length E); length ST + max_stack x3 \<le> mxs; length E + max_vars x3 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x3, compxE\<^sub>2 x3 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x3 @ [after E A ST x3]; P,E \<turnstile>\<^sub>1 if (x1) x2 else x3 :: T; \<D> (if (x1) x2 else x3) A; \ (if (x1) x2 else x3) (length E); length ST + max_stack (if (x1) x2 else x3) \<le> mxs; length E + max_vars (if (x1) x2 else x3) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (if (x1) x2 else x3), compxE\<^sub>2 (if (x1) x2 else x3) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (if (x1) x2 else x3) @ [after E A ST (if (x1) x2 else x3)]
 5. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 INIT x1 (x2,x3) \<leftarrow> x4 :: T; \<D> (INIT x1 (x2,x3) \<leftarrow> x4) A; \ (INIT x1 (x2,x3) \<leftarrow> x4) (length E); length ST + max_stack (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxs; length E + max_vars (INIT x1 (x2,x3) \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4), compxE\<^sub>2 (INIT x1 (x2,x3) \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (INIT x1 (x2,x3) \<leftarrow> x4) @ [after E A ST (INIT x1 (x2,x3) \<leftarrow> x4)]
 6. \<And>x1 x2 x3 x4 E T A ST. \<lbrakk>\<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x2 :: T; \<D> x2 A; \ x2 (length E); length ST + max_stack x2 \<le> mxs; length E + max_vars x2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x2, compxE\<^sub>2 x2 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x2 @ [after E A ST x2]; \<And>E T A ST. \<lbrakk>P,E \<turnstile>\<^sub>1 x4 :: T; \<D> x4 A; \ x4 (length E); length ST + max_stack x4 \<le> mxs; length E + max_vars x4 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 x4, compxE\<^sub>2 x4 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST x4 @ [after E A ST x4]; P,E \<turnstile>\<^sub>1 RI (x1,x2) ; x3 \<leftarrow> x4 :: T; \<D> (RI (x1,x2) ; x3 \<leftarrow> x4) A; \ (RI (x1,x2) ; x3 \<leftarrow> x4) (length E); length ST + max_stack (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxs; length E + max_vars (RI (x1,x2) ; x3 \<leftarrow> x4) \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4), compxE\<^sub>2 (RI (x1,x2) ; x3 \<leftarrow> x4) 0 (length ST) [::] ty\<^sub>i' ST E A # compT E A ST (RI (x1,x2) ; x3 \<leftarrow> x4) @ [after E A ST (RI (x1,x2) ; x3 \<leftarrow> x4)]
[PROOF STEP]
hence "\<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (size ST) [::] (?\<tau>\<^sub>2#?\<tau>s\<^sub>2) @ [ty\<^sub>i' (T\<^sub>2#ST) E ?A\<^sub>2]"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2; \<D> e\<^sub>2 (A \<squnion> \ e); \ e\<^sub>2 (length E); length ST + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST e\<^sub>2 @ [after E (A \<squnion> \ e) ST e\<^sub>2]

goal (1 subgoal):
 1. \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] (ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST e\<^sub>2) @ [ty\<^sub>i' (T\<^sub>2 # ST) E (A \<squnion> \ e \<squnion> \ e\<^sub>2)]
[PROOF STEP]
using Cond.prems wt\<^sub>2
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>P,E \<turnstile>\<^sub>1 e\<^sub>2 :: T\<^sub>2; \<D> e\<^sub>2 (A \<squnion> \ e); \ e\<^sub>2 (length E); length ST + max_stack e\<^sub>2 \<le> mxs; length E + max_vars e\<^sub>2 \<le> mxl\<rbrakk> \<Longrightarrow> \<turnstile> compE\<^sub>2 e\<^sub>2, compxE\<^sub>2 e\<^sub>2 0 (length ST) [::] ty\<^sub>i' ST E (A \<squnion> \ e) # compT E (A \<squnion> \ e) ST e\<^sub>2 @ [after E (A \<squnion> \ e) ST e\<^sub>2]
P,E \<t