src/HOL/Nominal/Examples/Fsub.thy
changeset 67443 3abf6a722518
parent 66453 cc19f7ca2ed6
child 69597 ff784d5a5bfb
equal deleted inserted replaced
67442:f075640b8868 67443:3abf6a722518
   700   and     b: "T closed_in \<Gamma>"
   700   and     b: "T closed_in \<Gamma>"
   701   shows "\<Gamma> \<turnstile> T <: T"
   701   shows "\<Gamma> \<turnstile> T <: T"
   702 using a b
   702 using a b
   703 apply(nominal_induct T avoiding: \<Gamma> rule: ty.strong_induct)
   703 apply(nominal_induct T avoiding: \<Gamma> rule: ty.strong_induct)
   704 apply(auto simp add: ty.supp abs_supp supp_atm closed_in_def)
   704 apply(auto simp add: ty.supp abs_supp supp_atm closed_in_def)
   705   \<comment>\<open>Too bad that this instantiation cannot be found automatically by
   705   \<comment> \<open>Too bad that this instantiation cannot be found automatically by
   706   \isakeyword{auto}; \isakeyword{blast} would find it if we had not used 
   706   \isakeyword{auto}; \isakeyword{blast} would find it if we had not used 
   707   an explicit definition for \<open>closed_in_def\<close>.\<close>
   707   an explicit definition for \<open>closed_in_def\<close>.\<close>
   708 apply(drule_tac x="(TVarB tyvrs ty2)#\<Gamma>" in meta_spec)
   708 apply(drule_tac x="(TVarB tyvrs ty2)#\<Gamma>" in meta_spec)
   709 apply(force dest: fresh_dom simp add: closed_in_def)
   709 apply(force dest: fresh_dom simp add: closed_in_def)
   710 done
   710 done
   967       }
   967       }
   968       ultimately show "\<Gamma> \<turnstile> (\<forall>X<:S\<^sub>1. S\<^sub>2) <: T" by blast
   968       ultimately show "\<Gamma> \<turnstile> (\<forall>X<:S\<^sub>1. S\<^sub>2) <: T" by blast
   969     qed
   969     qed
   970   } note transitivity_lemma = this  
   970   } note transitivity_lemma = this  
   971 
   971 
   972   { \<comment>\<open>The transitivity proof is now by the auxiliary lemma.\<close>
   972   { \<comment> \<open>The transitivity proof is now by the auxiliary lemma.\<close>
   973     case 1 
   973     case 1 
   974     from \<open>\<Gamma> \<turnstile> S <: Q\<close> and \<open>\<Gamma> \<turnstile> Q <: T\<close>
   974     from \<open>\<Gamma> \<turnstile> S <: Q\<close> and \<open>\<Gamma> \<turnstile> Q <: T\<close>
   975     show "\<Gamma> \<turnstile> S <: T" by (rule transitivity_lemma) 
   975     show "\<Gamma> \<turnstile> S <: T" by (rule transitivity_lemma) 
   976   next 
   976   next 
   977     case 2
   977     case 2