induct: fixes G :: "prog"   and x1 :: "'b triple set"   and x2 :: "'b triple set"   and P :: "'b triple set \<Rightarrow> 'b triple set \<Rightarrow> bool" assumes "G,x1|\<turnstile>x2"   and "\<And>A. P A {}"   and "\<And>A t ts. \<lbrakk>G,A\<turnstile>t; P A {t}; G,A|\<turnstile>ts; P A ts\<rbrakk> \<Longrightarrow> P A (insert t ts)"   and "\<And>ts A. ts \<subseteq> A \<Longrightarrow> P A ts"   and "\<And>A ts' ts. \<lbrakk>G,A|\<turnstile>ts'; P A ts'; ts \<subseteq> ts'\<rbrakk> \<Longrightarrow> P A ts"   and "\<And>P A t Q. \<forall>Y s Z. P Y s Z \<longrightarrow> (\<exists>P' Q'. (G,A\<turnstile>{P'} t\<succ> {Q'} \<and> P A {{P'} t\<succ> {Q'}}) \<and> (\<forall>Y' s'. (\<forall>Y Z'. P' Y s Z' \<longrightarrow> Q' Y' s' Z') \<longrightarrow> Q Y' s' Z)) \<Longrightarrow> P A {{P} t\<succ> {Q}}"   and "\<And>A P t Q. P A {{P \<and>. Not \<circ> type_ok G t} t\<succ> {Q}}"   and "\<And>A P t. P A {{P\<leftarrow>undefined3 t \<and>. Not \<circ> normal} t\<succ> {P}}"   and "\<And>A P vn. P A {{Normal (\<lambda>s.. P\<leftarrow>In2 (lvar vn s))} LVar vn=\<succ> {P}}"   and "\<And>A P C Q e stat fn R accC. \<lbrakk>G,A\<turnstile>{Normal P} .Init C. {Q}; P A {{Normal P} .Init C. {Q}}; G,A\<turnstile>{Q} e-\<succ> {\<lambda>Val:a:. fvar C stat fn a ..; R}; P A {{Q} e-\<succ> {\<lambda>Val:a:. fvar C stat fn a ..; R}}\<rbrakk> \<Longrightarrow> P A {{Normal P} {accC,C,stat}e..fn=\<succ> {R}}"   and "\<And>A P e1 Q e2 R. \<lbrakk>G,A\<turnstile>{Normal P} e1-\<succ> {Q}; P A {{Normal P} e1-\<succ> {Q}}; \<forall>a. G,A\<turnstile>{Q\<leftarrow>In1 a} e2-\<succ> {\<lambda>Val:i:. avar G i a ..; R} \<and> P A {{Q\<leftarrow>In1 a} e2-\<succ> {\<lambda>Val:i:. avar G i a ..; R}}\<rbrakk> \<Longrightarrow> P A {{Normal P} e1.[e2]=\<succ> {R}}"   and "\<And>A P C Q. \<lbrakk>G,A\<turnstile>{Normal P} .Init C. {Alloc G (CInst C) Q}; P A {{Normal P} .Init C. {Alloc G (CInst C) Q}}\<rbrakk> \<Longrightarrow> P A {{Normal P} NewC C-\<succ> {Q}}"   and "\<And>A P T Q e R. \<lbrakk>G,A\<turnstile>{Normal P} .init_comp_ty T. {Q}; P A {{Normal P} .init_comp_ty T. {Q}}; G,A\<turnstile>{Q} e-\<succ> {\<lambda>Val:i:. abupd (check_neg i) .; Alloc G (Arr T (the_Intg i)) R}; P A {{Q} e-\<succ> {\<lambda>Val:i:. abupd (check_neg i) .; Alloc G (Arr T (the_Intg i)) R}}\<rbrakk> \<Longrightarrow> P A {{Normal P} New T[e]-\<succ> {R}}"   and "\<And>A P e T Q. \<lbrakk>G,A\<turnstile>{Normal P} e-\<succ> {\<lambda>Val:v:. \<lambda>s.. abupd (raise_if (\<not> G,s\<turnstile>v fits T) ClassCast) .; Q\<leftarrow>In1 v}; P A {{Normal P} e-\<succ> {\<lambda>Val:v:. \<lambda>s.. abupd (raise_if (\<not> G,s\<turnstile>v fits T) ClassCast) .; Q\<leftarrow>In1 v}}\<rbrakk> \<Longrightarrow> P A {{Normal P} Cast T e-\<succ> {Q}}"   and "\<And>A P e Q T. \<lbrakk>G,A\<turnstile>{Normal P} e-\<succ> {\<lambda>Val:v:. \<lambda>s.. Q\<leftarrow>In1 (Bool (v \<noteq> Null \<and> G,s\<turnstile>v fits RefT T))}; P A {{Normal P} e-\<succ> {\<lambda>Val:v:. \<lambda>s.. Q\<leftarrow>In1 (Bool (v \<noteq> Null \<and> G,s\<turnstile>v fits RefT T))}}\<rbrakk> \<Longrightarrow> P A {{Normal P} e InstOf T-\<succ> {Q}}"   and "\<And>A P v. P A {{Normal (P\<leftarrow>In1 v)} Lit v-\<succ> {P}}"   and "\<And>A P e Q unop. \<lbrakk>G,A\<turnstile>{Normal P} e-\<succ> {\<lambda>Val:v:. Q\<leftarrow>In1 (eval_unop unop v)}; P A {{Normal P} e-\<succ> {\<lambda>Val:v:. Q\<leftarrow>In1 (eval_unop unop v)}}\<rbrakk> \<Longrightarrow> P A {{Normal P} UnOp unop e-\<succ> {Q}}"   and "\<And>A P e1 Q binop e2 R. \<lbrakk>G,A\<turnstile>{Normal P} e1-\<succ> {Q}; P A {{Normal P} e1-\<succ> {Q}}; \<forall>v1. G,A\<turnstile>{Q\<leftarrow>In1 v1} (if need_second_arg binop v1 then In1l e2 else In1r Skip)\<succ> {\<lambda>Val:v2:. R\<leftarrow>In1 (eval_binop binop v1 v2)} \<and> P A {{Q\<leftarrow>In1 v1} (if need_second_arg binop v1 then In1l e2 else In1r Skip)\<succ> {\<lambda>Val:v2:. R\<leftarrow>In1 (eval_binop binop v1 v2)}}\<rbrakk> \<Longrightarrow> P A {{Normal P} BinOp binop e1 e2-\<succ> {R}}"   and "\<And>A P. P A {{Normal (\<lambda>s.. P\<leftarrow>In1 (val_this s))} Super-\<succ> {P}}"   and "\<And>A P va Q. \<lbrakk>G,A\<turnstile>{Normal P} va=\<succ> {\<lambda>Var:(v, f):. Q\<leftarrow>In1 v}; P A {{Normal P} va=\<succ> {\<lambda>Var:(v, f):. Q\<leftarrow>In1 v}}\<rbrakk> \<Longrightarrow> P A {{Normal P} Acc va-\<succ> {Q}}"   and "\<And>A P va Q e R. \<lbrakk>G,A\<turnstile>{Normal P} va=\<succ> {Q}; P A {{Normal P} va=\<succ> {Q}}; \<forall>vf. G,A\<turnstile>{Q\<leftarrow>In2 vf} e-\<succ> {\<lambda>Val:v:. assign (snd vf) v .; R} \<and> P A {{Q\<leftarrow>In2 vf} e-\<succ> {\<lambda>Val:v:. assign (snd vf) v .; R}}\<rbrakk> \<Longrightarrow> P A {{Normal P} va:=e-\<succ> {R}}"   and "\<And>A P e0 P' e1 e2 Q. \<lbrakk>G,A\<turnstile>{Normal P} e0-\<succ> {P'}; P A {{Normal P} e0-\<succ> {P'}}; \<forall>b. G,A\<turnstile>{P'\<leftarrow>=b} (if b then e1 else e2)-\<succ> {Q} \<and> P A {{P'\<leftarrow>=b} (if b then e1 else e2)-\<succ> {Q}}\<rbrakk> \<Longrightarrow> P A {{Normal P} e0 ? e1 : e2-\<succ> {Q}}"   and "\<And>A P e Q args R mode statT mn pTs S accC. \<lbrakk>G,A\<turnstile>{Normal P} e-\<succ> {Q}; P A {{Normal P} e-\<succ> {Q}}; \<forall>a. G,A\<turnstile>{Q\<leftarrow>In1 a} args\<doteq>\<succ> {R a} \<and> P A {{Q\<leftarrow>In1 a} args\<doteq>\<succ> {R a}}; \<forall>a vs invC declC l. G,A\<turnstile>{R a\<leftarrow>In3 vs \<and>. (\<lambda>s. declC = invocation_declclass G mode (snd s) a statT \<lparr>name = mn, parTs = pTs\<rparr> \<and> invC = invocation_class mode (snd s) a statT \<and> l = locals (snd s)) ;. init_lvars G declC \<lparr>name = mn, parTs = pTs\<rparr> mode a vs \<and>. (\<lambda>s. normal s \<longrightarrow> G\<turnstile>mode\<rightarrow>invC\<preceq>statT)} Methd declC \<lparr>name = mn, parTs = pTs\<rparr>-\<succ> {set_lvars l .; S} \<and> P A {{R a\<leftarrow>In3 vs \<and>. (\<lambda>s. declC = invocation_declclass G mode (snd s) a statT \<lparr>name = mn, parTs = pTs\<rparr> \<and> invC = invocation_class mode (snd s) a statT \<and> l = locals (snd s)) ;. init_lvars G declC \<lparr>name = mn, parTs = pTs\<rparr> mode a vs \<and>. (\<lambda>s. normal s \<longrightarrow> G\<turnstile>mode\<rightarrow>invC\<preceq>statT)} Methd declC \<lparr>name = mn, parTs = pTs\<rparr>-\<succ> {set_lvars l .; S}}\<rbrakk> \<Longrightarrow> P A {{Normal P} {accC,statT,mode}e\<cdot>mn( {pTs}args)-\<succ> {S}}"   and "\<And>A P Q ms. \<lbrakk>G,A \<union> {{P} Methd-\<succ> {Q} | ms}|\<turnstile>{{P} body G-\<succ> {Q} | ms}; P (A \<union> {{P} Methd-\<succ> {Q} | ms}) ({{P} body G-\<succ> {Q} | ms})\<rbrakk> \<Longrightarrow> P A ({{P} Methd-\<succ> {Q} | ms})"   and "\<And>A P D Q c R. \<lbrakk>G,A\<turnstile>{Normal P} .Init D. {Q}; P A {{Normal P} .Init D. {Q}}; G,A\<turnstile>{Q} .c. {\<lambda>s.. abupd (absorb Ret) .; R\<leftarrow>In1 (the (locals s Result))}; P A {{Q} .c. {\<lambda>s.. abupd (absorb Ret) .; R\<leftarrow>In1 (the (locals s Result))}}\<rbrakk> \<Longrightarrow> P A {{Normal P} Body D c-\<succ> {R}}"   and "\<And>A P. P A {{Normal (P\<leftarrow>In3 [])} []\<doteq>\<succ> {P}}"   and "\<And>A P e Q es R. \<lbrakk>G,A\<turnstile>{Normal P} e-\<succ> {Q}; P A {{Normal P} e-\<succ> {Q}}; \<forall>v. G,A\<turnstile>{Q\<leftarrow>In1 v} es\<doteq>\<succ> {\<lambda>Vals:vs:. R\<leftarrow>In3 (v # vs)} \<and> P A {{Q\<leftarrow>In1 v} es\<doteq>\<succ> {\<lambda>Vals:vs:. R\<leftarrow>In3 (v # vs)}}\<rbrakk> \<Longrightarrow> P A {{Normal P} e # es\<doteq>\<succ> {R}}"   and "\<And>A P. P A {{Normal (P\<leftarrow>\<diamondsuit>)} .Skip. {P}}"   and "\<And>A P e Q. \<lbrakk>G,A\<turnstile>{Normal P} e-\<succ> {Q\<leftarrow>\<diamondsuit>}; P A {{Normal P} e-\<succ> {Q\<leftarrow>\<diamondsuit>}}\<rbrakk> \<Longrightarrow> P A {{Normal P} .Expr e. {Q}}"   and "\<And>A P c l Q. \<lbrakk>G,A\<turnstile>{Normal P} .c. {abupd (absorb l) .; Q}; P A {{Normal P} .c. {abupd (absorb l) .; Q}}\<rbrakk> \<Longrightarrow> P A {{Normal P} .l\<bullet> c. {Q}}"   and "\<And>A P c1 Q c2 R. \<lbrakk>G,A\<turnstile>{Normal P} .c1. {Q}; P A {{Normal P} .c1. {Q}}; G,A\<turnstile>{Q} .c2. {R}; P A {{Q} .c2. {R}}\<rbrakk> \<Longrightarrow> P A {{Normal P} .c1;; c2. {R}}"   and "\<And>A P e P' c1 c2 Q. \<lbrakk>G,A\<turnstile>{Normal P} e-\<succ> {P'}; P A {{Normal P} e-\<succ> {P'}}; \<forall>b. G,A\<turnstile>{P'\<leftarrow>=b} .(if b then c1 else c2). {Q} \<and> P A {{P'\<leftarrow>=b} .(if b then c1 else c2). {Q}}\<rbrakk> \<Longrightarrow> P A {{Normal P} .If(e) c1 Else c2. {Q}}"   and "\<And>A P e P' c l. \<lbrakk>G,A\<turnstile>{P} e-\<succ> {P'}; P A {{P} e-\<succ> {P'}}; G,A\<turnstile>{Normal (P'\<leftarrow>=True)} .c. {abupd (absorb (Cont l)) .; P}; P A {{Normal (P'\<leftarrow>=True)} .c. {abupd (absorb (Cont l)) .; P}}\<rbrakk> \<Longrightarrow> P A {{P} .l\<bullet> While(e) c. {P'\<leftarrow>=False\<down>=\<diamondsuit>}}"   and "\<And>A j P. P A {{Normal (abupd (\<lambda>a. Some (Jump j)) .; P\<leftarrow>\<diamondsuit>)} .Jmp j. {P}}"   and "\<And>A P e Q. \<lbrakk>G,A\<turnstile>{Normal P} e-\<succ> {\<lambda>Val:a:. abupd (throw a) .; Q\<leftarrow>\<diamondsuit>}; P A {{Normal P} e-\<succ> {\<lambda>Val:a:. abupd (throw a) .; Q\<leftarrow>\<diamondsuit>}}\<rbrakk> \<Longrightarrow> P A {{Normal P} .Throw e. {Q}}"   and "\<And>A P c1 Q C vn c2 R. \<lbrakk>G,A\<turnstile>{Normal P} .c1. {SXAlloc G Q}; P A {{Normal P} .c1. {SXAlloc G Q}}; G,A\<turnstile>{Q \<and>. (\<lambda>s. G,s\<turnstile>catch C) ;. new_xcpt_var vn} .c2. {R}; P A {{Q \<and>. (\<lambda>s. G,s\<turnstile>catch C) ;. new_xcpt_var vn} .c2. {R}}; (Q \<and>. (\<lambda>s. \<not> G,s\<turnstile>catch C)) \<Rightarrow> R\<rbrakk> \<Longrightarrow> P A {{Normal P} .Try c1 Catch(C vn) c2. {R}}"   and "\<And>A P c1 Q c2 R. \<lbrakk>G,A\<turnstile>{Normal P} .c1. {Q}; P A {{Normal P} .c1. {Q}}; \<forall>x. G,A\<turnstile>{Q \<and>. (\<lambda>s. x = fst s) ;. abupd Map.empty} .c2. {abupd (abrupt_if (x \<noteq> None) x) .; R} \<and> P A {{Q \<and>. (\<lambda>s. x = fst s) ;. abupd Map.empty} .c2. {abupd (abrupt_if (x \<noteq> None) x) .; R}}\<rbrakk> \<Longrightarrow> P A {{Normal P} .c1 Finally c2. {R}}"   and "\<And>A P C. P A {{Normal (P\<leftarrow>\<diamondsuit> \<and>. initd C)} .Init C. {P}}"   and "\<And>C c A P Q R. \<lbrakk>the (class G C) = c; G,A\<turnstile>{Normal (P \<and>. Not \<circ> initd C ;. supd (init_class_obj G C))} .(if C = Object then Skip else Init (super c)). {Q}; P A {{Normal (P \<and>. Not \<circ> initd C ;. supd (init_class_obj G C))} .(if C = Object then Skip else Init (super c)). {Q}}; \<forall>l. G,A\<turnstile>{Q \<and>. (\<lambda>s. l = locals (snd s)) ;. set_lvars Map.empty} .init c. {set_lvars l .; R} \<and> P A {{Q \<and>. (\<lambda>s. l = locals (snd s)) ;. set_lvars Map.empty} .init c. {set_lvars l .; R}}\<rbrakk> \<Longrightarrow> P A {{Normal (P \<and>. Not \<circ> initd C)} .Init C. {R}}"   and "\<And>A P c v Q. P A {{Normal P} InsInitV c v=\<succ> {Q}}"   and "\<And>A P c e Q. P A {{Normal P} InsInitE c e-\<succ> {Q}}"   and "\<And>A P l e Q. P A {{Normal P} Callee l e-\<succ> {Q}}"   and "\<And>A P a c Q. P A {{Normal P} .FinA a c. {Q}}" shows "P x1 x2"