equal
deleted
inserted
replaced
121 |
121 |
122 typedef (open) 'a convex_pd = |
122 typedef (open) 'a convex_pd = |
123 "{S::'a pd_basis set. convex_le.ideal S}" |
123 "{S::'a pd_basis set. convex_le.ideal S}" |
124 by (fast intro: convex_le.ideal_principal) |
124 by (fast intro: convex_le.ideal_principal) |
125 |
125 |
126 instantiation convex_pd :: (bifinite) below |
126 instantiation convex_pd :: ("domain") below |
127 begin |
127 begin |
128 |
128 |
129 definition |
129 definition |
130 "x \<sqsubseteq> y \<longleftrightarrow> Rep_convex_pd x \<subseteq> Rep_convex_pd y" |
130 "x \<sqsubseteq> y \<longleftrightarrow> Rep_convex_pd x \<subseteq> Rep_convex_pd y" |
131 |
131 |
132 instance .. |
132 instance .. |
133 end |
133 end |
134 |
134 |
135 instance convex_pd :: (bifinite) po |
135 instance convex_pd :: ("domain") po |
136 using type_definition_convex_pd below_convex_pd_def |
136 using type_definition_convex_pd below_convex_pd_def |
137 by (rule convex_le.typedef_ideal_po) |
137 by (rule convex_le.typedef_ideal_po) |
138 |
138 |
139 instance convex_pd :: (bifinite) cpo |
139 instance convex_pd :: ("domain") cpo |
140 using type_definition_convex_pd below_convex_pd_def |
140 using type_definition_convex_pd below_convex_pd_def |
141 by (rule convex_le.typedef_ideal_cpo) |
141 by (rule convex_le.typedef_ideal_cpo) |
142 |
142 |
143 definition |
143 definition |
144 convex_principal :: "'a pd_basis \<Rightarrow> 'a convex_pd" where |
144 convex_principal :: "'a pd_basis \<Rightarrow> 'a convex_pd" where |
153 text {* Convex powerdomain is pointed *} |
153 text {* Convex powerdomain is pointed *} |
154 |
154 |
155 lemma convex_pd_minimal: "convex_principal (PDUnit compact_bot) \<sqsubseteq> ys" |
155 lemma convex_pd_minimal: "convex_principal (PDUnit compact_bot) \<sqsubseteq> ys" |
156 by (induct ys rule: convex_pd.principal_induct, simp, simp) |
156 by (induct ys rule: convex_pd.principal_induct, simp, simp) |
157 |
157 |
158 instance convex_pd :: (bifinite) pcpo |
158 instance convex_pd :: ("domain") pcpo |
159 by intro_classes (fast intro: convex_pd_minimal) |
159 by intro_classes (fast intro: convex_pd_minimal) |
160 |
160 |
161 lemma inst_convex_pd_pcpo: "\<bottom> = convex_principal (PDUnit compact_bot)" |
161 lemma inst_convex_pd_pcpo: "\<bottom> = convex_principal (PDUnit compact_bot)" |
162 by (rule convex_pd_minimal [THEN UU_I, symmetric]) |
162 by (rule convex_pd_minimal [THEN UU_I, symmetric]) |
163 |
163 |
438 done |
438 done |
439 thus "finite {xs. convex_map\<cdot>d\<cdot>xs = xs}" |
439 thus "finite {xs. convex_map\<cdot>d\<cdot>xs = xs}" |
440 by (rule finite_range_imp_finite_fixes) |
440 by (rule finite_range_imp_finite_fixes) |
441 qed |
441 qed |
442 |
442 |
443 subsection {* Convex powerdomain is a bifinite domain *} |
443 subsection {* Convex powerdomain is a domain *} |
444 |
444 |
445 definition |
445 definition |
446 convex_approx :: "nat \<Rightarrow> udom convex_pd \<rightarrow> udom convex_pd" |
446 convex_approx :: "nat \<Rightarrow> udom convex_pd \<rightarrow> udom convex_pd" |
447 where |
447 where |
448 "convex_approx = (\<lambda>i. convex_map\<cdot>(udom_approx i))" |
448 "convex_approx = (\<lambda>i. convex_map\<cdot>(udom_approx i))" |
458 "cast\<cdot>(convex_defl\<cdot>A) = |
458 "cast\<cdot>(convex_defl\<cdot>A) = |
459 udom_emb convex_approx oo convex_map\<cdot>(cast\<cdot>A) oo udom_prj convex_approx" |
459 udom_emb convex_approx oo convex_map\<cdot>(cast\<cdot>A) oo udom_prj convex_approx" |
460 using convex_approx finite_deflation_convex_map |
460 using convex_approx finite_deflation_convex_map |
461 unfolding convex_defl_def by (rule cast_defl_fun1) |
461 unfolding convex_defl_def by (rule cast_defl_fun1) |
462 |
462 |
463 instantiation convex_pd :: (bifinite) liftdomain |
463 instantiation convex_pd :: ("domain") liftdomain |
464 begin |
464 begin |
465 |
465 |
466 definition |
466 definition |
467 "emb = udom_emb convex_approx oo convex_map\<cdot>emb" |
467 "emb = udom_emb convex_approx oo convex_map\<cdot>emb" |
468 |
468 |