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