rename class bifinite_cpo to profinite; generalize powerdomains from bifinite to profinite
authorhuffman
Wed Mar 26 22:38:17 2008 +0100 (2008-03-26)
changeset 26407562a1d615336
parent 26406 be5b78d95801
child 26408 6964c4799f47
rename class bifinite_cpo to profinite; generalize powerdomains from bifinite to profinite
src/HOLCF/Bifinite.thy
src/HOLCF/CompactBasis.thy
src/HOLCF/ConvexPD.thy
src/HOLCF/Cprod.thy
src/HOLCF/LowerPD.thy
src/HOLCF/Up.thy
src/HOLCF/UpperPD.thy
     1.1 --- a/src/HOLCF/Bifinite.thy	Wed Mar 26 21:05:58 2008 +0100
     1.2 +++ b/src/HOLCF/Bifinite.thy	Wed Mar 26 22:38:17 2008 +0100
     1.3 @@ -9,19 +9,19 @@
     1.4  imports Cfun
     1.5  begin
     1.6  
     1.7 -subsection {* Bifinite domains *}
     1.8 +subsection {* Omega-profinite and bifinite domains *}
     1.9  
    1.10  axclass approx < cpo
    1.11  
    1.12  consts approx :: "nat \<Rightarrow> 'a::approx \<rightarrow> 'a"
    1.13  
    1.14 -axclass bifinite_cpo < approx
    1.15 +axclass profinite < approx
    1.16    chain_approx_app: "chain (\<lambda>i. approx i\<cdot>x)"
    1.17    lub_approx_app [simp]: "(\<Squnion>i. approx i\<cdot>x) = x"
    1.18    approx_idem: "approx i\<cdot>(approx i\<cdot>x) = approx i\<cdot>x"
    1.19    finite_fixes_approx: "finite {x. approx i\<cdot>x = x}"
    1.20  
    1.21 -axclass bifinite < bifinite_cpo, pcpo
    1.22 +axclass bifinite < profinite, pcpo
    1.23  
    1.24  lemma finite_range_imp_finite_fixes:
    1.25    "finite {x. \<exists>y. x = f y} \<Longrightarrow> finite {x. f x = x}"
    1.26 @@ -31,17 +31,17 @@
    1.27  done
    1.28  
    1.29  lemma chain_approx [simp]:
    1.30 -  "chain (approx :: nat \<Rightarrow> 'a::bifinite_cpo \<rightarrow> 'a)"
    1.31 +  "chain (approx :: nat \<Rightarrow> 'a::profinite \<rightarrow> 'a)"
    1.32  apply (rule chainI)
    1.33  apply (rule less_cfun_ext)
    1.34  apply (rule chainE)
    1.35  apply (rule chain_approx_app)
    1.36  done
    1.37  
    1.38 -lemma lub_approx [simp]: "(\<Squnion>i. approx i) = (\<Lambda>(x::'a::bifinite_cpo). x)"
    1.39 +lemma lub_approx [simp]: "(\<Squnion>i. approx i) = (\<Lambda>(x::'a::profinite). x)"
    1.40  by (rule ext_cfun, simp add: contlub_cfun_fun)
    1.41  
    1.42 -lemma approx_less: "approx i\<cdot>x \<sqsubseteq> (x::'a::bifinite_cpo)"
    1.43 +lemma approx_less: "approx i\<cdot>x \<sqsubseteq> (x::'a::profinite)"
    1.44  apply (subgoal_tac "approx i\<cdot>x \<sqsubseteq> (\<Squnion>i. approx i\<cdot>x)", simp)
    1.45  apply (rule is_ub_thelub, simp)
    1.46  done
    1.47 @@ -50,7 +50,7 @@
    1.48  by (rule UU_I, rule approx_less)
    1.49  
    1.50  lemma approx_approx1:
    1.51 -  "i \<le> j \<Longrightarrow> approx i\<cdot>(approx j\<cdot>x) = approx i\<cdot>(x::'a::bifinite_cpo)"
    1.52 +  "i \<le> j \<Longrightarrow> approx i\<cdot>(approx j\<cdot>x) = approx i\<cdot>(x::'a::profinite)"
    1.53  apply (rule antisym_less)
    1.54  apply (rule monofun_cfun_arg [OF approx_less])
    1.55  apply (rule sq_ord_eq_less_trans [OF approx_idem [symmetric]])
    1.56 @@ -60,7 +60,7 @@
    1.57  done
    1.58  
    1.59  lemma approx_approx2:
    1.60 -  "j \<le> i \<Longrightarrow> approx i\<cdot>(approx j\<cdot>x) = approx j\<cdot>(x::'a::bifinite_cpo)"
    1.61 +  "j \<le> i \<Longrightarrow> approx i\<cdot>(approx j\<cdot>x) = approx j\<cdot>(x::'a::profinite)"
    1.62  apply (rule antisym_less)
    1.63  apply (rule approx_less)
    1.64  apply (rule sq_ord_eq_less_trans [OF approx_idem [symmetric]])
    1.65 @@ -69,7 +69,7 @@
    1.66  done
    1.67  
    1.68  lemma approx_approx [simp]:
    1.69 -  "approx i\<cdot>(approx j\<cdot>x) = approx (min i j)\<cdot>(x::'a::bifinite_cpo)"
    1.70 +  "approx i\<cdot>(approx j\<cdot>x) = approx (min i j)\<cdot>(x::'a::profinite)"
    1.71  apply (rule_tac x=i and y=j in linorder_le_cases)
    1.72  apply (simp add: approx_approx1 min_def)
    1.73  apply (simp add: approx_approx2 min_def)
    1.74 @@ -79,15 +79,15 @@
    1.75    "\<forall>x. f (f x) = f x \<Longrightarrow> {x. f x = x} = {y. \<exists>x. y = f x}"
    1.76  by (auto simp add: eq_sym_conv)
    1.77  
    1.78 -lemma finite_approx: "finite {y::'a::bifinite_cpo. \<exists>x. y = approx n\<cdot>x}"
    1.79 +lemma finite_approx: "finite {y::'a::profinite. \<exists>x. y = approx n\<cdot>x}"
    1.80  using finite_fixes_approx by (simp add: idem_fixes_eq_range)
    1.81  
    1.82  lemma finite_range_approx:
    1.83 -  "finite (range (\<lambda>x::'a::bifinite_cpo. approx n\<cdot>x))"
    1.84 +  "finite (range (\<lambda>x::'a::profinite. approx n\<cdot>x))"
    1.85  by (simp add: image_def finite_approx)
    1.86  
    1.87  lemma compact_approx [simp]:
    1.88 -  fixes x :: "'a::bifinite_cpo"
    1.89 +  fixes x :: "'a::profinite"
    1.90    shows "compact (approx n\<cdot>x)"
    1.91  proof (rule compactI2)
    1.92    fix Y::"nat \<Rightarrow> 'a"
    1.93 @@ -118,7 +118,7 @@
    1.94  qed
    1.95  
    1.96  lemma bifinite_compact_eq_approx:
    1.97 -  fixes x :: "'a::bifinite_cpo"
    1.98 +  fixes x :: "'a::profinite"
    1.99    assumes x: "compact x"
   1.100    shows "\<exists>i. approx i\<cdot>x = x"
   1.101  proof -
   1.102 @@ -132,7 +132,7 @@
   1.103  qed
   1.104  
   1.105  lemma bifinite_compact_iff:
   1.106 -  "compact (x::'a::bifinite_cpo) = (\<exists>n. approx n\<cdot>x = x)"
   1.107 +  "compact (x::'a::profinite) = (\<exists>n. approx n\<cdot>x = x)"
   1.108   apply (rule iffI)
   1.109    apply (erule bifinite_compact_eq_approx)
   1.110   apply (erule exE)
   1.111 @@ -142,7 +142,7 @@
   1.112  
   1.113  lemma approx_induct:
   1.114    assumes adm: "adm P" and P: "\<And>n x. P (approx n\<cdot>x)"
   1.115 -  shows "P (x::'a::bifinite)"
   1.116 +  shows "P (x::'a::profinite)"
   1.117  proof -
   1.118    have "P (\<Squnion>n. approx n\<cdot>x)"
   1.119      by (rule admD [OF adm], simp, simp add: P)
   1.120 @@ -150,7 +150,7 @@
   1.121  qed
   1.122  
   1.123  lemma bifinite_less_ext:
   1.124 -  fixes x y :: "'a::bifinite_cpo"
   1.125 +  fixes x y :: "'a::profinite"
   1.126    shows "(\<And>i. approx i\<cdot>x \<sqsubseteq> approx i\<cdot>y) \<Longrightarrow> x \<sqsubseteq> y"
   1.127  apply (subgoal_tac "(\<Squnion>i. approx i\<cdot>x) \<sqsubseteq> (\<Squnion>i. approx i\<cdot>y)", simp)
   1.128  apply (rule lub_mono, simp, simp, simp)
   1.129 @@ -178,13 +178,13 @@
   1.130   apply clarsimp
   1.131  done
   1.132  
   1.133 -instance "->" :: (bifinite_cpo, bifinite_cpo) approx ..
   1.134 +instance "->" :: (profinite, profinite) approx ..
   1.135  
   1.136  defs (overloaded)
   1.137    approx_cfun_def:
   1.138      "approx \<equiv> \<lambda>n. \<Lambda> f x. approx n\<cdot>(f\<cdot>(approx n\<cdot>x))"
   1.139  
   1.140 -instance "->" :: (bifinite_cpo, bifinite_cpo) bifinite_cpo
   1.141 +instance "->" :: (profinite, profinite) profinite
   1.142   apply (intro_classes, unfold approx_cfun_def)
   1.143      apply simp
   1.144     apply (simp add: lub_distribs eta_cfun)
   1.145 @@ -194,7 +194,7 @@
   1.146   apply (intro finite_range_lemma finite_approx)
   1.147  done
   1.148  
   1.149 -instance "->" :: (bifinite_cpo, bifinite) bifinite ..
   1.150 +instance "->" :: (profinite, bifinite) bifinite ..
   1.151  
   1.152  lemma approx_cfun: "approx n\<cdot>f\<cdot>x = approx n\<cdot>(f\<cdot>(approx n\<cdot>x))"
   1.153  by (simp add: approx_cfun_def)
     2.1 --- a/src/HOLCF/CompactBasis.thy	Wed Mar 26 21:05:58 2008 +0100
     2.2 +++ b/src/HOLCF/CompactBasis.thy	Wed Mar 26 22:38:17 2008 +0100
     2.3 @@ -355,9 +355,9 @@
     2.4  
     2.5  subsection {* Compact bases of bifinite domains *}
     2.6  
     2.7 -defaultsort bifinite
     2.8 +defaultsort profinite
     2.9  
    2.10 -typedef (open) 'a compact_basis = "{x::'a::bifinite. compact x}"
    2.11 +typedef (open) 'a compact_basis = "{x::'a::profinite. compact x}"
    2.12  by (fast intro: compact_approx)
    2.13  
    2.14  lemma compact_Rep_compact_basis [simp]: "compact (Rep_compact_basis a)"
    2.15 @@ -393,7 +393,7 @@
    2.16  text {* minimal compact element *}
    2.17  
    2.18  definition
    2.19 -  compact_bot :: "'a compact_basis" where
    2.20 +  compact_bot :: "'a::bifinite compact_basis" where
    2.21    "compact_bot = Abs_compact_basis \<bottom>"
    2.22  
    2.23  lemma Rep_compact_bot: "Rep_compact_basis compact_bot = \<bottom>"
    2.24 @@ -544,7 +544,7 @@
    2.25  subsection {* A compact basis for powerdomains *}
    2.26  
    2.27  typedef 'a pd_basis =
    2.28 -  "{S::'a::bifinite compact_basis set. finite S \<and> S \<noteq> {}}"
    2.29 +  "{S::'a::profinite compact_basis set. finite S \<and> S \<noteq> {}}"
    2.30  by (rule_tac x="{arbitrary}" in exI, simp)
    2.31  
    2.32  lemma finite_Rep_pd_basis [simp]: "finite (Rep_pd_basis u)"
     3.1 --- a/src/HOLCF/ConvexPD.thy	Wed Mar 26 21:05:58 2008 +0100
     3.2 +++ b/src/HOLCF/ConvexPD.thy	Wed Mar 26 22:38:17 2008 +0100
     3.3 @@ -142,7 +142,7 @@
     3.4  subsection {* Type definition *}
     3.5  
     3.6  cpodef (open) 'a convex_pd =
     3.7 -  "{S::'a::bifinite pd_basis set. convex_le.ideal S}"
     3.8 +  "{S::'a::profinite pd_basis set. convex_le.ideal S}"
     3.9  apply (simp add: convex_le.adm_ideal)
    3.10  apply (fast intro: convex_le.ideal_principal)
    3.11  done
    3.12 @@ -206,7 +206,7 @@
    3.13  
    3.14  subsection {* Approximation *}
    3.15  
    3.16 -instance convex_pd :: (bifinite) approx ..
    3.17 +instance convex_pd :: (profinite) approx ..
    3.18  
    3.19  defs (overloaded)
    3.20    approx_convex_pd_def:
    3.21 @@ -245,7 +245,7 @@
    3.22  unfolding approx_convex_pd_def
    3.23  by (rule convex_pd.finite_fixes_basis_fun_take)
    3.24  
    3.25 -instance convex_pd :: (bifinite) bifinite
    3.26 +instance convex_pd :: (profinite) profinite
    3.27  apply intro_classes
    3.28  apply (simp add: chain_approx_convex_pd)
    3.29  apply (rule lub_approx_convex_pd)
    3.30 @@ -253,6 +253,8 @@
    3.31  apply (rule finite_fixes_approx_convex_pd)
    3.32  done
    3.33  
    3.34 +instance convex_pd :: (bifinite) bifinite ..
    3.35 +
    3.36  lemma compact_imp_convex_principal:
    3.37    "compact xs \<Longrightarrow> \<exists>t. xs = convex_principal t"
    3.38  apply (drule bifinite_compact_eq_approx)
     4.1 --- a/src/HOLCF/Cprod.thy	Wed Mar 26 21:05:58 2008 +0100
     4.2 +++ b/src/HOLCF/Cprod.thy	Wed Mar 26 22:38:17 2008 +0100
     4.3 @@ -342,13 +342,13 @@
     4.4  
     4.5  subsection {* Product type is a bifinite domain *}
     4.6  
     4.7 -instance "*" :: (bifinite_cpo, bifinite_cpo) approx ..
     4.8 +instance "*" :: (profinite, profinite) approx ..
     4.9  
    4.10  defs (overloaded)
    4.11    approx_cprod_def:
    4.12      "approx \<equiv> \<lambda>n. \<Lambda>\<langle>x, y\<rangle>. \<langle>approx n\<cdot>x, approx n\<cdot>y\<rangle>"
    4.13  
    4.14 -instance "*" :: (bifinite_cpo, bifinite_cpo) bifinite_cpo
    4.15 +instance "*" :: (profinite, profinite) profinite
    4.16  proof
    4.17    fix i :: nat and x :: "'a \<times> 'b"
    4.18    show "chain (\<lambda>i. approx i\<cdot>x)"
     5.1 --- a/src/HOLCF/LowerPD.thy	Wed Mar 26 21:05:58 2008 +0100
     5.2 +++ b/src/HOLCF/LowerPD.thy	Wed Mar 26 22:38:17 2008 +0100
     5.3 @@ -97,7 +97,7 @@
     5.4  subsection {* Type definition *}
     5.5  
     5.6  cpodef (open) 'a lower_pd =
     5.7 -  "{S::'a::bifinite pd_basis set. lower_le.ideal S}"
     5.8 +  "{S::'a::profinite pd_basis set. lower_le.ideal S}"
     5.9  apply (simp add: lower_le.adm_ideal)
    5.10  apply (fast intro: lower_le.ideal_principal)
    5.11  done
    5.12 @@ -171,7 +171,7 @@
    5.13  
    5.14  subsection {* Approximation *}
    5.15  
    5.16 -instance lower_pd :: (bifinite) approx ..
    5.17 +instance lower_pd :: (profinite) approx ..
    5.18  
    5.19  defs (overloaded)
    5.20    approx_lower_pd_def:
    5.21 @@ -210,7 +210,7 @@
    5.22  unfolding approx_lower_pd_def
    5.23  by (rule lower_pd.finite_fixes_basis_fun_take)
    5.24  
    5.25 -instance lower_pd :: (bifinite) bifinite
    5.26 +instance lower_pd :: (profinite) profinite
    5.27  apply intro_classes
    5.28  apply (simp add: chain_approx_lower_pd)
    5.29  apply (rule lub_approx_lower_pd)
    5.30 @@ -218,6 +218,8 @@
    5.31  apply (rule finite_fixes_approx_lower_pd)
    5.32  done
    5.33  
    5.34 +instance lower_pd :: (bifinite) bifinite ..
    5.35 +
    5.36  lemma compact_imp_lower_principal:
    5.37    "compact xs \<Longrightarrow> \<exists>t. xs = lower_principal t"
    5.38  apply (drule bifinite_compact_eq_approx)
     6.1 --- a/src/HOLCF/Up.thy	Wed Mar 26 21:05:58 2008 +0100
     6.2 +++ b/src/HOLCF/Up.thy	Wed Mar 26 22:38:17 2008 +0100
     6.3 @@ -311,13 +311,13 @@
     6.4  
     6.5  subsection {* Lifted cpo is a bifinite domain *}
     6.6  
     6.7 -instance u :: (bifinite_cpo) approx ..
     6.8 +instance u :: (profinite) approx ..
     6.9  
    6.10  defs (overloaded)
    6.11    approx_up_def:
    6.12      "approx \<equiv> \<lambda>n. fup\<cdot>(\<Lambda> x. up\<cdot>(approx n\<cdot>x))"
    6.13  
    6.14 -instance u :: (bifinite_cpo) bifinite
    6.15 +instance u :: (profinite) bifinite
    6.16  proof
    6.17    fix i :: nat and x :: "'a u"
    6.18    show "chain (\<lambda>i. approx i\<cdot>x)"
     7.1 --- a/src/HOLCF/UpperPD.thy	Wed Mar 26 21:05:58 2008 +0100
     7.2 +++ b/src/HOLCF/UpperPD.thy	Wed Mar 26 22:38:17 2008 +0100
     7.3 @@ -95,7 +95,7 @@
     7.4  subsection {* Type definition *}
     7.5  
     7.6  cpodef (open) 'a upper_pd =
     7.7 -  "{S::'a::bifinite pd_basis set. upper_le.ideal S}"
     7.8 +  "{S::'a::profinite pd_basis set. upper_le.ideal S}"
     7.9  apply (simp add: upper_le.adm_ideal)
    7.10  apply (fast intro: upper_le.ideal_principal)
    7.11  done
    7.12 @@ -153,7 +153,7 @@
    7.13  
    7.14  subsection {* Approximation *}
    7.15  
    7.16 -instance upper_pd :: (bifinite) approx ..
    7.17 +instance upper_pd :: (profinite) approx ..
    7.18  
    7.19  defs (overloaded)
    7.20    approx_upper_pd_def:
    7.21 @@ -192,7 +192,7 @@
    7.22  unfolding approx_upper_pd_def
    7.23  by (rule upper_pd.finite_fixes_basis_fun_take)
    7.24  
    7.25 -instance upper_pd :: (bifinite) bifinite
    7.26 +instance upper_pd :: (profinite) profinite
    7.27  apply intro_classes
    7.28  apply (simp add: chain_approx_upper_pd)
    7.29  apply (rule lub_approx_upper_pd)
    7.30 @@ -200,6 +200,8 @@
    7.31  apply (rule finite_fixes_approx_upper_pd)
    7.32  done
    7.33  
    7.34 +instance upper_pd :: (bifinite) bifinite ..
    7.35 +
    7.36  lemma compact_imp_upper_principal:
    7.37    "compact xs \<Longrightarrow> \<exists>t. xs = upper_principal t"
    7.38  apply (drule bifinite_compact_eq_approx)