cases: fixes a1 :: "bool"   and a2 :: "v sem_env"   and a3 :: "'b state"   and a4 :: "exp0"   and a5 :: "'b state \<times> (v, v) result" assumes "evaluate a1 a2 a3 a4 a5" obtains ck :: "bool" and env :: "v sem_env" and l :: "lit" and s :: "'b state" where "a1 = ck__" and "a2 = enva__" and "a3 = sa__" and "a4 = Lit l__" and "a5 = (sa__, Rval (Litv l__))"   | ck :: "bool" and env :: "'b state" and e :: "exp0" and s1 :: "v sem_env" and s2 :: "'b state" and v1 :: "v" where "a1 = cka__" and "a2 = s1__" and "a3 = envb__" and "a4 = Raise e__" and "a5 = (s2__, Rerr (Rraise v1__))" and "evaluate cka__ s1__ envb__ e__ (s2__, Rval v1__)"   | ck :: "bool" and env :: "'b state" and e :: "exp0" and s1 :: "v sem_env" and s2 :: "'b state" and err :: "v error_result" where "a1 = ckb__" and "a2 = s1a__" and "a3 = envc__" and "a4 = Raise ea__" and "a5 = (s2a__, Rerr err__)" and "evaluate ckb__ s1a__ envc__ ea__ (s2a__, Rerr err__)"   | ck :: "bool" and s1 :: "v sem_env" and s2 :: "'b state" and env :: "'b state" and e :: "exp0" and v1 :: "v" and pes :: "(pat \<times> exp0) list" where "a1 = ckc__" and "a2 = s1b__" and "a3 = envd__" and "a4 = Handle eb__ pesa__" and "a5 = (s2b__, Rval v1a__)" and "evaluate ckc__ s1b__ envd__ eb__ (s2b__, Rval v1a__)"   | ck :: "bool" and s1 :: "'b state" and s2 :: "'b state" and env :: "v sem_env" and e :: "exp0" and pes :: "(pat \<times> exp0) list" and v1 :: "v" and bv :: "'b state \<times> (v, v) result" where "a1 = ckd__" and "a2 = enve__" and "a3 = s1c__" and "a4 = Handle ec__ pesb__" and "a5 = bv__" and "evaluate ckd__ enve__ s1c__ ec__ (s2c__, Rerr (Rraise v1b__)) \<and> evaluate_match ckd__ enve__ s2c__ v1b__ pesb__ v1b__ bv__"   | ck :: "bool" and s1 :: "'b state" and s2 :: "'b state" and env :: "v sem_env" and e :: "exp0" and pes :: "(pat \<times> exp0) list" and a :: "abort" where "a1 = cke__" and "a2 = envf__" and "a3 = s1d__" and "a4 = Handle ed__ pesc__" and "a5 = (s2d__, Rerr (Rabort a))" and "evaluate cke__ envf__ s1d__ ed__ (s2d__, Rerr (Rabort a))"   | ck :: "bool" and env :: "v sem_env" and cn :: "(char list, char list) id0 option" and es :: "exp0 list" and vs :: "v list" and s :: "'b state" and s' :: "'b state" and v1 :: "v" where "a1 = ckf__" and "a2 = envg__" and "a3 = sb__" and "a4 = Con cn__ es__" and "a5 = (s'__, Rval v1c__)" and "do_con_check (c envg__) cn__ (length es__) \<and> build_conv (c envg__) cn__ (rev vs__) = Some v1c__ \<and> evaluate_list ckf__ envg__ sb__ (rev es__) (s'__, Rval vs__)"   | ck :: "bool" and env :: "v sem_env" and cn :: "(char list, char list) id0 option" and es :: "exp0 list" and s :: "'b state" where "a1 = ckg__" and "a2 = envh__" and "a3 = sc__" and "a4 = Con cna__ esa__" and "a5 = (sc__, Rerr (Rabort Rtype_error))" and "\<not> do_con_check (c envh__) cna__ (length esa__)"   | ck :: "bool" and env :: "v sem_env" and cn :: "(char list, char list) id0 option" and es :: "exp0 list" and err :: "v error_result" and s :: "'b state" and s' :: "'b state" where "a1 = ckh__" and "a2 = envi__" and "a3 = sd__" and "a4 = Con cn esb__" and "a5 = (s'a__, Rerr erra__)" and "do_con_check (c envi__) cn (length esb__) \<and> evaluate_list ckh__ envi__ sd__ (rev esb__) (s'a__, Rerr erra__)"   | ck :: "bool" and env :: "v sem_env" and n :: "(char list, char list) id0" and v1 :: "v" and s :: "'b state" where "a1 = cki__" and "a2 = envj__" and "a3 = se__" and "a4 = Var n__" and "a5 = (se__, Rval v1d__)" and "nsLookup (sem_env.v envj__) n__ = Some v1d__"   | ck :: "bool" and env :: "v sem_env" and n :: "(char list, char list) id0" and s :: "'b state" where "a1 = ckj__" and "a2 = envk__" and "a3 = sf__" and "a4 = Var na__" and "a5 = (sf__, Rerr (Rabort Rtype_error))" and "nsLookup (sem_env.v envk__) na__ = None"   | ck :: "bool" and env :: "v sem_env" and n :: "char list" and e :: "exp0" and s :: "'b state" where "a1 = ckk__" and "a2 = envl__" and "a3 = sg__" and "a4 = Fun nb__ ee__" and "a5 = (sg__, Rval (Closure envl__ nb__ ee__))"   | ck :: "bool" and env :: "v sem_env" and es :: "exp0 list" and vs :: "v list" and env' :: "v sem_env" and e :: "exp0" and bv :: "'b state \<times> (v, v) result" and s1 :: "'b state" and s2 :: "'b state" where "a1 = ckl__" and "a2 = envm__" and "a3 = s1e__" and "a4 = App Opapp esc__" and "a5 = bva__" and "evaluate_list ckl__ envm__ s1e__ (rev esc__) (s2e__, Rval vsa__) \<and> do_opapp (rev vsa__) = Some (env'__, ef__) \<and> (ckl__ \<longrightarrow> clock s2e__ \<noteq> 0) \<and> evaluate ckl__ env'__ (if ckl__ then update_clock (\<lambda>_. clock s2e__ - 1) s2e__ else s2e__) ef__ bva__"   | ck :: "bool" and env :: "v sem_env" and es :: "exp0 list" and vs :: "v list" and env' :: "v sem_env" and e :: "exp0" and s1 :: "'b state" and s2 :: "'b state" where "a1 = ckm__" and "a2 = envn__" and "a3 = s1f__" and "a4 = App Opapp esd__" and "a5 = (s2f__, Rerr (Rabort Rtimeout_error))" and "evaluate_list ckm__ envn__ s1f__ (rev esd__) (s2f__, Rval vsb__) \<and> do_opapp (rev vsb__) = Some (env', eg__) \<and> clock s2f__ = 0 \<and> ckm__"   | ck :: "bool" and env :: "v sem_env" and es :: "exp0 list" and vs :: "v list" and s1 :: "'b state" and s2 :: "'b state" where "a1 = ckn__" and "a2 = envo__" and "a3 = s1g__" and "a4 = App Opapp ese__" and "a5 = (s2g__, Rerr (Rabort Rtype_error))" and "evaluate_list ckn__ envo__ s1g__ (rev ese__) (s2g__, Rval vsc__) \<and> do_opapp (rev vsc__) = None"   | ck :: "bool" and env :: "v sem_env" and op0 :: "op0" and es :: "exp0 list" and vs :: "v list" and res :: "(v, v) result" and s1 :: "'b state" and s2 :: "'b state" and refs' :: "v store_v list" and ffi' :: "'b ffi_state" where "a1 = cko__" and "a2 = envp__" and "a3 = s1h__" and "a4 = App op0__ esf__" and "a5 = (update_ffi (\<lambda>_. ffi') (update_refs (\<lambda>_. refs') s2h__), res)" and "evaluate_list cko__ envp__ s1h__ (rev esf__) (s2h__, Rval vsd__) \<and> do_app (refs s2h__, ffi s2h__) op0__ (rev vsd__) = Some ((refs', ffi'), res) \<and> op0__ \<noteq> Opapp"   | ck :: "bool" and env :: "v sem_env" and op0 :: "op0" and es :: "exp0 list" and vs :: "v list" and s1 :: "'b state" and s2 :: "'b state" where "a1 = ckp__" and "a2 = envq__" and "a3 = s1i__" and "a4 = App op0a__ esg__" and "a5 = (s2i__, Rerr (Rabort Rtype_error))" and "evaluate_list ckp__ envq__ s1i__ (rev esg__) (s2i__, Rval vs) \<and> do_app (refs s2i__, ffi s2i__) op0a__ (rev vs) = None \<and> op0a__ \<noteq> Opapp"   | ck :: "bool" and env :: "v sem_env" and op0 :: "op0" and es :: "exp0 list" and err :: "v error_result" and s1 :: "'b state" and s2 :: "'b state" where "a1 = ckq__" and "a2 = envr__" and "a3 = s1j__" and "a4 = App op0b__ es" and "a5 = (s2j__, Rerr errb__)" and "evaluate_list ckq__ envr__ s1j__ (rev es) (s2j__, Rerr errb__)"   | ck :: "bool" and env :: "v sem_env" and op0 :: "lop" and e1 :: "exp0" and e2 :: "exp0" and v1 :: "v" and e' :: "exp0" and bv :: "'b state \<times> (v, v) result" and s1 :: "'b state" and s2 :: "'b state" where "a1 = ckr__" and "a2 = envs__" and "a3 = s1k__" and "a4 = Log op0c__ e1__ e2__" and "a5 = bvb__" and "evaluate ckr__ envs__ s1k__ e1__ (s2k__, Rval v1e__) \<and> do_log op0c__ v1e__ e2__ = Some (Exp e'__) \<and> evaluate ckr__ envs__ s2k__ e'__ bvb__"   | ck :: "bool" and env :: "v sem_env" and op0 :: "lop" and e1 :: "exp0" and e2 :: "exp0" and v1 :: "v" and bv :: "v" and s1 :: "'b state" and s2 :: "'b state" where "a1 = cks__" and "a2 = envt__" and "a3 = s1l__" and "a4 = Log op0d__ e1a__ e2a__" and "a5 = (s2l__, Rval bvc__)" and "evaluate cks__ envt__ s1l__ e1a__ (s2l__, Rval v1f__) \<and> do_log op0d__ v1f__ e2a__ = Some (Val bvc__)"   | ck :: "bool" and env :: "v sem_env" and op0 :: "lop" and e1 :: "exp0" and e2 :: "exp0" and v1 :: "v" and s1 :: "'b state" and s2 :: "'b state" where "a1 = ckt__" and "a2 = envu__" and "a3 = s1m__" and "a4 = Log op0e__ e1b__ e2b__" and "a5 = (s2m__, Rerr (Rabort Rtype_error))" and "evaluate ckt__ envu__ s1m__ e1b__ (s2m__, Rval v1g__) \<and> do_log op0e__ v1g__ e2b__ = None"   | ck :: "bool" and env :: "v sem_env" and op0 :: "lop" and e1 :: "exp0" and e2 :: "exp0" and err :: "v error_result" and s :: "'b state" and s' :: "'b state" where "a1 = cku__" and "a2 = envv__" and "a3 = sh__" and "a4 = Log op0 e1c__ e2c__" and "a5 = (s'b__, Rerr errc__)" and "evaluate cku__ envv__ sh__ e1c__ (s'b__, Rerr errc__)"   | ck :: "bool" and env :: "v sem_env" and e1 :: "exp0" and e2 :: "exp0" and e3 :: "exp0" and v1 :: "v" and e' :: "exp0" and bv :: "'b state \<times> (v, v) result" and s1 :: "'b state" and s2 :: "'b state" where "a1 = ckv__" and "a2 = envw__" and "a3 = s1n__" and "a4 = exp0.If e1d__ e2d__ e3__" and "a5 = bvd__" and "evaluate ckv__ envw__ s1n__ e1d__ (s2n__, Rval v1h__) \<and> do_if v1h__ e2d__ e3__ = Some e' \<and> evaluate ckv__ envw__ s2n__ e' bvd__"   | ck :: "bool" and env :: "v sem_env" and e1 :: "exp0" and e2 :: "exp0" and e3 :: "exp0" and v1 :: "v" and s1 :: "'b state" and s2 :: "'b state" where "a1 = ckw__" and "a2 = envx__" and "a3 = s1o__" and "a4 = exp0.If e1e__ e2e__ e3a__" and "a5 = (s2o__, Rerr (Rabort Rtype_error))" and "evaluate ckw__ envx__ s1o__ e1e__ (s2o__, Rval v1i__) \<and> do_if v1i__ e2e__ e3a__ = None"   | ck :: "bool" and env :: "v sem_env" and e1 :: "exp0" and e2 :: "exp0" and e3 :: "exp0" and err :: "v error_result" and s :: "'b state" and s' :: "'b state" where "a1 = ckx__" and "a2 = envy__" and "a3 = si__" and "a4 = exp0.If e1f__ e2f__ e3" and "a5 = (s'c__, Rerr errd__)" and "evaluate ckx__ envy__ si__ e1f__ (s'c__, Rerr errd__)"   | ck :: "bool" and env :: "v sem_env" and e :: "exp0" and pes :: "(pat \<times> exp0) list" and v1 :: "v" and bv :: "'b state \<times> (v, v) result" and s1 :: "'b state" and s2 :: "'b state" where "a1 = cky__" and "a2 = envz__" and "a3 = s1p__" and "a4 = Mat eh__ pesd__" and "a5 = bve__" and "evaluate cky__ envz__ s1p__ eh__ (s2p__, Rval v1j__) \<and> evaluate_match cky__ envz__ s2p__ v1j__ pesd__ (Conv (Some (''Bind'', TypeExn (Short ''Bind''))) []) bve__"   | ck :: "bool" and env :: "v sem_env" and e :: "exp0" and pes :: "(pat \<times> exp0) list" and err :: "v error_result" and s :: "'b state" and s' :: "'b state" where "a1 = ckz__" and "a2 = enwa__" and "a3 = sj__" and "a4 = Mat ei__ pes" and "a5 = (s'd__, Rerr erre__)" and "evaluate ckz__ enwa__ sj__ ei__ (s'd__, Rerr erre__)"   | ck :: "bool" and env :: "v sem_env" and n :: "char list option" and e1 :: "exp0" and e2 :: "exp0" and v1 :: "v" and bv :: "'b state \<times> (v, v) result" and s1 :: "'b state" and s2 :: "'b state" where "a1 = cla__" and "a2 = enwb__" and "a3 = s1" and "a4 = exp0.Let nc__ e1g__ e2g__" and "a5 = bvf__" and "evaluate cla__ enwb__ s1 e1g__ (s2, Rval v1) \<and> evaluate cla__ (update_v (\<lambda>_. nsOptBind nc__ v1 (sem_env.v enwb__)) enwb__) s2 e2g__ bvf__"   | ck :: "bool" and env :: "v sem_env" and n :: "char list option" and e1 :: "exp0" and e2 :: "exp0" and err :: "v error_result" and s :: "'b state" and s' :: "'b state" where "a1 = clb__" and "a2 = enwc__" and "a3 = sk__" and "a4 = exp0.Let n e1 e2" and "a5 = (s', Rerr err)" and "evaluate clb__ enwc__ sk__ e1 (s', Rerr err)"   | ck :: "bool" and env :: "v sem_env" and funs :: "(char list \<times> char list \<times> exp0) list" and e :: "exp0" and bv :: "'b state \<times> (v, v) result" and s :: "'b state" where "a1 = clc__" and "a2 = enwd__" and "a3 = sl__" and "a4 = Letrec funs__ ej__" and "a5 = bvg__" and "allDistinct (map (\<lambda>x. case x of (x, y, z) \<Rightarrow> x) funs__) \<and> evaluate clc__ (update_v (\<lambda>_. build_rec_env funs__ enwd__ (sem_env.v enwd__)) enwd__) sl__ ej__ bvg__"   | ck :: "bool" and env :: "v sem_env" and funs :: "(char list \<times> char list \<times> exp0) list" and e :: "exp0" and s :: "'b state" where "a1 = cld__" and "a2 = enwe__" and "a3 = sm__" and "a4 = Letrec funs ek__" and "a5 = (sm__, Rerr (Rabort Rtype_error))" and "\<not> allDistinct (map (\<lambda>x. case x of (x, y, z) \<Rightarrow> x) funs)"   | ck :: "bool" and env :: "v sem_env" and e :: "exp0" and t0 :: "t" and s :: "'b state" and bv :: "'b state \<times> (v, v) result" where "a1 = cle__" and "a2 = enwf__" and "a3 = sn__" and "a4 = Tannot el__ t0" and "a5 = bvh__" and "evaluate cle__ enwf__ sn__ el__ bvh__"   | ck :: "bool" and env :: "v sem_env" and e :: "exp0" and l :: "locn \<times> locn" and s :: "'b state" and bv :: "'b state \<times> (v, v) result" where "a1 = ck" and "a2 = env" and "a3 = s" and "a4 = Lannot e l" and "a5 = bv" and "evaluate ck env s e bv"