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