[STATEMENT]
lemma arity_tranform_safe:
    fixes c c'
    assumes "c \<Rightarrow>\<^sup>* c'" and "\<not> boring_step c'" and "heap_upds_ok_conf c" and "consistent (ae,a,as) c"
    shows "\<exists>ae' a' as'. consistent (ae',a',as') c' \<and> a_transform (ae,a,as) c \<Rightarrow>\<^sup>* a_transform (ae',a',as') c'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'
[PROOF STEP]
using assms(1,2) heap_upds_ok_invariant assms(3-)
[PROOF STATE]
proof (prove)
using this:
c \<Rightarrow>\<^sup>* c'
\<not> boring_step c'
invariant (\<Rightarrow>) heap_upds_ok_conf
heap_upds_ok_conf c
consistent (ae, a, as) c

goal (1 subgoal):
 1. \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'
[PROOF STEP]
proof(induction c c' arbitrary: ae a as rule:step_invariant_induction)
[PROOF STATE]
proof (state)
goal (10 subgoals):
 1. \<And>\<Gamma> e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, App e x, S); consistent (ae, a, as) (\<Gamma>, App e x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e, Arg x # S) \<and> a_transform (ae, a, as) (\<Gamma>, App e x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e, Arg x # S)
 2. \<And>\<Gamma> y e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Lam [y]. e, Arg x # S); consistent (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e[y::=x], S) \<and> a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e[y::=x], S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 4. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 5. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 6. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 7. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 8. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 9. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 10. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
case (app\<^sub>1 \<Gamma> e x S)
[PROOF STATE]
proof (state)
this:
heap_upds_ok_conf (\<Gamma>, App e x, S)
consistent (ae, a, as) (\<Gamma>, App e x, S)

goal (10 subgoals):
 1. \<And>\<Gamma> e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, App e x, S); consistent (ae, a, as) (\<Gamma>, App e x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e, Arg x # S) \<and> a_transform (ae, a, as) (\<Gamma>, App e x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e, Arg x # S)
 2. \<And>\<Gamma> y e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Lam [y]. e, Arg x # S); consistent (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e[y::=x], S) \<and> a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e[y::=x], S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 4. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 5. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 6. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 7. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 8. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 9. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 10. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from app\<^sub>1
[PROOF STATE]
proof (chain)
picking this:
heap_upds_ok_conf (\<Gamma>, App e x, S)
consistent (ae, a, as) (\<Gamma>, App e x, S)
[PROOF STEP]
have "consistent (ae, inc\<cdot>a, as) (\<Gamma>, e, Arg x # S)"
[PROOF STATE]
proof (prove)
using this:
heap_upds_ok_conf (\<Gamma>, App e x, S)
consistent (ae, a, as) (\<Gamma>, App e x, S)

goal (1 subgoal):
 1. consistent (ae, inc\<cdot>a, as) (\<Gamma>, e, Arg x # S)
[PROOF STEP]
by (auto intro: a_consistent_app\<^sub>1)
[PROOF STATE]
proof (state)
this:
consistent (ae, inc\<cdot>a, as) (\<Gamma>, e, Arg x # S)

goal (10 subgoals):
 1. \<And>\<Gamma> e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, App e x, S); consistent (ae, a, as) (\<Gamma>, App e x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e, Arg x # S) \<and> a_transform (ae, a, as) (\<Gamma>, App e x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e, Arg x # S)
 2. \<And>\<Gamma> y e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Lam [y]. e, Arg x # S); consistent (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e[y::=x], S) \<and> a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e[y::=x], S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 4. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 5. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 6. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 7. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 8. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 9. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 10. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
consistent (ae, inc\<cdot>a, as) (\<Gamma>, e, Arg x # S)

goal (10 subgoals):
 1. \<And>\<Gamma> e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, App e x, S); consistent (ae, a, as) (\<Gamma>, App e x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e, Arg x # S) \<and> a_transform (ae, a, as) (\<Gamma>, App e x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e, Arg x # S)
 2. \<And>\<Gamma> y e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Lam [y]. e, Arg x # S); consistent (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e[y::=x], S) \<and> a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e[y::=x], S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 4. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 5. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 6. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 7. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 8. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 9. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 10. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "a_transform (ae, a, as) (\<Gamma>, App e x, S) \<Rightarrow> a_transform (ae, inc\<cdot>a, as) (\<Gamma>, e, Arg x # S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a_transform (ae, a, as) (\<Gamma>, App e x, S) \<Rightarrow> a_transform (ae, inc\<cdot>a, as) (\<Gamma>, e, Arg x # S)
[PROOF STEP]
by simp rule
[PROOF STATE]
proof (state)
this:
a_transform (ae, a, as) (\<Gamma>, App e x, S) \<Rightarrow> a_transform (ae, inc\<cdot>a, as) (\<Gamma>, e, Arg x # S)

goal (10 subgoals):
 1. \<And>\<Gamma> e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, App e x, S); consistent (ae, a, as) (\<Gamma>, App e x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e, Arg x # S) \<and> a_transform (ae, a, as) (\<Gamma>, App e x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e, Arg x # S)
 2. \<And>\<Gamma> y e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Lam [y]. e, Arg x # S); consistent (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e[y::=x], S) \<and> a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e[y::=x], S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 4. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 5. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 6. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 7. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 8. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 9. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 10. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
consistent (ae, inc\<cdot>a, as) (\<Gamma>, e, Arg x # S)
a_transform (ae, a, as) (\<Gamma>, App e x, S) \<Rightarrow> a_transform (ae, inc\<cdot>a, as) (\<Gamma>, e, Arg x # S)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
consistent (ae, inc\<cdot>a, as) (\<Gamma>, e, Arg x # S)
a_transform (ae, a, as) (\<Gamma>, App e x, S) \<Rightarrow> a_transform (ae, inc\<cdot>a, as) (\<Gamma>, e, Arg x # S)

goal (1 subgoal):
 1. \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e, Arg x # S) \<and> a_transform (ae, a, as) (\<Gamma>, App e x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e, Arg x # S)
[PROOF STEP]
by (blast del: consistentI consistentE)
[PROOF STATE]
proof (state)
this:
\<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e, Arg x # S) \<and> a_transform (ae, a, as) (\<Gamma>, App e x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e, Arg x # S)

goal (9 subgoals):
 1. \<And>\<Gamma> y e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Lam [y]. e, Arg x # S); consistent (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e[y::=x], S) \<and> a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e[y::=x], S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 4. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 5. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 6. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 7. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 8. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 9. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (9 subgoals):
 1. \<And>\<Gamma> y e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Lam [y]. e, Arg x # S); consistent (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e[y::=x], S) \<and> a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e[y::=x], S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 4. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 5. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 6. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 7. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 8. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 9. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
case (app\<^sub>2 \<Gamma> y e x S)
[PROOF STATE]
proof (state)
this:
heap_upds_ok_conf (\<Gamma>, Lam [y]. e, Arg x # S)
consistent (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S)

goal (9 subgoals):
 1. \<And>\<Gamma> y e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Lam [y]. e, Arg x # S); consistent (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e[y::=x], S) \<and> a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e[y::=x], S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 4. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 5. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 6. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 7. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 8. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 9. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "consistent (ae, pred\<cdot>a, as) (\<Gamma>, e[y::=x], S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. consistent (ae, pred\<cdot>a, as) (\<Gamma>, e[y::=x], S)
[PROOF STEP]
using app\<^sub>2
[PROOF STATE]
proof (prove)
using this:
heap_upds_ok_conf (\<Gamma>, Lam [y]. e, Arg x # S)
consistent (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S)

goal (1 subgoal):
 1. consistent (ae, pred\<cdot>a, as) (\<Gamma>, e[y::=x], S)
[PROOF STEP]
by (auto 4 3 intro: a_consistent_app\<^sub>2)
[PROOF STATE]
proof (state)
this:
consistent (ae, pred\<cdot>a, as) (\<Gamma>, e[y::=x], S)

goal (9 subgoals):
 1. \<And>\<Gamma> y e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Lam [y]. e, Arg x # S); consistent (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e[y::=x], S) \<and> a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e[y::=x], S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 4. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 5. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 6. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 7. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 8. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 9. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
consistent (ae, pred\<cdot>a, as) (\<Gamma>, e[y::=x], S)

goal (9 subgoals):
 1. \<And>\<Gamma> y e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Lam [y]. e, Arg x # S); consistent (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e[y::=x], S) \<and> a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e[y::=x], S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 4. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 5. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 6. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 7. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 8. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 9. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow> a_transform (ae, pred \<cdot> a, as) (\<Gamma>, e[y::=x], S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow> a_transform (ae, pred\<cdot>a, as) (\<Gamma>, e[y::=x], S)
[PROOF STEP]
by (simp add: subst_transform[symmetric]) rule
[PROOF STATE]
proof (state)
this:
a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow> a_transform (ae, pred\<cdot>a, as) (\<Gamma>, e[y::=x], S)

goal (9 subgoals):
 1. \<And>\<Gamma> y e x S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Lam [y]. e, Arg x # S); consistent (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e[y::=x], S) \<and> a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e[y::=x], S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 4. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 5. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 6. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 7. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 8. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 9. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
consistent (ae, pred\<cdot>a, as) (\<Gamma>, e[y::=x], S)
a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow> a_transform (ae, pred\<cdot>a, as) (\<Gamma>, e[y::=x], S)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
consistent (ae, pred\<cdot>a, as) (\<Gamma>, e[y::=x], S)
a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow> a_transform (ae, pred\<cdot>a, as) (\<Gamma>, e[y::=x], S)

goal (1 subgoal):
 1. \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e[y::=x], S) \<and> a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e[y::=x], S)
[PROOF STEP]
by (blast  del: consistentI consistentE)
[PROOF STATE]
proof (state)
this:
\<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, e[y::=x], S) \<and> a_transform (ae, a, as) (\<Gamma>, Lam [y]. e, Arg x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, e[y::=x], S)

goal (8 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 4. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 5. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 6. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 7. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 8. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 4. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 5. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 6. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 7. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 8. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
case (thunk \<Gamma> x e S)
[PROOF STATE]
proof (state)
this:
map_of \<Gamma> x = Some e
\<not> isVal e
heap_upds_ok_conf (\<Gamma>, Var x, S)
consistent (ae, a, as) (\<Gamma>, Var x, S)

goal (8 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 4. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 5. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 6. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 7. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 8. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
hence "x \<in> thunks \<Gamma>"
[PROOF STATE]
proof (prove)
using this:
map_of \<Gamma> x = Some e
\<not> isVal e
heap_upds_ok_conf (\<Gamma>, Var x, S)
consistent (ae, a, as) (\<Gamma>, Var x, S)

goal (1 subgoal):
 1. x \<in> thunks \<Gamma>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> thunks \<Gamma>

goal (8 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 4. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 5. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 6. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 7. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 8. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
hence [simp]: "x \<in> domA \<Gamma>"
[PROOF STATE]
proof (prove)
using this:
x \<in> thunks \<Gamma>

goal (1 subgoal):
 1. x \<in> domA \<Gamma>
[PROOF STEP]
by (rule subsetD[OF thunks_domA])
[PROOF STATE]
proof (state)
this:
x \<in> domA \<Gamma>

goal (8 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 4. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 5. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 6. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 7. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 8. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from \<open>heap_upds_ok_conf (\<Gamma>, Var x, S)\<close>
[PROOF STATE]
proof (chain)
picking this:
heap_upds_ok_conf (\<Gamma>, Var x, S)
[PROOF STEP]
have "x \<notin> upds S"
[PROOF STATE]
proof (prove)
using this:
heap_upds_ok_conf (\<Gamma>, Var x, S)

goal (1 subgoal):
 1. x \<notin> upds S
[PROOF STEP]
by (auto dest!: heap_upds_okE)
[PROOF STATE]
proof (state)
this:
x \<notin> upds S

goal (8 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 4. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 5. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 6. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 7. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 8. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "x \<in> edom ae"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> edom ae
[PROOF STEP]
using thunk
[PROOF STATE]
proof (prove)
using this:
map_of \<Gamma> x = Some e
\<not> isVal e
heap_upds_ok_conf (\<Gamma>, Var x, S)
consistent (ae, a, as) (\<Gamma>, Var x, S)

goal (1 subgoal):
 1. x \<in> edom ae
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> edom ae

goal (8 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 4. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 5. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 6. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 7. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 8. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "ae x = up\<cdot>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ae x = up\<cdot>0
[PROOF STEP]
using thunk \<open>x \<in> thunks \<Gamma>\<close>
[PROOF STATE]
proof (prove)
using this:
map_of \<Gamma> x = Some e
\<not> isVal e
heap_upds_ok_conf (\<Gamma>, Var x, S)
consistent (ae, a, as) (\<Gamma>, Var x, S)
x \<in> thunks \<Gamma>

goal (1 subgoal):
 1. ae x = up\<cdot>0
[PROOF STEP]
by (auto)
[PROOF STATE]
proof (state)
this:
ae x = up\<cdot>0

goal (8 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 4. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 5. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 6. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 7. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 8. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "a_consistent (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a_consistent (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)
[PROOF STEP]
using thunk \<open>ae x = up\<cdot>0\<close>
[PROOF STATE]
proof (prove)
using this:
map_of \<Gamma> x = Some e
\<not> isVal e
heap_upds_ok_conf (\<Gamma>, Var x, S)
consistent (ae, a, as) (\<Gamma>, Var x, S)
ae x = up\<cdot>0

goal (1 subgoal):
 1. a_consistent (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)
[PROOF STEP]
by (auto intro!: a_consistent_thunk_0 simp del: restr_delete)
[PROOF STATE]
proof (state)
this:
a_consistent (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)

goal (8 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 4. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 5. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 6. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 7. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 8. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
hence "consistent (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)"
[PROOF STATE]
proof (prove)
using this:
a_consistent (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)

goal (1 subgoal):
 1. consistent (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)
[PROOF STEP]
using thunk \<open>ae x = up\<cdot>0\<close>
[PROOF STATE]
proof (prove)
using this:
a_consistent (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)
map_of \<Gamma> x = Some e
\<not> isVal e
heap_upds_ok_conf (\<Gamma>, Var x, S)
consistent (ae, a, as) (\<Gamma>, Var x, S)
ae x = up\<cdot>0

goal (1 subgoal):
 1. consistent (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)
[PROOF STEP]
by (auto simp add:  restr_delete_twist)
[PROOF STATE]
proof (state)
this:
consistent (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)

goal (8 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 4. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 5. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 6. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 7. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 8. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
consistent (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)

goal (8 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 4. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 5. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 6. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 7. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 8. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from  \<open>map_of \<Gamma> x = Some e\<close> \<open>ae x = up\<cdot>0\<close>
[PROOF STATE]
proof (chain)
picking this:
map_of \<Gamma> x = Some e
ae x = up\<cdot>0
[PROOF STEP]
have "map_of (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)) x = Some (transform 0 e)"
[PROOF STATE]
proof (prove)
using this:
map_of \<Gamma> x = Some e
ae x = up\<cdot>0

goal (1 subgoal):
 1. map_of (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)) x = Some (ccTransform 0 e)
[PROOF STEP]
by (simp add: map_of_map_transform)
[PROOF STATE]
proof (state)
this:
map_of (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)) x = Some (ccTransform 0 e)

goal (8 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 4. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 5. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 6. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 7. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 8. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
with \<open>\<not> isVal e\<close>
[PROOF STATE]
proof (chain)
picking this:
\<not> isVal e
map_of (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)) x = Some (ccTransform 0 e)
[PROOF STEP]
have "a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow> a_transform (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)"
[PROOF STATE]
proof (prove)
using this:
\<not> isVal e
map_of (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)) x = Some (ccTransform 0 e)

goal (1 subgoal):
 1. a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow> a_transform (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)
[PROOF STEP]
by (auto simp add: map_transform_delete restr_delete_twist intro!: step.intros  simp del: restr_delete)
[PROOF STATE]
proof (state)
this:
a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow> a_transform (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)

goal (8 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; \<not> isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 3. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 4. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 5. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 6. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 7. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 8. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
consistent (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)
a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow> a_transform (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
consistent (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)
a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow> a_transform (ae, 0, as) (delete x \<Gamma>, e, Upd x # S)

goal (1 subgoal):
 1. \<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)
[PROOF STEP]
by (blast del: consistentI consistentE)
[PROOF STATE]
proof (state)
this:
\<exists>ae' a' as'. consistent (ae', a', as') (delete x \<Gamma>, e, Upd x # S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (delete x \<Gamma>, e, Upd x # S)

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
case (lamvar \<Gamma> x e S)
[PROOF STATE]
proof (state)
this:
map_of \<Gamma> x = Some e
isVal e
heap_upds_ok_conf (\<Gamma>, Var x, S)
consistent (ae, a, as) (\<Gamma>, Var x, S)

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from lamvar(1)
[PROOF STATE]
proof (chain)
picking this:
map_of \<Gamma> x = Some e
[PROOF STEP]
have [simp]: "x \<in> domA \<Gamma>"
[PROOF STATE]
proof (prove)
using this:
map_of \<Gamma> x = Some e

goal (1 subgoal):
 1. x \<in> domA \<Gamma>
[PROOF STEP]
by (metis domI dom_map_of_conv_domA)
[PROOF STATE]
proof (state)
this:
x \<in> domA \<Gamma>

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "up\<cdot>a \<sqsubseteq> (Aexp (Var x)\<cdot>a f|` (domA \<Gamma> \<union> upds S)) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. up\<cdot>a \<sqsubseteq> (\<A>\<^bsub>a\<^esub> (Var x) f|` (domA \<Gamma> \<union> upds S)) x
[PROOF STEP]
by (simp) (rule Aexp_Var)
[PROOF STATE]
proof (state)
this:
up\<cdot>a \<sqsubseteq> (\<A>\<^bsub>a\<^esub> (Var x) f|` (domA \<Gamma> \<union> upds S)) x

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
up\<cdot>a \<sqsubseteq> (\<A>\<^bsub>a\<^esub> (Var x) f|` (domA \<Gamma> \<union> upds S)) x

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from lamvar
[PROOF STATE]
proof (chain)
picking this:
map_of \<Gamma> x = Some e
isVal e
heap_upds_ok_conf (\<Gamma>, Var x, S)
consistent (ae, a, as) (\<Gamma>, Var x, S)
[PROOF STEP]
have "Aexp (Var x)\<cdot>a f|` (domA \<Gamma> \<union> upds S) \<sqsubseteq> ae"
[PROOF STATE]
proof (prove)
using this:
map_of \<Gamma> x = Some e
isVal e
heap_upds_ok_conf (\<Gamma>, Var x, S)
consistent (ae, a, as) (\<Gamma>, Var x, S)

goal (1 subgoal):
 1. \<A>\<^bsub>a\<^esub> (Var x) f|` (domA \<Gamma> \<union> upds S) \<sqsubseteq> ae
[PROOF STEP]
by (auto simp add: join_below_iff env_restr_join a_consistent.simps)
[PROOF STATE]
proof (state)
this:
\<A>\<^bsub>a\<^esub> (Var x) f|` (domA \<Gamma> \<union> upds S) \<sqsubseteq> ae

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cont (\<lambda>a. a x) \<Longrightarrow> up\<cdot>a \<sqsubseteq> ae x
[PROOF STEP]
obtain u where "ae x = up\<cdot>u"
[PROOF STATE]
proof (prove)
using this:
cont (\<lambda>a. a x) \<Longrightarrow> up\<cdot>a \<sqsubseteq> ae x

goal (1 subgoal):
 1. (\<And>u. ae x = up\<cdot>u \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases "ae x") (auto simp add: edom_def)
[PROOF STATE]
proof (state)
this:
ae x = up\<cdot>u

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
hence "x \<in> edom ae"
[PROOF STATE]
proof (prove)
using this:
ae x = up\<cdot>u

goal (1 subgoal):
 1. x \<in> edom ae
[PROOF STEP]
by (auto simp add: edomIff)
[PROOF STATE]
proof (state)
this:
x \<in> edom ae

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "a_consistent (ae, u, as) ((x,e) # delete x \<Gamma>, e, S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a_consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)
[PROOF STEP]
using lamvar \<open>ae x = up\<cdot>u\<close>
[PROOF STATE]
proof (prove)
using this:
map_of \<Gamma> x = Some e
isVal e
heap_upds_ok_conf (\<Gamma>, Var x, S)
consistent (ae, a, as) (\<Gamma>, Var x, S)
ae x = up\<cdot>u

goal (1 subgoal):
 1. a_consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)
[PROOF STEP]
by (auto intro!: a_consistent_lamvar simp del: restr_delete)
[PROOF STATE]
proof (state)
this:
a_consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
hence "consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)"
[PROOF STATE]
proof (prove)
using this:
a_consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)

goal (1 subgoal):
 1. consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)
[PROOF STEP]
using lamvar
[PROOF STATE]
proof (prove)
using this:
a_consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)
map_of \<Gamma> x = Some e
isVal e
heap_upds_ok_conf (\<Gamma>, Var x, S)
consistent (ae, a, as) (\<Gamma>, Var x, S)

goal (1 subgoal):
 1. consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)
[PROOF STEP]
by (auto simp add:  thunks_Cons restr_delete_twist elim: below_trans)
[PROOF STATE]
proof (state)
this:
consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from \<open>a_consistent _ _\<close>
[PROOF STATE]
proof (chain)
picking this:
a_consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)
[PROOF STEP]
have "Astack (transform_alts as S) \<sqsubseteq> u"
[PROOF STATE]
proof (prove)
using this:
a_consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)

goal (1 subgoal):
 1. Astack (transform_alts as S) \<sqsubseteq> u
[PROOF STEP]
by (auto elim: a_consistent_stackD)
[PROOF STATE]
proof (state)
this:
Astack (transform_alts as S) \<sqsubseteq> u

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
Astack (transform_alts as S) \<sqsubseteq> u

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from \<open>isVal e\<close>
[PROOF STATE]
proof (chain)
picking this:
isVal e
[PROOF STEP]
have "isVal (transform u e)"
[PROOF STATE]
proof (prove)
using this:
isVal e

goal (1 subgoal):
 1. isVal (ccTransform u e)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
isVal (ccTransform u e)

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
hence "isVal (Aeta_expand u (transform u e))"
[PROOF STATE]
proof (prove)
using this:
isVal (ccTransform u e)

goal (1 subgoal):
 1. isVal (Aeta_expand u (ccTransform u e))
[PROOF STEP]
by (rule isVal_Aeta_expand)
[PROOF STATE]
proof (state)
this:
isVal (Aeta_expand u (ccTransform u e))

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
isVal (Aeta_expand u (ccTransform u e))

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from  \<open>map_of \<Gamma> x = Some e\<close>  \<open>ae x = up \<cdot> u\<close>  \<open>isVal (transform u e)\<close>
[PROOF STATE]
proof (chain)
picking this:
map_of \<Gamma> x = Some e
ae x = up\<cdot>u
isVal (ccTransform u e)
[PROOF STEP]
have "map_of (map_transform Aeta_expand ae (map_transform transform ae \<Gamma>)) x = Some (Aeta_expand u (transform u e))"
[PROOF STATE]
proof (prove)
using this:
map_of \<Gamma> x = Some e
ae x = up\<cdot>u
isVal (ccTransform u e)

goal (1 subgoal):
 1. map_of (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)) x = Some (Aeta_expand u (ccTransform u e))
[PROOF STEP]
by (simp add: map_of_map_transform)
[PROOF STATE]
proof (state)
this:
map_of (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)) x = Some (Aeta_expand u (ccTransform u e))

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
isVal (Aeta_expand u (ccTransform u e))
map_of (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)) x = Some (Aeta_expand u (ccTransform u e))
[PROOF STEP]
have "a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>*
          ((x, Aeta_expand u (transform u e)) # delete x (map_transform Aeta_expand ae (map_transform transform ae \<Gamma>)), Aeta_expand u (transform u e), transform_alts as S)"
[PROOF STATE]
proof (prove)
using this:
isVal (Aeta_expand u (ccTransform u e))
map_of (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)) x = Some (Aeta_expand u (ccTransform u e))

goal (1 subgoal):
 1. a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* ((x, Aeta_expand u (ccTransform u e)) # delete x (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)), Aeta_expand u (ccTransform u e), transform_alts as S)
[PROOF STEP]
by (auto intro: lambda_var simp del: restr_delete)
[PROOF STATE]
proof (state)
this:
a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* ((x, Aeta_expand u (ccTransform u e)) # delete x (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)), Aeta_expand u (ccTransform u e), transform_alts as S)

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* ((x, Aeta_expand u (ccTransform u e)) # delete x (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)), Aeta_expand u (ccTransform u e), transform_alts as S)

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "\<dots> = ((map_transform Aeta_expand ae (map_transform transform ae ((x,e) # delete x \<Gamma>))), Aeta_expand u (transform u e), transform_alts as S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((x, Aeta_expand u (ccTransform u e)) # delete x (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)), Aeta_expand u (ccTransform u e), transform_alts as S) = (map_transform Aeta_expand ae (map_transform ccTransform ae ((x, e) # delete x \<Gamma>)), Aeta_expand u (ccTransform u e), transform_alts as S)
[PROOF STEP]
using \<open>ae x = up \<cdot> u\<close> \<open>isVal (transform u e)\<close>
[PROOF STATE]
proof (prove)
using this:
ae x = up\<cdot>u
isVal (ccTransform u e)

goal (1 subgoal):
 1. ((x, Aeta_expand u (ccTransform u e)) # delete x (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)), Aeta_expand u (ccTransform u e), transform_alts as S) = (map_transform Aeta_expand ae (map_transform ccTransform ae ((x, e) # delete x \<Gamma>)), Aeta_expand u (ccTransform u e), transform_alts as S)
[PROOF STEP]
by (simp add: map_transform_Cons map_transform_delete  del: restr_delete)
[PROOF STATE]
proof (state)
this:
((x, Aeta_expand u (ccTransform u e)) # delete x (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)), Aeta_expand u (ccTransform u e), transform_alts as S) = (map_transform Aeta_expand ae (map_transform ccTransform ae ((x, e) # delete x \<Gamma>)), Aeta_expand u (ccTransform u e), transform_alts as S)

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
also(subst[rotated])
[PROOF STATE]
proof (state)
this:
((x, Aeta_expand u (ccTransform u e)) # delete x (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)), Aeta_expand u (ccTransform u e), transform_alts as S) = (map_transform Aeta_expand ae (map_transform ccTransform ae ((x, e) # delete x \<Gamma>)), Aeta_expand u (ccTransform u e), transform_alts as S)

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "\<dots> \<Rightarrow>\<^sup>* a_transform (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (map_transform Aeta_expand ae (map_transform ccTransform ae ((x, e) # delete x \<Gamma>)), Aeta_expand u (ccTransform u e), transform_alts as S) \<Rightarrow>\<^sup>* a_transform (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)
[PROOF STEP]
by (simp add: restr_delete_twist) (rule Aeta_expand_safe[OF \<open>Astack _ \<sqsubseteq> u\<close>])
[PROOF STATE]
proof (state)
this:
(map_transform Aeta_expand ae (map_transform ccTransform ae ((x, e) # delete x \<Gamma>)), Aeta_expand u (ccTransform u e), transform_alts as S) \<Rightarrow>\<^sup>* a_transform (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
finally(rtranclp_trans)
[PROOF STATE]
proof (chain)
picking this:
a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)
[PROOF STEP]
have "a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)"
[PROOF STATE]
proof (prove)
using this:
a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)

goal (1 subgoal):
 1. a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)

goal (7 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>map_of \<Gamma> x = Some e; isVal e; heap_upds_ok_conf (\<Gamma>, Var x, S); consistent (ae, a, as) (\<Gamma>, Var x, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
 2. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 3. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 4. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 5. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 6. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 7. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)
a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
consistent (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)
a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae, u, as) ((x, e) # delete x \<Gamma>, e, S)

goal (1 subgoal):
 1. \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)
[PROOF STEP]
by (blast del: consistentI consistentE)
[PROOF STATE]
proof (state)
this:
\<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # delete x \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Var x, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # delete x \<Gamma>, e, S)

goal (6 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 2. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 3. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 4. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 5. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 6. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 2. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 3. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 4. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 5. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 6. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
case (var\<^sub>2 \<Gamma> x e S)
[PROOF STATE]
proof (state)
this:
x \<notin> domA \<Gamma>
isVal e
heap_upds_ok_conf (\<Gamma>, e, Upd x # S)
consistent (ae, a, as) (\<Gamma>, e, Upd x # S)

goal (6 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 2. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 3. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 4. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 5. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 6. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from var\<^sub>2
[PROOF STATE]
proof (chain)
picking this:
x \<notin> domA \<Gamma>
isVal e
heap_upds_ok_conf (\<Gamma>, e, Upd x # S)
consistent (ae, a, as) (\<Gamma>, e, Upd x # S)
[PROOF STEP]
have "a_consistent (ae, a, as) (\<Gamma>, e, Upd x # S)"
[PROOF STATE]
proof (prove)
using this:
x \<notin> domA \<Gamma>
isVal e
heap_upds_ok_conf (\<Gamma>, e, Upd x # S)
consistent (ae, a, as) (\<Gamma>, e, Upd x # S)

goal (1 subgoal):
 1. a_consistent (ae, a, as) (\<Gamma>, e, Upd x # S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a_consistent (ae, a, as) (\<Gamma>, e, Upd x # S)

goal (6 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 2. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 3. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 4. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 5. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 6. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from a_consistent_UpdD[OF this]
[PROOF STATE]
proof (chain)
picking this:
ae x = up\<cdot>0
a = 0
[PROOF STEP]
have "ae x = up\<cdot>0" and "a = 0"
[PROOF STATE]
proof (prove)
using this:
ae x = up\<cdot>0
a = 0

goal (1 subgoal):
 1. ae x = up\<cdot>0 &&& a = 0
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
ae x = up\<cdot>0
a = 0

goal (6 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 2. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 3. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 4. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 5. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 6. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "a_consistent (ae, a, as) ((x, e) # \<Gamma>, e, S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a_consistent (ae, a, as) ((x, e) # \<Gamma>, e, S)
[PROOF STEP]
using var\<^sub>2
[PROOF STATE]
proof (prove)
using this:
x \<notin> domA \<Gamma>
isVal e
heap_upds_ok_conf (\<Gamma>, e, Upd x # S)
consistent (ae, a, as) (\<Gamma>, e, Upd x # S)

goal (1 subgoal):
 1. a_consistent (ae, a, as) ((x, e) # \<Gamma>, e, S)
[PROOF STEP]
by (auto intro!: a_consistent_var\<^sub>2)
[PROOF STATE]
proof (state)
this:
a_consistent (ae, a, as) ((x, e) # \<Gamma>, e, S)

goal (6 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 2. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 3. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 4. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 5. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 6. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
hence "consistent (ae, 0, as) ((x, e) # \<Gamma>, e, S)"
[PROOF STATE]
proof (prove)
using this:
a_consistent (ae, a, as) ((x, e) # \<Gamma>, e, S)

goal (1 subgoal):
 1. consistent (ae, 0, as) ((x, e) # \<Gamma>, e, S)
[PROOF STEP]
using var\<^sub>2 \<open>a = 0\<close>
[PROOF STATE]
proof (prove)
using this:
a_consistent (ae, a, as) ((x, e) # \<Gamma>, e, S)
x \<notin> domA \<Gamma>
isVal e
heap_upds_ok_conf (\<Gamma>, e, Upd x # S)
consistent (ae, a, as) (\<Gamma>, e, Upd x # S)
a = 0

goal (1 subgoal):
 1. consistent (ae, 0, as) ((x, e) # \<Gamma>, e, S)
[PROOF STEP]
by (auto simp add: thunks_Cons elim: below_trans)
[PROOF STATE]
proof (state)
this:
consistent (ae, 0, as) ((x, e) # \<Gamma>, e, S)

goal (6 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 2. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 3. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 4. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 5. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 6. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
consistent (ae, 0, as) ((x, e) # \<Gamma>, e, S)

goal (6 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 2. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 3. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 4. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 5. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 6. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow> a_transform (ae, 0, as) ((x, e) # \<Gamma>, e, S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow> a_transform (ae, 0, as) ((x, e) # \<Gamma>, e, S)
[PROOF STEP]
using \<open>ae x = up\<cdot>0\<close> \<open>a = 0\<close> var\<^sub>2
[PROOF STATE]
proof (prove)
using this:
ae x = up\<cdot>0
a = 0
x \<notin> domA \<Gamma>
isVal e
heap_upds_ok_conf (\<Gamma>, e, Upd x # S)
consistent (ae, a, as) (\<Gamma>, e, Upd x # S)

goal (1 subgoal):
 1. a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow> a_transform (ae, 0, as) ((x, e) # \<Gamma>, e, S)
[PROOF STEP]
by (auto intro!: step.intros simp add: map_transform_Cons)
[PROOF STATE]
proof (state)
this:
a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow> a_transform (ae, 0, as) ((x, e) # \<Gamma>, e, S)

goal (6 subgoals):
 1. \<And>\<Gamma> x e S ae a as. \<lbrakk>x \<notin> domA \<Gamma>; isVal e; heap_upds_ok_conf (\<Gamma>, e, Upd x # S); consistent (ae, a, as) (\<Gamma>, e, Upd x # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
 2. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 3. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 4. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 5. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 6. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
consistent (ae, 0, as) ((x, e) # \<Gamma>, e, S)
a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow> a_transform (ae, 0, as) ((x, e) # \<Gamma>, e, S)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
consistent (ae, 0, as) ((x, e) # \<Gamma>, e, S)
a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow> a_transform (ae, 0, as) ((x, e) # \<Gamma>, e, S)

goal (1 subgoal):
 1. \<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)
[PROOF STEP]
by (blast del: consistentI consistentE)
[PROOF STATE]
proof (state)
this:
\<exists>ae' a' as'. consistent (ae', a', as') ((x, e) # \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, e, Upd x # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') ((x, e) # \<Gamma>, e, S)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
case (let\<^sub>1 \<Delta> \<Gamma> e S)
[PROOF STATE]
proof (state)
this:
atom ` domA \<Delta> \<sharp>* \<Gamma>
atom ` domA \<Delta> \<sharp>* S
heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S)
consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
let ?ae = "Aheap \<Delta> e\<cdot>a"
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "domA \<Delta> \<inter> upds S = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. domA \<Delta> \<inter> upds S = {}
[PROOF STEP]
using fresh_distinct_fv[OF let\<^sub>1(2)]
[PROOF STATE]
proof (prove)
using this:
domA \<Delta> \<inter> fv S = {}

goal (1 subgoal):
 1. domA \<Delta> \<inter> upds S = {}
[PROOF STEP]
by (auto dest: subsetD[OF ups_fv_subset])
[PROOF STATE]
proof (state)
this:
domA \<Delta> \<inter> upds S = {}

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
hence *: "\<And> x. x \<in> upds S \<Longrightarrow> x \<notin> edom ?ae"
[PROOF STATE]
proof (prove)
using this:
domA \<Delta> \<inter> upds S = {}

goal (1 subgoal):
 1. \<And>x. x \<in> upds S \<Longrightarrow> x \<notin> edom (Aheap \<Delta> e\<cdot>a)
[PROOF STEP]
by (auto simp add:  dest!: subsetD[OF edom_Aheap])
[PROOF STATE]
proof (state)
this:
?x \<in> upds S \<Longrightarrow> ?x \<notin> edom (Aheap \<Delta> e\<cdot>a)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have restr_stack_simp2: "restr_stack (edom (?ae \<squnion> ae)) S = restr_stack (edom ae) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. restr_stack (edom (Aheap \<Delta> e\<cdot>a \<squnion> ae)) S = restr_stack (edom ae) S
[PROOF STEP]
by (auto intro: restr_stack_cong dest!: *)
[PROOF STATE]
proof (state)
this:
restr_stack (edom (Aheap \<Delta> e\<cdot>a \<squnion> ae)) S = restr_stack (edom ae) S

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "edom ae \<subseteq> domA \<Gamma> \<union> upds S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. edom ae \<subseteq> domA \<Gamma> \<union> upds S
[PROOF STEP]
using let\<^sub>1
[PROOF STATE]
proof (prove)
using this:
atom ` domA \<Delta> \<sharp>* \<Gamma>
atom ` domA \<Delta> \<sharp>* S
heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S)
consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)

goal (1 subgoal):
 1. edom ae \<subseteq> domA \<Gamma> \<union> upds S
[PROOF STEP]
by (auto dest!: a_consistent_edom_subsetD)
[PROOF STATE]
proof (state)
this:
edom ae \<subseteq> domA \<Gamma> \<union> upds S

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from subsetD[OF this] fresh_distinct[OF let\<^sub>1(1)] fresh_distinct_fv[OF let\<^sub>1(2)]
[PROOF STATE]
proof (chain)
picking this:
?c \<in> edom ae \<Longrightarrow> ?c \<in> domA \<Gamma> \<union> upds S
domA \<Delta> \<inter> domA \<Gamma> = {}
domA \<Delta> \<inter> fv S = {}
[PROOF STEP]
have "edom ae \<inter> domA \<Delta> = {}"
[PROOF STATE]
proof (prove)
using this:
?c \<in> edom ae \<Longrightarrow> ?c \<in> domA \<Gamma> \<union> upds S
domA \<Delta> \<inter> domA \<Gamma> = {}
domA \<Delta> \<inter> fv S = {}

goal (1 subgoal):
 1. edom ae \<inter> domA \<Delta> = {}
[PROOF STEP]
by (auto dest: subsetD[OF ups_fv_subset])
[PROOF STATE]
proof (state)
this:
edom ae \<inter> domA \<Delta> = {}

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
edom ae \<inter> domA \<Delta> = {}

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
edom ae \<inter> domA \<Delta> = {}

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
fix x e'
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
assume "x \<in> thunks \<Gamma>"
[PROOF STATE]
proof (state)
this:
x \<in> thunks \<Gamma>

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
with let\<^sub>1
[PROOF STATE]
proof (chain)
picking this:
atom ` domA \<Delta> \<sharp>* \<Gamma>
atom ` domA \<Delta> \<sharp>* S
heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S)
consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)
x \<in> thunks \<Gamma>
[PROOF STEP]
have "(?ae \<squnion> ae) x = up\<cdot>0"
[PROOF STATE]
proof (prove)
using this:
atom ` domA \<Delta> \<sharp>* \<Gamma>
atom ` domA \<Delta> \<sharp>* S
heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S)
consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)
x \<in> thunks \<Gamma>

goal (1 subgoal):
 1. (Aheap \<Delta> e\<cdot>a \<squnion> ae) x = up\<cdot>0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(Aheap \<Delta> e\<cdot>a \<squnion> ae) x = up\<cdot>0

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?x2 \<in> thunks \<Gamma> \<Longrightarrow> (Aheap \<Delta> e\<cdot>a \<squnion> ae) ?x2 = up\<cdot>0

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
?x2 \<in> thunks \<Gamma> \<Longrightarrow> (Aheap \<Delta> e\<cdot>a \<squnion> ae) ?x2 = up\<cdot>0

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
?x2 \<in> thunks \<Gamma> \<Longrightarrow> (Aheap \<Delta> e\<cdot>a \<squnion> ae) ?x2 = up\<cdot>0

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
fix x e'
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
assume "x \<in> thunks \<Delta>"
[PROOF STATE]
proof (state)
this:
x \<in> thunks \<Delta>

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
hence "(?ae \<squnion> ae) x = up\<cdot>0"
[PROOF STATE]
proof (prove)
using this:
x \<in> thunks \<Delta>

goal (1 subgoal):
 1. (Aheap \<Delta> e\<cdot>a \<squnion> ae) x = up\<cdot>0
[PROOF STEP]
by (auto simp add: Aheap_heap3)
[PROOF STATE]
proof (state)
this:
(Aheap \<Delta> e\<cdot>a \<squnion> ae) x = up\<cdot>0

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?x2 \<in> thunks \<Delta> \<Longrightarrow> (Aheap \<Delta> e\<cdot>a \<squnion> ae) ?x2 = up\<cdot>0

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
?x2 \<in> thunks \<Delta> \<Longrightarrow> (Aheap \<Delta> e\<cdot>a \<squnion> ae) ?x2 = up\<cdot>0

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "a_consistent (ae, a, as) (\<Gamma>, Let \<Delta> e, S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a_consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)
[PROOF STEP]
using let\<^sub>1
[PROOF STATE]
proof (prove)
using this:
atom ` domA \<Delta> \<sharp>* \<Gamma>
atom ` domA \<Delta> \<sharp>* S
heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S)
consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)

goal (1 subgoal):
 1. a_consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a_consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
hence "a_consistent (?ae \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)"
[PROOF STATE]
proof (prove)
using this:
a_consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)

goal (1 subgoal):
 1. a_consistent (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)
[PROOF STEP]
using let\<^sub>1(1,2) \<open>edom ae \<inter> domA \<Delta> = {}\<close>
[PROOF STATE]
proof (prove)
using this:
a_consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)
atom ` domA \<Delta> \<sharp>* \<Gamma>
atom ` domA \<Delta> \<sharp>* S
edom ae \<inter> domA \<Delta> = {}

goal (1 subgoal):
 1. a_consistent (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)
[PROOF STEP]
by (auto intro!:  a_consistent_let simp del: join_comm)
[PROOF STATE]
proof (state)
this:
a_consistent (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
?x2 \<in> thunks \<Gamma> \<Longrightarrow> (Aheap \<Delta> e\<cdot>a \<squnion> ae) ?x2 = up\<cdot>0
?x2 \<in> thunks \<Delta> \<Longrightarrow> (Aheap \<Delta> e\<cdot>a \<squnion> ae) ?x2 = up\<cdot>0
a_consistent (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)
[PROOF STEP]
have "consistent (?ae \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)"
[PROOF STATE]
proof (prove)
using this:
?x2 \<in> thunks \<Gamma> \<Longrightarrow> (Aheap \<Delta> e\<cdot>a \<squnion> ae) ?x2 = up\<cdot>0
?x2 \<in> thunks \<Delta> \<Longrightarrow> (Aheap \<Delta> e\<cdot>a \<squnion> ae) ?x2 = up\<cdot>0
a_consistent (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)

goal (1 subgoal):
 1. consistent (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
consistent (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
consistent (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
consistent (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
consistent (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "\<And> x. x \<in> domA \<Gamma> \<Longrightarrow> x \<notin> edom ?ae"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> domA \<Gamma> \<Longrightarrow> x \<notin> edom (Aheap \<Delta> e\<cdot>a)
[PROOF STEP]
using fresh_distinct[OF let\<^sub>1(1)]
[PROOF STATE]
proof (prove)
using this:
domA \<Delta> \<inter> domA \<Gamma> = {}

goal (1 subgoal):
 1. \<And>x. x \<in> domA \<Gamma> \<Longrightarrow> x \<notin> edom (Aheap \<Delta> e\<cdot>a)
[PROOF STEP]
by (auto dest!: subsetD[OF edom_Aheap])
[PROOF STATE]
proof (state)
this:
?x \<in> domA \<Gamma> \<Longrightarrow> ?x \<notin> edom (Aheap \<Delta> e\<cdot>a)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
hence "map_transform Aeta_expand (?ae \<squnion> ae) (map_transform transform (?ae \<squnion> ae) \<Gamma>)
         = map_transform Aeta_expand ae (map_transform transform ae \<Gamma>)"
[PROOF STATE]
proof (prove)
using this:
?x \<in> domA \<Gamma> \<Longrightarrow> ?x \<notin> edom (Aheap \<Delta> e\<cdot>a)

goal (1 subgoal):
 1. map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a \<squnion> ae) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a \<squnion> ae) \<Gamma>) = map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)
[PROOF STEP]
by (auto intro!: map_transform_cong restrictA_cong simp add: edomIff)
[PROOF STATE]
proof (state)
this:
map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a \<squnion> ae) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a \<squnion> ae) \<Gamma>) = map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a \<squnion> ae) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a \<squnion> ae) \<Gamma>) = map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from \<open>edom ae \<subseteq> domA \<Gamma> \<union> upds S\<close>
[PROOF STATE]
proof (chain)
picking this:
edom ae \<subseteq> domA \<Gamma> \<union> upds S
[PROOF STEP]
have  "\<And> x. x \<in> domA \<Delta> \<Longrightarrow> x \<notin> edom ae"
[PROOF STATE]
proof (prove)
using this:
edom ae \<subseteq> domA \<Gamma> \<union> upds S

goal (1 subgoal):
 1. \<And>x. x \<in> domA \<Delta> \<Longrightarrow> x \<notin> edom ae
[PROOF STEP]
using fresh_distinct[OF let\<^sub>1(1)] fresh_distinct_fv[OF let\<^sub>1(2)]
[PROOF STATE]
proof (prove)
using this:
edom ae \<subseteq> domA \<Gamma> \<union> upds S
domA \<Delta> \<inter> domA \<Gamma> = {}
domA \<Delta> \<inter> fv S = {}

goal (1 subgoal):
 1. \<And>x. x \<in> domA \<Delta> \<Longrightarrow> x \<notin> edom ae
[PROOF STEP]
by (auto dest!:  subsetD[OF ups_fv_subset])
[PROOF STATE]
proof (state)
this:
?x \<in> domA \<Delta> \<Longrightarrow> ?x \<notin> edom ae

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
hence "map_transform Aeta_expand (?ae \<squnion> ae) (map_transform transform (?ae \<squnion> ae) \<Delta>)
         = map_transform Aeta_expand ?ae (map_transform transform ?ae \<Delta>)"
[PROOF STATE]
proof (prove)
using this:
?x \<in> domA \<Delta> \<Longrightarrow> ?x \<notin> edom ae

goal (1 subgoal):
 1. map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a \<squnion> ae) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a \<squnion> ae) \<Delta>) = map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a) \<Delta>)
[PROOF STEP]
by (auto intro!: map_transform_cong restrictA_cong simp add: edomIff)
[PROOF STATE]
proof (state)
this:
map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a \<squnion> ae) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a \<squnion> ae) \<Delta>) = map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a) \<Delta>)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a \<squnion> ae) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a \<squnion> ae) \<Gamma>) = map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)
map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a \<squnion> ae) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a \<squnion> ae) \<Delta>) = map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a) \<Delta>)
[PROOF STEP]
have "a_transform (ae, a, as) (\<Gamma>, Let \<Delta> e, S) \<Rightarrow> a_transform (?ae \<squnion> ae,  a, as) (\<Delta> @ \<Gamma>, e, S)"
[PROOF STATE]
proof (prove)
using this:
map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a \<squnion> ae) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a \<squnion> ae) \<Gamma>) = map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)
map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a \<squnion> ae) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a \<squnion> ae) \<Delta>) = map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a) \<Delta>)

goal (1 subgoal):
 1. a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow> a_transform (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)
[PROOF STEP]
using restr_stack_simp2 let\<^sub>1(1,2)
[PROOF STATE]
proof (prove)
using this:
map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a \<squnion> ae) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a \<squnion> ae) \<Gamma>) = map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)
map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a \<squnion> ae) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a \<squnion> ae) \<Delta>) = map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a) \<Delta>)
restr_stack (edom (Aheap \<Delta> e\<cdot>a \<squnion> ae)) S = restr_stack (edom ae) S
atom ` domA \<Delta> \<sharp>* \<Gamma>
atom ` domA \<Delta> \<sharp>* S

goal (1 subgoal):
 1. a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow> a_transform (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)
[PROOF STEP]
apply (auto simp add: map_transform_append restrictA_append  restr_stack_simp2[simplified] map_transform_restrA)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>map_transform Aeta_expand (ae \<squnion> Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (ae \<squnion> Aheap \<Delta> e\<cdot>a) \<Gamma>) = map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>); map_transform Aeta_expand (ae \<squnion> Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (ae \<squnion> Aheap \<Delta> e\<cdot>a) \<Delta>) = map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a) \<Delta>); atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S\<rbrakk> \<Longrightarrow> (map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>), Terms.Let (map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a) \<Delta>)) (ccTransform a e), transform_alts as S) \<Rightarrow> (map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a) \<Delta>) @ map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>), ccTransform a e, transform_alts as S)
[PROOF STEP]
apply (rule step.let\<^sub>1)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>map_transform Aeta_expand (ae \<squnion> Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (ae \<squnion> Aheap \<Delta> e\<cdot>a) \<Gamma>) = map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>); map_transform Aeta_expand (ae \<squnion> Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (ae \<squnion> Aheap \<Delta> e\<cdot>a) \<Delta>) = map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a) \<Delta>); atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S\<rbrakk> \<Longrightarrow> atom ` domA (map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a) \<Delta>)) \<sharp>* map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>)
 2. \<lbrakk>map_transform Aeta_expand (ae \<squnion> Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (ae \<squnion> Aheap \<Delta> e\<cdot>a) \<Gamma>) = map_transform Aeta_expand ae (map_transform ccTransform ae \<Gamma>); map_transform Aeta_expand (ae \<squnion> Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (ae \<squnion> Aheap \<Delta> e\<cdot>a) \<Delta>) = map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a) \<Delta>); atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S\<rbrakk> \<Longrightarrow> atom ` domA (map_transform Aeta_expand (Aheap \<Delta> e\<cdot>a) (map_transform ccTransform (Aheap \<Delta> e\<cdot>a) \<Delta>)) \<sharp>* transform_alts as S
[PROOF STEP]
apply (auto dest: subsetD[OF edom_Aheap])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow> a_transform (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow> a_transform (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)

goal (5 subgoals):
 1. \<And>\<Delta> \<Gamma> e S ae a as. \<lbrakk>atom ` domA \<Delta> \<sharp>* \<Gamma>; atom ` domA \<Delta> \<sharp>* S; heap_upds_ok_conf (\<Gamma>, Terms.Let \<Delta> e, S); consistent (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
 2. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 3. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 4. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 5. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
consistent (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)
a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow> a_transform (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
consistent (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)
a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow> a_transform (Aheap \<Delta> e\<cdot>a \<squnion> ae, a, as) (\<Delta> @ \<Gamma>, e, S)

goal (1 subgoal):
 1. \<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)
[PROOF STEP]
by (blast del: consistentI consistentE)
[PROOF STATE]
proof (state)
this:
\<exists>ae' a' as'. consistent (ae', a', as') (\<Delta> @ \<Gamma>, e, S) \<and> a_transform (ae, a, as) (\<Gamma>, Terms.Let \<Delta> e, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Delta> @ \<Gamma>, e, S)

goal (4 subgoals):
 1. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 2. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 3. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 4. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 2. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 3. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 4. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
case (if\<^sub>1 \<Gamma> scrut e1 e2 S)
[PROOF STATE]
proof (state)
this:
heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S)
consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)

goal (4 subgoals):
 1. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 2. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 3. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 4. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "consistent (ae, 0, a#as) (\<Gamma>, scrut, Alts e1 e2 # S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. consistent (ae, 0, a # as) (\<Gamma>, scrut, Alts e1 e2 # S)
[PROOF STEP]
using if\<^sub>1
[PROOF STATE]
proof (prove)
using this:
heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S)
consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)

goal (1 subgoal):
 1. consistent (ae, 0, a # as) (\<Gamma>, scrut, Alts e1 e2 # S)
[PROOF STEP]
by (auto dest: a_consistent_if\<^sub>1)
[PROOF STATE]
proof (state)
this:
consistent (ae, 0, a # as) (\<Gamma>, scrut, Alts e1 e2 # S)

goal (4 subgoals):
 1. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 2. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 3. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 4. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
consistent (ae, 0, a # as) (\<Gamma>, scrut, Alts e1 e2 # S)

goal (4 subgoals):
 1. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 2. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 3. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 4. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "a_transform (ae,  a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow> a_transform (ae, 0, a#as) (\<Gamma>, scrut, Alts e1 e2 # S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow> a_transform (ae, 0, a # as) (\<Gamma>, scrut, Alts e1 e2 # S)
[PROOF STEP]
by (auto intro: step.intros)
[PROOF STATE]
proof (state)
this:
a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow> a_transform (ae, 0, a # as) (\<Gamma>, scrut, Alts e1 e2 # S)

goal (4 subgoals):
 1. \<And>\<Gamma> scrut e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, scrut ? e1 : e2, S); consistent (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
 2. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 3. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 4. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
consistent (ae, 0, a # as) (\<Gamma>, scrut, Alts e1 e2 # S)
a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow> a_transform (ae, 0, a # as) (\<Gamma>, scrut, Alts e1 e2 # S)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
consistent (ae, 0, a # as) (\<Gamma>, scrut, Alts e1 e2 # S)
a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow> a_transform (ae, 0, a # as) (\<Gamma>, scrut, Alts e1 e2 # S)

goal (1 subgoal):
 1. \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)
[PROOF STEP]
by (blast del: consistentI consistentE)
[PROOF STATE]
proof (state)
this:
\<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S) \<and> a_transform (ae, a, as) (\<Gamma>, scrut ? e1 : e2, S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, scrut, Alts e1 e2 # S)

goal (3 subgoals):
 1. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 2. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 3. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 2. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 3. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
case (if\<^sub>2 \<Gamma> b e1 e2 S)
[PROOF STATE]
proof (state)
this:
heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S)
consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)

goal (3 subgoals):
 1. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 2. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 3. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
hence "a_consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)"
[PROOF STATE]
proof (prove)
using this:
heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S)
consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)

goal (1 subgoal):
 1. a_consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a_consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)

goal (3 subgoals):
 1. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 2. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 3. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a_consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)
[PROOF STEP]
obtain a' as' where [simp]: "as = a' # as'" "a = 0"
[PROOF STATE]
proof (prove)
using this:
a_consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)

goal (1 subgoal):
 1. (\<And>a' as'. \<lbrakk>as = a' # as'; a = 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule a_consistent_alts_on_stack)
[PROOF STATE]
proof (state)
this:
as = a' # as'
a = 0

goal (3 subgoals):
 1. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 2. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 3. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "consistent (ae, a', as') (\<Gamma>, if b then e1 else e2, S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. consistent (ae, a', as') (\<Gamma>, if b then e1 else e2, S)
[PROOF STEP]
using if\<^sub>2
[PROOF STATE]
proof (prove)
using this:
heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S)
consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)

goal (1 subgoal):
 1. consistent (ae, a', as') (\<Gamma>, if b then e1 else e2, S)
[PROOF STEP]
by (auto dest!: a_consistent_if\<^sub>2)
[PROOF STATE]
proof (state)
this:
consistent (ae, a', as') (\<Gamma>, if b then e1 else e2, S)

goal (3 subgoals):
 1. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 2. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 3. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
consistent (ae, a', as') (\<Gamma>, if b then e1 else e2, S)

goal (3 subgoals):
 1. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 2. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 3. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
have "a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow> a_transform (ae,  a', as') (\<Gamma>, if b then e1 else e2, S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow> a_transform (ae, a', as') (\<Gamma>, if b then e1 else e2, S)
[PROOF STEP]
by (auto intro: step.if\<^sub>2[where b = True, simplified] step.if\<^sub>2[where b = False, simplified])
[PROOF STATE]
proof (state)
this:
a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow> a_transform (ae, a', as') (\<Gamma>, if b then e1 else e2, S)

goal (3 subgoals):
 1. \<And>\<Gamma> b e1 e2 S ae a as. \<lbrakk>heap_upds_ok_conf (\<Gamma>, Bool b, Alts e1 e2 # S); consistent (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S)\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
 2. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 3. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
consistent (ae, a', as') (\<Gamma>, if b then e1 else e2, S)
a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow> a_transform (ae, a', as') (\<Gamma>, if b then e1 else e2, S)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
consistent (ae, a', as') (\<Gamma>, if b then e1 else e2, S)
a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow> a_transform (ae, a', as') (\<Gamma>, if b then e1 else e2, S)

goal (1 subgoal):
 1. \<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)
[PROOF STEP]
by (blast del: consistentI consistentE)
[PROOF STATE]
proof (state)
this:
\<exists>ae' a' as'. consistent (ae', a', as') (\<Gamma>, if b then e1 else e2, S) \<and> a_transform (ae, a, as) (\<Gamma>, Bool b, Alts e1 e2 # S) \<Rightarrow>\<^sup>* a_transform (ae', a', as') (\<Gamma>, if b then e1 else e2, S)

goal (2 subgoals):
 1. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 2. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 2. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
case refl
[PROOF STATE]
proof (state)
this:
consistent (ae, a, as) c_

goal (2 subgoals):
 1. \<And>c ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c
 2. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
consistent (ae, a, as) c_

goal (1 subgoal):
 1. \<exists>ae' a' as'. consistent (ae', a', as') c_ \<and> a_transform (ae, a, as) c_ \<Rightarrow>\<^sup>* a_transform (ae', a', as') c_
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>ae' a' as'. consistent (ae', a', as') c_ \<and> a_transform (ae, a, as) c_ \<Rightarrow>\<^sup>* a_transform (ae', a', as') c_

goal (1 subgoal):
 1. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
case (trans c c' c'')
[PROOF STATE]
proof (state)
this:
c \<Rightarrow>\<^sup>* c'
c' \<Rightarrow>\<^sup>* c''
consistent (?ae, ?a, ?as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (?ae, ?a, ?as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'
consistent (?ae, ?a, ?as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (?ae, ?a, ?as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
consistent (ae, a, as) c

goal (1 subgoal):
 1. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from trans(3)[OF trans(5)]
[PROOF STATE]
proof (chain)
picking this:
\<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'
[PROOF STEP]
obtain ae' a' as' where "consistent (ae', a', as') c'" and *: "a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'"
[PROOF STATE]
proof (prove)
using this:
\<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'

goal (1 subgoal):
 1. (\<And>ae' a' as'. \<lbrakk>consistent (ae', a', as') c'; a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
consistent (ae', a', as') c'
a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'

goal (1 subgoal):
 1. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from trans(4)[OF this(1)]
[PROOF STATE]
proof (chain)
picking this:
\<exists>ae'a a'a as'a. consistent (ae'a, a'a, as'a) c'' \<and> a_transform (ae', a', as') c' \<Rightarrow>\<^sup>* a_transform (ae'a, a'a, as'a) c''
[PROOF STEP]
obtain ae'' a'' as'' where "consistent (ae'', a'', as'') c''" and **: "a_transform (ae', a', as') c' \<Rightarrow>\<^sup>* a_transform (ae'', a'', as'') c''"
[PROOF STATE]
proof (prove)
using this:
\<exists>ae'a a'a as'a. consistent (ae'a, a'a, as'a) c'' \<and> a_transform (ae', a', as') c' \<Rightarrow>\<^sup>* a_transform (ae'a, a'a, as'a) c''

goal (1 subgoal):
 1. (\<And>ae'' a'' as''. \<lbrakk>consistent (ae'', a'', as'') c''; a_transform (ae', a', as') c' \<Rightarrow>\<^sup>* a_transform (ae'', a'', as'') c''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
consistent (ae'', a'', as'') c''
a_transform (ae', a', as') c' \<Rightarrow>\<^sup>* a_transform (ae'', a'', as'') c''

goal (1 subgoal):
 1. \<And>c c' c'' ae a as. \<lbrakk>c \<Rightarrow>\<^sup>* c'; c' \<Rightarrow>\<^sup>* c''; \<And>ae a as. consistent (ae, a, as) c \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c'; \<And>ae a as. consistent (ae, a, as) c' \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c' \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''; consistent (ae, a, as) c\<rbrakk> \<Longrightarrow> \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
from this(1) rtranclp_trans[OF * **]
[PROOF STATE]
proof (chain)
picking this:
consistent (ae'', a'', as'') c''
a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae'', a'', as'') c''
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
consistent (ae'', a'', as'') c''
a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae'', a'', as'') c''

goal (1 subgoal):
 1. \<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>ae' a' as'. consistent (ae', a', as') c'' \<and> a_transform (ae, a, as) c \<Rightarrow>\<^sup>* a_transform (ae', a', as') c''

goal:
No subgoals!
[PROOF STEP]
qed