src/HOL/Bali/TypeRel.thy
changeset 38541 9cfafdb56749
parent 37956 ee939247b2fb
child 45605 a89b4bc311a5
equal deleted inserted replaced
38540:8c08631cb4b6 38541:9cfafdb56749
   510 
   510 
   511 lemma widen_NT2: "G\<turnstile>S\<preceq>NT \<Longrightarrow> S = NT"
   511 lemma widen_NT2: "G\<turnstile>S\<preceq>NT \<Longrightarrow> S = NT"
   512 apply (ind_cases "G\<turnstile>S\<preceq>NT")
   512 apply (ind_cases "G\<turnstile>S\<preceq>NT")
   513 by auto
   513 by auto
   514 
   514 
   515 lemma widen_Object:"\<lbrakk>isrtype G T;ws_prog G\<rbrakk> \<Longrightarrow> G\<turnstile>RefT T \<preceq> Class Object"
   515 lemma widen_Object:
   516 apply (case_tac T)
   516   assumes "isrtype G T" and "ws_prog G"
   517 apply (auto)
   517   shows "G\<turnstile>RefT T \<preceq> Class Object"
   518 apply (subgoal_tac "G\<turnstile>qtname_ext_type\<preceq>\<^sub>C Object")
   518 proof (cases T)
   519 apply (auto intro: subcls_ObjectI)
   519   case (ClassT C) with assms have "G\<turnstile>C\<preceq>\<^sub>C Object" by (auto intro: subcls_ObjectI)
   520 done
   520   with ClassT show ?thesis by auto
       
   521 qed simp_all
   521 
   522 
   522 lemma widen_trans_lemma [rule_format (no_asm)]: 
   523 lemma widen_trans_lemma [rule_format (no_asm)]: 
   523   "\<lbrakk>G\<turnstile>S\<preceq>U; \<forall>C. is_class G C \<longrightarrow> G\<turnstile>C\<preceq>\<^sub>C Object\<rbrakk> \<Longrightarrow> \<forall>T. G\<turnstile>U\<preceq>T \<longrightarrow> G\<turnstile>S\<preceq>T"
   524   "\<lbrakk>G\<turnstile>S\<preceq>U; \<forall>C. is_class G C \<longrightarrow> G\<turnstile>C\<preceq>\<^sub>C Object\<rbrakk> \<Longrightarrow> \<forall>T. G\<turnstile>U\<preceq>T \<longrightarrow> G\<turnstile>S\<preceq>T"
   524 apply (erule widen.induct)
   525 apply (erule widen.induct)
   525 apply        safe
   526 apply        safe