src/HOLCF/Bifinite.thy
changeset 26407 562a1d615336
parent 25923 5fe4b543512e
child 26962 c8b20f615d6c
--- a/src/HOLCF/Bifinite.thy	Wed Mar 26 21:05:58 2008 +0100
+++ b/src/HOLCF/Bifinite.thy	Wed Mar 26 22:38:17 2008 +0100
@@ -9,19 +9,19 @@
 imports Cfun
 begin
 
-subsection {* Bifinite domains *}
+subsection {* Omega-profinite and bifinite domains *}
 
 axclass approx < cpo
 
 consts approx :: "nat \<Rightarrow> 'a::approx \<rightarrow> 'a"
 
-axclass bifinite_cpo < approx
+axclass profinite < approx
   chain_approx_app: "chain (\<lambda>i. approx i\<cdot>x)"
   lub_approx_app [simp]: "(\<Squnion>i. approx i\<cdot>x) = x"
   approx_idem: "approx i\<cdot>(approx i\<cdot>x) = approx i\<cdot>x"
   finite_fixes_approx: "finite {x. approx i\<cdot>x = x}"
 
-axclass bifinite < bifinite_cpo, pcpo
+axclass bifinite < profinite, pcpo
 
 lemma finite_range_imp_finite_fixes:
   "finite {x. \<exists>y. x = f y} \<Longrightarrow> finite {x. f x = x}"
@@ -31,17 +31,17 @@
 done
 
 lemma chain_approx [simp]:
-  "chain (approx :: nat \<Rightarrow> 'a::bifinite_cpo \<rightarrow> 'a)"
+  "chain (approx :: nat \<Rightarrow> 'a::profinite \<rightarrow> 'a)"
 apply (rule chainI)
 apply (rule less_cfun_ext)
 apply (rule chainE)
 apply (rule chain_approx_app)
 done
 
-lemma lub_approx [simp]: "(\<Squnion>i. approx i) = (\<Lambda>(x::'a::bifinite_cpo). x)"
+lemma lub_approx [simp]: "(\<Squnion>i. approx i) = (\<Lambda>(x::'a::profinite). x)"
 by (rule ext_cfun, simp add: contlub_cfun_fun)
 
-lemma approx_less: "approx i\<cdot>x \<sqsubseteq> (x::'a::bifinite_cpo)"
+lemma approx_less: "approx i\<cdot>x \<sqsubseteq> (x::'a::profinite)"
 apply (subgoal_tac "approx i\<cdot>x \<sqsubseteq> (\<Squnion>i. approx i\<cdot>x)", simp)
 apply (rule is_ub_thelub, simp)
 done
@@ -50,7 +50,7 @@
 by (rule UU_I, rule approx_less)
 
 lemma approx_approx1:
-  "i \<le> j \<Longrightarrow> approx i\<cdot>(approx j\<cdot>x) = approx i\<cdot>(x::'a::bifinite_cpo)"
+  "i \<le> j \<Longrightarrow> approx i\<cdot>(approx j\<cdot>x) = approx i\<cdot>(x::'a::profinite)"
 apply (rule antisym_less)
 apply (rule monofun_cfun_arg [OF approx_less])
 apply (rule sq_ord_eq_less_trans [OF approx_idem [symmetric]])
@@ -60,7 +60,7 @@
 done
 
 lemma approx_approx2:
-  "j \<le> i \<Longrightarrow> approx i\<cdot>(approx j\<cdot>x) = approx j\<cdot>(x::'a::bifinite_cpo)"
+  "j \<le> i \<Longrightarrow> approx i\<cdot>(approx j\<cdot>x) = approx j\<cdot>(x::'a::profinite)"
 apply (rule antisym_less)
 apply (rule approx_less)
 apply (rule sq_ord_eq_less_trans [OF approx_idem [symmetric]])
@@ -69,7 +69,7 @@
 done
 
 lemma approx_approx [simp]:
-  "approx i\<cdot>(approx j\<cdot>x) = approx (min i j)\<cdot>(x::'a::bifinite_cpo)"
+  "approx i\<cdot>(approx j\<cdot>x) = approx (min i j)\<cdot>(x::'a::profinite)"
 apply (rule_tac x=i and y=j in linorder_le_cases)
 apply (simp add: approx_approx1 min_def)
 apply (simp add: approx_approx2 min_def)
@@ -79,15 +79,15 @@
   "\<forall>x. f (f x) = f x \<Longrightarrow> {x. f x = x} = {y. \<exists>x. y = f x}"
 by (auto simp add: eq_sym_conv)
 
-lemma finite_approx: "finite {y::'a::bifinite_cpo. \<exists>x. y = approx n\<cdot>x}"
+lemma finite_approx: "finite {y::'a::profinite. \<exists>x. y = approx n\<cdot>x}"
 using finite_fixes_approx by (simp add: idem_fixes_eq_range)
 
 lemma finite_range_approx:
-  "finite (range (\<lambda>x::'a::bifinite_cpo. approx n\<cdot>x))"
+  "finite (range (\<lambda>x::'a::profinite. approx n\<cdot>x))"
 by (simp add: image_def finite_approx)
 
 lemma compact_approx [simp]:
-  fixes x :: "'a::bifinite_cpo"
+  fixes x :: "'a::profinite"
   shows "compact (approx n\<cdot>x)"
 proof (rule compactI2)
   fix Y::"nat \<Rightarrow> 'a"
@@ -118,7 +118,7 @@
 qed
 
 lemma bifinite_compact_eq_approx:
-  fixes x :: "'a::bifinite_cpo"
+  fixes x :: "'a::profinite"
   assumes x: "compact x"
   shows "\<exists>i. approx i\<cdot>x = x"
 proof -
@@ -132,7 +132,7 @@
 qed
 
 lemma bifinite_compact_iff:
-  "compact (x::'a::bifinite_cpo) = (\<exists>n. approx n\<cdot>x = x)"
+  "compact (x::'a::profinite) = (\<exists>n. approx n\<cdot>x = x)"
  apply (rule iffI)
   apply (erule bifinite_compact_eq_approx)
  apply (erule exE)
@@ -142,7 +142,7 @@
 
 lemma approx_induct:
   assumes adm: "adm P" and P: "\<And>n x. P (approx n\<cdot>x)"
-  shows "P (x::'a::bifinite)"
+  shows "P (x::'a::profinite)"
 proof -
   have "P (\<Squnion>n. approx n\<cdot>x)"
     by (rule admD [OF adm], simp, simp add: P)
@@ -150,7 +150,7 @@
 qed
 
 lemma bifinite_less_ext:
-  fixes x y :: "'a::bifinite_cpo"
+  fixes x y :: "'a::profinite"
   shows "(\<And>i. approx i\<cdot>x \<sqsubseteq> approx i\<cdot>y) \<Longrightarrow> x \<sqsubseteq> y"
 apply (subgoal_tac "(\<Squnion>i. approx i\<cdot>x) \<sqsubseteq> (\<Squnion>i. approx i\<cdot>y)", simp)
 apply (rule lub_mono, simp, simp, simp)
@@ -178,13 +178,13 @@
  apply clarsimp
 done
 
-instance "->" :: (bifinite_cpo, bifinite_cpo) approx ..
+instance "->" :: (profinite, profinite) approx ..
 
 defs (overloaded)
   approx_cfun_def:
     "approx \<equiv> \<lambda>n. \<Lambda> f x. approx n\<cdot>(f\<cdot>(approx n\<cdot>x))"
 
-instance "->" :: (bifinite_cpo, bifinite_cpo) bifinite_cpo
+instance "->" :: (profinite, profinite) profinite
  apply (intro_classes, unfold approx_cfun_def)
     apply simp
    apply (simp add: lub_distribs eta_cfun)
@@ -194,7 +194,7 @@
  apply (intro finite_range_lemma finite_approx)
 done
 
-instance "->" :: (bifinite_cpo, bifinite) bifinite ..
+instance "->" :: (profinite, bifinite) bifinite ..
 
 lemma approx_cfun: "approx n\<cdot>f\<cdot>x = approx n\<cdot>(f\<cdot>(approx n\<cdot>x))"
 by (simp add: approx_cfun_def)