src/HOLCF/Pcpo.thy
changeset 26023 29c1e3e98276
parent 25923 5fe4b543512e
child 26026 f9647c040b58
equal deleted inserted replaced
26022:b30a342a6e29 26023:29c1e3e98276
   312 by (safe dest!: ax_flat)
   312 by (safe dest!: ax_flat)
   313 
   313 
   314 lemma chfin2finch: "chain (Y::nat \<Rightarrow> 'a::chfin) \<Longrightarrow> finite_chain Y"
   314 lemma chfin2finch: "chain (Y::nat \<Rightarrow> 'a::chfin) \<Longrightarrow> finite_chain Y"
   315 by (simp add: chfin finite_chain_def)
   315 by (simp add: chfin finite_chain_def)
   316 
   316 
       
   317 text {* Discrete cpos *}
       
   318 
       
   319 axclass discrete_cpo < sq_ord
       
   320   discrete_cpo [simp]: "x \<sqsubseteq> y \<longleftrightarrow> x = y"
       
   321 
       
   322 instance discrete_cpo < po
       
   323 by (intro_classes, simp_all)
       
   324 
       
   325 text {* In a discrete cpo, every chain is constant *}
       
   326 
       
   327 lemma discrete_chain_const:
       
   328   assumes S: "chain (S::nat \<Rightarrow> 'a::discrete_cpo)"
       
   329   shows "\<exists>x. S = (\<lambda>i. x)"
       
   330 proof (intro exI ext)
       
   331   fix i :: nat
       
   332   have "S 0 \<sqsubseteq> S i" using S le0 by (rule chain_mono)
       
   333   hence "S 0 = S i" by simp
       
   334   thus "S i = S 0" by (rule sym)
       
   335 qed
       
   336 
       
   337 instance discrete_cpo < cpo
       
   338 proof
       
   339   fix S :: "nat \<Rightarrow> 'a"
       
   340   assume S: "chain S"
       
   341   hence "\<exists>x. S = (\<lambda>i. x)"
       
   342     by (rule discrete_chain_const)
       
   343   thus "\<exists>x. range S <<| x"
       
   344     by (fast intro: lub_const)
       
   345 qed
       
   346 
   317 text {* lemmata for improved admissibility introdution rule *}
   347 text {* lemmata for improved admissibility introdution rule *}
   318 
   348 
   319 lemma infinite_chain_adm_lemma:
   349 lemma infinite_chain_adm_lemma:
   320   "\<lbrakk>chain Y; \<forall>i. P (Y i);  
   350   "\<lbrakk>chain Y; \<forall>i. P (Y i);  
   321     \<And>Y. \<lbrakk>chain Y; \<forall>i. P (Y i); \<not> finite_chain Y\<rbrakk> \<Longrightarrow> P (\<Squnion>i. Y i)\<rbrakk>
   351     \<And>Y. \<lbrakk>chain Y; \<forall>i. P (Y i); \<not> finite_chain Y\<rbrakk> \<Longrightarrow> P (\<Squnion>i. Y i)\<rbrakk>