cases: fixes a1 :: "('fenv, 'henv, ('fun, ('dyn, 'num, 'bool) unboxed) frame) state"   and a2 :: "('fenv, 'henv, ('fun, ('dyn, 'num, 'bool) unboxed) frame) state" assumes "a1 \<rightarrow> a2" obtains F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and d :: "'dyn" and H :: "'henv" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State F__ H__ (Frame f__ pc__ \<Sigma>__ # st__)" and "a2 = State F__ H__ (Frame f__ (Suc pc__) (OpDyn 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, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and n :: "'num" and H :: "'henv" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fa__ Ha__ (Frame fa__ pca__ \<Sigma>'__ # sta__)" and "a2 = State Fa__ Ha__ (Frame fa__ (Suc pca__) (OpUbx1 n__ # \<Sigma>'__) # sta__)" and "F_get Fa__ fa__ = Some fda__" and "pca__ < length (body fda__)" and "body fda__ ! pca__ = IPushUbx1 n__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and b :: "'bool" and H :: "'henv" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fb__ Hb__ (Frame fb__ pcb__ \<Sigma>''__ # stb__)" and "a2 = State Fb__ Hb__ (Frame fb__ (Suc pcb__) (OpUbx2 b # \<Sigma>''__) # stb__)" and "F_get Fb__ fb__ = Some fdb__" and "pcb__ < length (body fdb__)" and "body fdb__ ! pcb__ = IPushUbx2 b"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and H :: "'henv" and x :: "('dyn, 'num, 'bool) unboxed" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fc__ Hc__ (Frame fc__ pcc__ (x__ # \<Sigma>'''__) # stc__)" and "a2 = State Fc__ Hc__ (Frame fc__ (Suc pcc__) \<Sigma>'''__ # stc__)" and "F_get Fc__ fc__ = Some fdc__" and "pcc__ < length (body fdc__)" and "body fdc__ ! pcc__ = IPop"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and x :: "'var" and i :: "('dyn, 'num, 'bool) unboxed" and i' :: "'dyn" and H :: "'henv" and d :: "'dyn" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fd__ Hd__ (Frame fe__ pcd__ (i__ # \<Sigma>''''__) # std__)" and "a2 = State Fd__ Hd__ (Frame fe__ (Suc pcd__) (OpDyn da__ # \<Sigma>''''__) # std__)" and "F_get Fd__ fe__ = Some fdd__" and "pcd__ < length (body fdd__)" and "body fdd__ ! pcd__ = ILoad xa__" and "cast_Dyn i__ = Some i'__" and "heap_get Hd__ (xa__, i'__) = Some da__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and \<tau> :: "Unboxed.type" and x :: "'var" and i :: "('dyn, 'num, 'bool) unboxed" and i' :: "'dyn" and H :: "'henv" and d :: "'dyn" and blob :: "('dyn, 'num, 'bool) unboxed" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fe__ He__ (Frame ff__ pce__ (ia__ # \<Sigma>'''''__) # ste__)" and "a2 = State Fe__ He__ (Frame ff__ (Suc pce__) (blob__ # \<Sigma>'''''__) # ste__)" and "F_get Fe__ ff__ = Some fde__" and "pce__ < length (body fde__)" and "body fde__ ! pce__ = ILoadUbx \<tau>__ xb__" and "cast_Dyn ia__ = Some i'a__" and "heap_get He__ (xb__, i'a__) = Some db__" and "unbox \<tau>__ db__ = Some blob__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and \<tau> :: "Unboxed.type" and x :: "'var" and i :: "('dyn, 'num, 'bool) unboxed" and i' :: "'dyn" and H :: "'henv" and d :: "'dyn" and F' :: "'fenv" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Ff__ Hf__ (Frame fg__ pcf__ (ib__ # \<Sigma>''''''__) # stf__)" and "a2 = State F'__ Hf__ (box_stack fg__ (Frame fg__ (Suc pcf__) (OpDyn dc__ # \<Sigma>''''''__) # stf__))" and "F_get Ff__ fg__ = Some fdf__" and "pcf__ < length (body fdf__)" and "body fdf__ ! pcf__ = ILoadUbx \<tau>'__ xc__" and "cast_Dyn ib__ = Some i'b__" and "heap_get Hf__ (xc__, i'b__) = Some dc__" and "unbox \<tau>'__ dc__ = None" and "F_add Ff__ fg__ (generalize_fundef fdf__) = F'__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and x :: "'var" and i :: "('dyn, 'num, 'bool) unboxed" and i' :: "'dyn" and y :: "('dyn, 'num, 'bool) unboxed" and d :: "'dyn" and H :: "'henv" and H' :: "'henv" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fg__ Hg__ (Frame fh__ pcg__ (ic__ # y__ # \<Sigma>'''''''__) # stg__)" and "a2 = State Fg__ H'__ (Frame fh__ (Suc pcg__) \<Sigma>'''''''__ # stg__)" and "F_get Fg__ fh__ = Some fdg__" and "pcg__ < length (body fdg__)" and "body fdg__ ! pcg__ = IStore xd__" and "cast_Dyn ic__ = Some i'c__" and "cast_Dyn y__ = Some dd__" and "heap_add Hg__ (xd__, i'c__) dd__ = H'__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and \<tau> :: "Unboxed.type" and x :: "'var" and i :: "('dyn, 'num, 'bool) unboxed" and i' :: "'dyn" and blob :: "('dyn, 'num, 'bool) unboxed" and d :: "'dyn" and H :: "'henv" and H' :: "'henv" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fh__ Hh__ (Frame fi__ pch__ (i # blob # \<Sigma>''''''''__) # sth__)" and "a2 = State Fh__ H' (Frame fi__ (Suc pch__) \<Sigma>''''''''__ # sth__)" and "F_get Fh__ fi__ = Some fdh__" and "pch__ < length (body fdh__)" and "body fdh__ ! pch__ = IStoreUbx \<tau> xe__" and "cast_Dyn i = Some i'" and "cast_and_box \<tau> blob = Some de__" and "heap_add Hh__ (xe__, i') de__ = H'"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and op :: "'op" and ar :: "nat" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and \<Sigma>' :: "'dyn list" and x :: "'dyn" and H :: "'henv" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fi__ Hi__ (Frame fj__ pci__ \<Sigma>'''''''''__ # sti__)" and "a2 = State Fi__ Hi__ (Frame fj__ (Suc pci__) (OpDyn xf__ # drop ar__ \<Sigma>'''''''''__) # sti__)" and "F_get Fi__ fj__ = Some fdi__" and "pci__ < length (body fdi__)" and "body fdi__ ! pci__ = IOp op__" and "\<AA>\<rr>\<ii>\<tt>\<yy> op__ = ar__" and "ar__ \<le> length \<Sigma>'''''''''__" and "traverse cast_Dyn (take ar__ \<Sigma>'''''''''__) = Some \<Sigma>''''''''''__" and "\<II>\<nn>\<ll> op__ \<Sigma>''''''''''__ = None" and "\<OO>\<pp> op__ \<Sigma>''''''''''__ = xf__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and op :: "'op" and ar :: "nat" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and \<Sigma>' :: "'dyn list" and opinl :: "'opinl" and x :: "'dyn" and F' :: "'fenv" and H :: "'henv" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fj__ Hj__ (Frame fk__ pcj__ \<Sigma>'''''''''''__ # stj__)" and "a2 = State F'a__ Hj__ (Frame fk__ (Suc pcj__) (OpDyn xg__ # drop ara__ \<Sigma>'''''''''''__) # stj__)" and "F_get Fj__ fk__ = Some fdj__" and "pcj__ < length (body fdj__)" and "body fdj__ ! pcj__ = IOp opa__" and "\<AA>\<rr>\<ii>\<tt>\<yy> opa__ = ara__" and "ara__ \<le> length \<Sigma>'''''''''''__" and "traverse cast_Dyn (take ara__ \<Sigma>'''''''''''__) = Some \<Sigma>''''''''''''__" and "\<II>\<nn>\<ll> opa__ \<Sigma>''''''''''''__ = Some opinl__" and "\<II>\<nn>\<ll>\<OO>\<pp> opinl__ \<Sigma>''''''''''''__ = xg__" and "F_add Fj__ fk__ (rewrite_fundef_body fdj__ pcj__ (IOpInl opinl__)) = F'a__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and opinl :: "'opinl" and ar :: "nat" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and \<Sigma>' :: "'dyn list" and x :: "'dyn" and H :: "'henv" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fk__ Hk__ (Frame fl__ pck__ \<Sigma>'''''''''''''__ # stk__)" and "a2 = State Fk__ Hk__ (Frame fl__ (Suc pck__) (OpDyn xh__ # drop arb__ \<Sigma>'''''''''''''__) # stk__)" and "F_get Fk__ fl__ = Some fdk__" and "pck__ < length (body fdk__)" and "body fdk__ ! pck__ = IOpInl opinla__" and "\<AA>\<rr>\<ii>\<tt>\<yy> (\<DD>\<ee>\<II>\<nn>\<ll> opinla__) = arb__" and "arb__ \<le> length \<Sigma>'''''''''''''__" and "traverse cast_Dyn (take arb__ \<Sigma>'''''''''''''__) = Some \<Sigma>''''''''''''''__" and "\<II>\<ss>\<II>\<nn>\<ll> opinla__ \<Sigma>''''''''''''''__" and "\<II>\<nn>\<ll>\<OO>\<pp> opinla__ \<Sigma>''''''''''''''__ = xh__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and opinl :: "'opinl" and ar :: "nat" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and \<Sigma>' :: "'dyn list" and x :: "'dyn" and F' :: "'fenv" and H :: "'henv" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fl__ Hl__ (Frame fm__ pcl__ \<Sigma>'''''''''''''''__ # stl__)" and "a2 = State F' Hl__ (Frame fm__ (Suc pcl__) (OpDyn xi__ # drop arc__ \<Sigma>'''''''''''''''__) # stl__)" and "F_get Fl__ fm__ = Some fdl__" and "pcl__ < length (body fdl__)" and "body fdl__ ! pcl__ = IOpInl opinl" and "\<AA>\<rr>\<ii>\<tt>\<yy> (\<DD>\<ee>\<II>\<nn>\<ll> opinl) = arc__" and "arc__ \<le> length \<Sigma>'''''''''''''''__" and "traverse cast_Dyn (take arc__ \<Sigma>'''''''''''''''__) = Some \<Sigma>'" and "\<not> \<II>\<ss>\<II>\<nn>\<ll> opinl \<Sigma>'" and "\<II>\<nn>\<ll>\<OO>\<pp> opinl \<Sigma>' = xi__" and "F_add Fl__ fm__ (rewrite_fundef_body fdl__ pcl__ (IOp (\<DD>\<ee>\<II>\<nn>\<ll> opinl))) = F'"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and opubx :: "'opubx" and op :: "'op" and ar :: "nat" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and x :: "('dyn, 'num, 'bool) unboxed" and H :: "'henv" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fm__ Hm__ (Frame fn__ pcm__ \<Sigma>'''''''''''''''''__ # stm__)" and "a2 = State Fm__ Hm__ (Frame fn__ (Suc pcm__) (x # drop ard__ \<Sigma>'''''''''''''''''__) # stm__)" and "F_get Fm__ fn__ = Some fdm__" and "pcm__ < length (body fdm__)" and "body fdm__ ! pcm__ = IOpUbx opubx" and "\<DD>\<ee>\<II>\<nn>\<ll> (\<BB>\<oo>\<xx> opubx) = op" and "\<AA>\<rr>\<ii>\<tt>\<yy> op = ard__" and "ard__ \<le> length \<Sigma>'''''''''''''''''__" and "\<UU>\<bb>\<xx>\<OO>\<pp> opubx (take ard__ \<Sigma>'''''''''''''''''__) = Some x"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and n :: "nat" and y :: "('dyn, 'num, 'bool) unboxed" and d :: "'dyn" and H :: "'henv" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fn__ Hn__ (Frame fo__ pcn__ (ya__ # \<Sigma>''''''''''''''''''__) # stn__)" and "a2 = State Fn__ Hn__ (Frame fo__ na__ \<Sigma>''''''''''''''''''__ # stn__)" and "F_get Fn__ fo__ = Some fdn__" and "pcn__ < length (body fdn__)" and "body fdn__ ! pcn__ = ICJump na__" and "cast_Dyn ya__ = Some df__" and "is_true df__"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and n :: "nat" and y :: "('dyn, 'num, 'bool) unboxed" and d :: "'dyn" and H :: "'henv" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fo__ Ho__ (Frame fp__ pco__ (y # \<Sigma>'''''''''''''''''''__) # sto__)" and "a2 = State Fo__ Ho__ (Frame fp__ (Suc pco__) \<Sigma>'''''''''''''''''''__ # sto__)" and "F_get Fo__ fp__ = Some fdo__" and "pco__ < length (body fdo__)" and "body fdo__ ! pco__ = ICJump n" and "cast_Dyn y = Some d" and "is_false d"   | F :: "'fenv" and f :: "'fun" and fd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and pc :: "nat" and g :: "'fun" and gd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and ar :: "nat" and \<Sigma> :: "('dyn, 'num, 'bool) unboxed list" and frame\<^sub>f :: "('fun, ('dyn, 'num, 'bool) unboxed) frame" and frame\<^sub>g :: "('fun, ('dyn, 'num, 'bool) unboxed) frame" and H :: "'henv" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) frame list" where "a1 = State Fp__ Hp__ (frame\<^sub>f__ # stp__)" and "a2 = State Fp__ Hp__ (frame\<^sub>g__ # frame\<^sub>f__ # stp__)" and "F_get Fp__ fq__ = Some fd" and "pc < length (body fd)" and "body fd ! pc = ICall g__" and "F_get Fp__ g__ = Some gd__" and "arity gd__ = ar" and "ar \<le> length \<Sigma>" and "frame\<^sub>f__ = Frame fq__ pc \<Sigma>" and "list_all is_dyn_operand (take ar \<Sigma>)" and "frame\<^sub>g__ = Frame g__ 0 (take ar \<Sigma>)"   | F :: "'fenv" and g :: "'fun" and gd :: "('dyn, 'var, 'fun, 'op, 'opinl, 'opubx, 'num, 'bool) instr fundef" and \<Sigma>\<^sub>f :: "('dyn, 'num, 'bool) unboxed list" and pc\<^sub>g :: "nat" and frame\<^sub>g :: "('fun, ('dyn, 'num, 'bool) unboxed) frame" and \<Sigma>\<^sub>g :: "('dyn, 'num, 'bool) unboxed list" and frame\<^sub>f :: "('fun, ('dyn, 'num, 'bool) unboxed) frame" and f :: "'fun" and pc\<^sub>f :: "nat" and frame\<^sub>f' :: "('fun, ('dyn, 'num, 'bool) unboxed) frame" and H :: "'henv" and st :: "('fun, ('dyn, 'num, 'bool) unboxed) 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)"