cases: fixes a1 :: "('fenv, 'henv, ('fun, 'dyn) frame) state"   and a2 :: "('fenv, 'henv, ('fun, 'dyn) frame) state" assumes "a1 \<rightarrow> a2" obtains F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl) instr fundef" and pc :: "nat" and d :: "'dyn" and H :: "'henv" and \<Sigma> :: "'dyn list" and st :: "('fun, 'dyn) frame list" where "a1 = State F__ H__ (Frame f__ pc__ \<Sigma>__ # st__)" and "a2 = State F__ H__ (Frame f__ (Suc pc__) (d__ # \<Sigma>__) # st__)" and "F_get F__ f__ = Some fd__" and "pc__ < length (body fd__)" and "body fd__ ! pc__ = IPush d__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl) instr fundef" and pc :: "nat" and H :: "'henv" and d :: "'dyn" and \<Sigma> :: "'dyn list" and st :: "('fun, 'dyn) frame list" where "a1 = State Fa__ Ha__ (Frame fa__ pca__ (da__ # \<Sigma>'__) # sta__)" and "a2 = State Fa__ Ha__ (Frame fa__ (Suc pca__) \<Sigma>'__ # sta__)" and "F_get Fa__ fa__ = Some fda__" and "pca__ < length (body fda__)" and "body fda__ ! pca__ = IPop"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl) instr fundef" and pc :: "nat" and x :: "'var" and H :: "'henv" and y :: "'dyn" and d :: "'dyn" and \<Sigma> :: "'dyn list" and st :: "('fun, 'dyn) frame list" where "a1 = State Fb__ Hb__ (Frame fb__ pcb__ (y__ # \<Sigma>''__) # stb__)" and "a2 = State Fb__ Hb__ (Frame fb__ (Suc pcb__) (db__ # \<Sigma>''__) # stb__)" and "F_get Fb__ fb__ = Some fdb__" and "pcb__ < length (body fdb__)" and "body fdb__ ! pcb__ = ILoad x__" and "heap_get Hb__ (x__, y__) = Some db__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl) instr fundef" and pc :: "nat" and x :: "'var" and H :: "'henv" and y :: "'dyn" and d :: "'dyn" and H' :: "'henv" and \<Sigma> :: "'dyn list" and st :: "('fun, 'dyn) frame list" where "a1 = State Fc__ Hc__ (Frame fc__ pcc__ (y # dc__ # \<Sigma>'''__) # stc__)" and "a2 = State Fc__ H' (Frame fc__ (Suc pcc__) \<Sigma>'''__ # stc__)" and "F_get Fc__ fc__ = Some fdc__" and "pcc__ < length (body fdc__)" and "body fdc__ ! pcc__ = IStore xa__" and "heap_add Hc__ (xa__, y) dc__ = H'"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl) instr fundef" and pc :: "nat" and op :: "'op" and ar :: "nat" and \<Sigma> :: "'dyn list" and x :: "'dyn" and H :: "'henv" and st :: "('fun, 'dyn) frame list" where "a1 = State Fd__ Hd__ (Frame fe__ pcd__ \<Sigma>''''__ # std__)" and "a2 = State Fd__ Hd__ (Frame fe__ (Suc pcd__) (xb__ # drop ar__ \<Sigma>''''__) # std__)" and "F_get Fd__ fe__ = Some fdd__" and "pcd__ < length (body fdd__)" and "body fdd__ ! pcd__ = IOp op__" and "\<AA>\<rr>\<ii>\<tt>\<yy> op__ = ar__" and "ar__ \<le> length \<Sigma>''''__" and "\<II>\<nn>\<ll> op__ (take ar__ \<Sigma>''''__) = None" and "\<OO>\<pp> op__ (take ar__ \<Sigma>''''__) = xb__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl) instr fundef" and pc :: "nat" and op :: "'op" and ar :: "nat" and \<Sigma> :: "'dyn list" and opinl :: "'opinl" and x :: "'dyn" and F' :: "'fenv" and H :: "'henv" and st :: "('fun, 'dyn) frame list" where "a1 = State Fe__ He__ (Frame ff__ pce__ \<Sigma>'''''__ # ste__)" and "a2 = State F'__ He__ (Frame ff__ (Suc pce__) (xc__ # drop ara__ \<Sigma>'''''__) # ste__)" and "F_get Fe__ ff__ = Some fde__" and "pce__ < length (body fde__)" and "body fde__ ! pce__ = IOp op" and "\<AA>\<rr>\<ii>\<tt>\<yy> op = ara__" and "ara__ \<le> length \<Sigma>'''''__" and "\<II>\<nn>\<ll> op (take ara__ \<Sigma>'''''__) = Some opinl__" and "\<II>\<nn>\<ll>\<OO>\<pp> opinl__ (take ara__ \<Sigma>'''''__) = xc__" and "F_add Fe__ ff__ (rewrite_fundef_body fde__ pce__ (IOpInl opinl__)) = F'__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl) instr fundef" and pc :: "nat" and opinl :: "'opinl" and ar :: "nat" and \<Sigma> :: "'dyn list" and x :: "'dyn" and H :: "'henv" and st :: "('fun, 'dyn) frame list" where "a1 = State Ff__ Hf__ (Frame fg__ pcf__ \<Sigma>''''''__ # stf__)" and "a2 = State Ff__ Hf__ (Frame fg__ (Suc pcf__) (xd__ # drop arb__ \<Sigma>''''''__) # stf__)" and "F_get Ff__ fg__ = Some fdf__" and "pcf__ < length (body fdf__)" and "body fdf__ ! pcf__ = IOpInl opinla__" and "\<AA>\<rr>\<ii>\<tt>\<yy> (\<DD>\<ee>\<II>\<nn>\<ll> opinla__) = arb__" and "arb__ \<le> length \<Sigma>''''''__" and "\<II>\<ss>\<II>\<nn>\<ll> opinla__ (take arb__ \<Sigma>''''''__)" and "\<II>\<nn>\<ll>\<OO>\<pp> opinla__ (take arb__ \<Sigma>''''''__) = xd__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl) instr fundef" and pc :: "nat" and opinl :: "'opinl" and ar :: "nat" and \<Sigma> :: "'dyn list" and x :: "'dyn" and F' :: "'fenv" and H :: "'henv" and st :: "('fun, 'dyn) frame list" where "a1 = State Fg__ Hg__ (Frame fh__ pcg__ \<Sigma>'''''''__ # stg__)" and "a2 = State F' Hg__ (Frame fh__ (Suc pcg__) (x # drop ar \<Sigma>'''''''__) # stg__)" and "F_get Fg__ fh__ = Some fdg__" and "pcg__ < length (body fdg__)" and "body fdg__ ! pcg__ = IOpInl opinl" and "\<AA>\<rr>\<ii>\<tt>\<yy> (\<DD>\<ee>\<II>\<nn>\<ll> opinl) = ar" and "ar \<le> length \<Sigma>'''''''__" and "\<not> \<II>\<ss>\<II>\<nn>\<ll> opinl (take ar \<Sigma>'''''''__)" and "\<II>\<nn>\<ll>\<OO>\<pp> opinl (take ar \<Sigma>'''''''__) = x" and "F_add Fg__ fh__ (rewrite_fundef_body fdg__ pcg__ (IOp (\<DD>\<ee>\<II>\<nn>\<ll> opinl))) = F'"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl) instr fundef" and pc :: "nat" and n :: "nat" and d :: "'dyn" and H :: "'henv" and \<Sigma> :: "'dyn list" and st :: "('fun, 'dyn) frame list" where "a1 = State Fh__ Hh__ (Frame fi__ pch__ (dd__ # \<Sigma>''''''''__) # sth__)" and "a2 = State Fh__ Hh__ (Frame fi__ n__ \<Sigma>''''''''__ # sth__)" and "F_get Fh__ fi__ = Some fdh__" and "pch__ < length (body fdh__)" and "body fdh__ ! pch__ = ICJump n__" and "is_true dd__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl) instr fundef" and pc :: "nat" and n :: "nat" and d :: "'dyn" and H :: "'henv" and \<Sigma> :: "'dyn list" and st :: "('fun, 'dyn) frame list" where "a1 = State Fi__ Hi__ (Frame fj__ pci__ (d # \<Sigma>'''''''''__) # sti__)" and "a2 = State Fi__ Hi__ (Frame fj__ (Suc pci__) \<Sigma>'''''''''__ # sti__)" and "F_get Fi__ fj__ = Some fdi__" and "pci__ < length (body fdi__)" and "body fdi__ ! pci__ = ICJump n" and "is_false d"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl) instr fundef" and pc :: "nat" and g :: "'fun" and gd :: "('dyn, 'var, 'fun, 'op, 'opinl) instr fundef" and \<Sigma> :: "'dyn list" and frame\<^sub>f :: "('fun, 'dyn) frame" and frame\<^sub>g :: "('fun, 'dyn) frame" and H :: "'henv" and st :: "('fun, 'dyn) frame list" where "a1 = State Fj__ Hj__ (frame\<^sub>f__ # stj__)" and "a2 = State Fj__ Hj__ (frame\<^sub>g__ # frame\<^sub>f__ # stj__)" and "F_get Fj__ fk__ = Some fd" and "pc < length (body fd)" and "body fd ! pc = ICall g__" and "F_get Fj__ g__ = Some gd__" and "arity gd__ \<le> length \<Sigma>" and "frame\<^sub>f__ = Frame fk__ pc \<Sigma>" and "frame\<^sub>g__ = Frame g__ 0 (take (arity gd__) \<Sigma>)"   | F :: "'fenv" and g :: "'fun" and gd :: "('dyn, 'var, 'fun, 'op, 'opinl) instr fundef" and \<Sigma>\<^sub>f :: "'dyn list" and pc\<^sub>g :: "nat" and frame\<^sub>g :: "('fun, 'dyn) frame" and \<Sigma>\<^sub>g :: "'dyn list" and frame\<^sub>f :: "('fun, 'dyn) frame" and f :: "'fun" and pc\<^sub>f :: "nat" and frame\<^sub>f' :: "('fun, 'dyn) frame" and H :: "'henv" and st :: "('fun, 'dyn) frame list" where "a1 = State F H (frame\<^sub>g # frame\<^sub>f # st)" and "a2 = State F H (frame\<^sub>f' # st)" and "F_get F g = Some gd" and "arity gd \<le> length \<Sigma>\<^sub>f" and "pc\<^sub>g = length (body gd)" and "frame\<^sub>g = Frame g pc\<^sub>g \<Sigma>\<^sub>g" and "frame\<^sub>f = Frame f pc\<^sub>f \<Sigma>\<^sub>f" and "frame\<^sub>f' = Frame f (Suc pc\<^sub>f) (\<Sigma>\<^sub>g @ drop (arity gd) \<Sigma>\<^sub>f)"