cases: fixes P :: "(char list \<times> base list \<times> (char list \<times> ty) list \<times> (char list \<times> ty list \<times> ty \<times> char list list \<times> expr) list) list"   and a1 :: "char list \<Rightarrow> ty option"   and a2 :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option"   and a3 :: "expr"   and a4 :: "ty" assumes "P,a1,a2 \<turnstile> a3 : a4" obtains C :: "char list" and E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" where "a1 = Ea__" and "a2 = h__" and "a3 = new Ca__" and "a4 = Class Ca__" and "is_class P Ca__"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e :: "expr" and T :: "ty" and C :: "char list" where "a1 = Eb__" and "a2 = ha__" and "a3 = Cast Cb__ ea__" and "a4 = Class Cb__" and "P,Eb__,ha__ \<turnstile> ea__ : Ta__" and "is_refT Ta__" and "is_class P Cb__"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e :: "expr" and T :: "ty" and C :: "char list" where "a1 = Ec__" and "a2 = hb__" and "a3 = \<lparr>Cc__\<rparr>eb__" and "a4 = Class Cc__" and "P,Ec__,hb__ \<turnstile> eb__ : Tb__" and "is_refT Tb__" and "is_class P Cc__"   | h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and v :: "val" and T :: "ty" and E :: "char list \<Rightarrow> ty option" where "a1 = Ed__" and "a2 = hc__" and "a3 = Val v" and "a4 = Tc__" and "P \<turnstile> typeof\<^bsub>hc__\<^esub> v = \<lfloor>Tc__\<rfloor>"   | E :: "char list \<Rightarrow> ty option" and V :: "char list" and T :: "ty" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" where "a1 = Ee__" and "a2 = hd__" and "a3 = Var V__" and "a4 = Td__" and "Ee__ V__ = \<lfloor>Td__\<rfloor>"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e\<^sub>1 :: "expr" and T\<^sub>1 :: "ty" and e\<^sub>2 :: "expr" and T\<^sub>2 :: "ty" and bop :: "bop" and T :: "ty" where "a1 = Ef__" and "a2 = he__" and "a3 = e\<^sub>1__ \<guillemotleft>bop\<guillemotright> e\<^sub>2__" and "a4 = Te__" and "P,Ef__,he__ \<turnstile> e\<^sub>1__ : T\<^sub>1__" and "P,Ef__,he__ \<turnstile> e\<^sub>2__ : T\<^sub>2__" and "case bop of Eq \<Rightarrow> Te__ = Boolean | Add \<Rightarrow> T\<^sub>1__ = Integer \<and> T\<^sub>2__ = Integer \<and> Te__ = Integer"   | E :: "char list \<Rightarrow> ty option" and V :: "char list" and T :: "ty" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e :: "expr" and T' :: "ty" where "a1 = Eg__" and "a2 = hf__" and "a3 = Va__:=ec__" and "a4 = Tf__" and "Eg__ Va__ = \<lfloor>Tf__\<rfloor>" and "P,Eg__,hf__ \<turnstile> ec__ : T'__" and "P \<turnstile> T'__ \<le> Tf__"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e :: "expr" and C :: "char list" and Cs :: "char list list" and F :: "char list" and T :: "ty" where "a1 = Eh__" and "a2 = hg__" and "a3 = ed__\<bullet>F__{Cs__}" and "a4 = Tg__" and "P,Eh__,hg__ \<turnstile> ed__ : Class Cd__" and "Cs__ \<noteq> []" and "P \<turnstile> Cd__ has least F__:Tg__ via Cs__"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e :: "expr" and F :: "char list" and Cs :: "char list list" and T :: "ty" where "a1 = Ei__" and "a2 = hh__" and "a3 = ee__\<bullet>Fa__{Csa__}" and "a4 = Th__" and "P,Ei__,hh__ \<turnstile> ee__ : NT"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e\<^sub>1 :: "expr" and C :: "char list" and Cs :: "char list list" and F :: "char list" and T :: "ty" and e\<^sub>2 :: "expr" and T' :: "ty" where "a1 = Ej__" and "a2 = hi__" and "a3 = e\<^sub>1'__\<bullet>Fb__{Csb__} := e\<^sub>2'__" and "a4 = Ti__" and "P,Ej__,hi__ \<turnstile> e\<^sub>1'__ : Class Ce__" and "Csb__ \<noteq> []" and "P \<turnstile> Ce__ has least Fb__:Ti__ via Csb__" and "P,Ej__,hi__ \<turnstile> e\<^sub>2'__ : T'a__" and "P \<turnstile> T'a__ \<le> Ti__"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e\<^sub>1 :: "expr" and e\<^sub>2 :: "expr" and T' :: "ty" and T :: "ty" and F :: "char list" and Cs :: "char list list" where "a1 = Ek__" and "a2 = hj__" and "a3 = e\<^sub>1''__\<bullet>F{Csc__} := e\<^sub>2''__" and "a4 = Tj__" and "P,Ek__,hj__ \<turnstile> e\<^sub>1''__ : NT" and "P,Ek__,hj__ \<turnstile> e\<^sub>2''__ : T'b__" and "P \<turnstile> T'b__ \<le> Tj__"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e :: "expr" and C :: "char list" and M :: "char list" and Ts :: "ty list" and T :: "ty" and m :: "char list list \<times> expr" and Cs :: "char list list" and es :: "expr list" and Ts' :: "ty list" where "a1 = El__" and "a2 = hk__" and "a3 = Call ef__ None M__ es__" and "a4 = Tk__" and "P,El__,hk__ \<turnstile> ef__ : Class Cf__" and "P \<turnstile> Cf__ has least M__ = (Ts__, Tk__, m__) via Csd__" and "P,El__,hk__ \<turnstile> es__ [:] Ts'__" and "P \<turnstile> Ts'__ [\<le>] Ts__"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e :: "expr" and C' :: "char list" and C :: "char list" and M :: "char list" and Ts :: "ty list" and T :: "ty" and m :: "char list list \<times> expr" and Cs :: "char list list" and es :: "expr list" and Ts' :: "ty list" where "a1 = Em__" and "a2 = hl__" and "a3 = Call eg__ \<lfloor>C\<rfloor> Ma__ esa__" and "a4 = Tl__" and "P,Em__,hl__ \<turnstile> eg__ : Class C'" and "P \<turnstile> Path C' to C unique" and "P \<turnstile> C has least Ma__ = (Tsa__, Tl__, m) via Cs" and "P,Em__,hl__ \<turnstile> esa__ [:] Ts'" and "P \<turnstile> Ts' [\<le>] Tsa__"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e :: "expr" and es :: "expr list" and Ts :: "ty list" and Copt :: "char list option" and M :: "char list" and T :: "ty" where "a1 = En__" and "a2 = hm__" and "a3 = Call eh__ Copt M es" and "a4 = Tm__" and "P,En__,hm__ \<turnstile> eh__ : NT" and "P,En__,hm__ \<turnstile> es [:] Ts"   | E :: "char list \<Rightarrow> ty option" and V :: "char list" and T :: "ty" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e :: "expr" and T' :: "ty" where "a1 = Eo__" and "a2 = hn__" and "a3 = {V:Tn__; ei__}" and "a4 = T'c__" and "P,Eo__(V \<mapsto> Tn__),hn__ \<turnstile> ei__ : T'c__" and "is_type P Tn__"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e\<^sub>1 :: "expr" and T\<^sub>1 :: "ty" and e\<^sub>2 :: "expr" and T\<^sub>2 :: "ty" where "a1 = Ep__" and "a2 = ho__" and "a3 = e\<^sub>1'''__;; e\<^sub>2'''__" and "a4 = T\<^sub>2" and "P,Ep__,ho__ \<turnstile> e\<^sub>1'''__ : T\<^sub>1" and "P,Ep__,ho__ \<turnstile> e\<^sub>2'''__ : T\<^sub>2"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e :: "expr" and e\<^sub>1 :: "expr" and T :: "ty" and e\<^sub>2 :: "expr" where "a1 = Eq__" and "a2 = hp__" and "a3 = if (ej__) e\<^sub>1 else e\<^sub>2" and "a4 = To__" and "P,Eq__,hp__ \<turnstile> ej__ : Boolean" and "P,Eq__,hp__ \<turnstile> e\<^sub>1 : To__" and "P,Eq__,hp__ \<turnstile> e\<^sub>2 : To__"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e :: "expr" and c :: "expr" and T :: "ty" where "a1 = Er__" and "a2 = hq__" and "a3 = while (ek__) c" and "a4 = Void" and "P,Er__,hq__ \<turnstile> ek__ : Boolean" and "P,Er__,hq__ \<turnstile> c : Tp__"   | E :: "char list \<Rightarrow> ty option" and h :: "nat \<Rightarrow> (char list \<times> (char list list \<times> (char list \<Rightarrow> val option)) set) option" and e :: "expr" and T' :: "ty" and T :: "ty" where "a1 = E" and "a2 = h" and "a3 = throw e" and "a4 = T" and "P,E,h \<turnstile> e : T'" and "is_refT T'"