text\<open>
The composition of two deflations is equal to
the lesser of the two (if they are comparable). \<close>
lemma deflation_below_comp1: assumes"deflation f" assumes"deflation g" shows"f \ g \ f\(g\x) = f\x" proof (rule below_antisym) interpret g: deflation g by fact from g.below show"f\(g\x) \ f\x" by (rule monofun_cfun_arg) next interpret f: deflation f by fact assume"f \ g" thenhave"f\x \ g\x" by (rule monofun_cfun_fun) thenhave"f\(f\x) \ f\(g\x)" by (rule monofun_cfun_arg) alsohave"f\(f\x) = f\x" by (rule f.idem) finallyshow"f\x \ f\(g\x)" . qed
lemma deflation_below_comp2: "deflation f \ deflation g \ f \ g \ g\(f\x) = f\x" by (simp only: deflation.belowD deflation.idem)
subsection \<open>Deflations with finite range\<close>
lemma finite_range_imp_finite_fixes: assumes"finite (range f)" shows"finite {x. f x = x}" proof - have"{x. f x = x} \ range f" by (clarify, erule subst, rule rangeI) from this assms show"finite {x. f x = x}" by (rule finite_subset) qed
lemma compact: "compact (d\x)" proof (rule compactI2) fix Y :: "nat \ 'a" assume Y: "chain Y" have"finite_chain (\i. d\(Y i))" proof (rule finite_range_imp_finch) from Y show"chain (\i. d\(Y i))" by simp have"range (\i. d\(Y i)) \ range (\x. d\x)" by auto thenshow"finite (range (\i. d\(Y i)))" using finite_range by (rule finite_subset) qed thenhave"\j. (\i. d\(Y i)) = d\(Y j)" by (simp add: finite_chain_def maxinch_is_thelub Y) thenobtain j where j: "(\i. d\(Y i)) = d\(Y j)" ..
assume"d\x \ (\i. Y i)" thenhave"d\(d\x) \ d\(\i. Y i)" by (rule monofun_cfun_arg) thenhave"d\x \ (\i. d\(Y i))" by (simp add: contlub_cfun_arg Y idem) with j have"d\x \ d\(Y j)" by simp thenhave"d\x \ Y j" using below by (rule below_trans) thenshow"\j. d\x \ Y j" .. qed
end
lemma finite_deflation_intro: "deflation d \ finite {x. d\x = x} \ finite_deflation d" by (intro finite_deflation.intro finite_deflation_axioms.intro)
lemma finite_deflation_imp_deflation: "finite_deflation d \ deflation d" by (simp add: finite_deflation_def)
lemma finite_deflation_bottom: "finite_deflation \" by standard simp_all
lemma p_eq_iff: "e\(p\x) = x \ e\(p\y) = y \ p\x = p\y \ x = y" by (safe, erule subst, erule subst, simp)
lemma p_inverse: "(\x. y = e\x) \ e\(p\y) = y" by (auto, rule exI, erule sym)
lemma e_below_iff_below_p: "e\x \ y \ x \ p\y" proof assume"e\x \ y" thenhave"p\(e\x) \ p\y" by (rule monofun_cfun_arg) thenshow"x \ p\y" by simp next assume"x \ p\y" thenhave"e\x \ e\(p\y)" by (rule monofun_cfun_arg) thenshow"e\x \ y" using e_p_below by (rule below_trans) qed
lemma compact_e_rev: "compact (e\x) \ compact x" proof - assume"compact (e\x)" thenhave"adm (\y. e\x \ y)" by (rule compactD) thenhave"adm (\y. e\x \ e\y)" by (rule adm_subst [OF cont_Rep_cfun2]) thenhave"adm (\y. x \ y)" by simp thenshow"compact x"by (rule compactI) qed
lemma compact_e: assumes"compact x" shows"compact (e\x)" proof - from assms have"adm (\y. x \ y)" by (rule compactD) thenhave"adm (\y. x \ p\y)" by (rule adm_subst [OF cont_Rep_cfun2]) thenhave"adm (\y. e\x \ y)" by (simp add: e_below_iff_below_p) thenshow"compact (e\x)" by (rule compactI) qed
lemma deflation_e_p: "deflation (e oo p)" by (simp add: deflation.intro e_p_below)
lemma deflation_e_d_p: assumes"deflation d" shows"deflation (e oo d oo p)" proof interpret deflation d by fact fix x :: 'b show"(e oo d oo p)\((e oo d oo p)\x) = (e oo d oo p)\x" by (simp add: idem) show"(e oo d oo p)\x \ x" by (simp add: e_below_iff_below_p below) qed
lemma finite_deflation_e_d_p: assumes"finite_deflation d" shows"finite_deflation (e oo d oo p)" proof interpret finite_deflation d by fact fix x :: 'b show"(e oo d oo p)\((e oo d oo p)\x) = (e oo d oo p)\x" by (simp add: idem) show"(e oo d oo p)\x \ x" by (simp add: e_below_iff_below_p below) have"finite ((\x. e\x) ` (\x. d\x) ` range (\x. p\x))" by (simp add: finite_image) thenhave"finite (range (\x. (e oo d oo p)\x))" by (simp add: image_image) thenshow"finite {x. (e oo d oo p)\x = x}" by (rule finite_range_imp_finite_fixes) qed
lemma deflation_p_d_e: assumes"deflation d" assumes d: "\x. d\x \ e\(p\x)" shows"deflation (p oo d oo e)" proof - interpret d: deflation d by fact have p_d_e_below: "(p oo d oo e)\x \ x" for x proof - have"d\(e\x) \ e\x" by (rule d.below) thenhave"p\(d\(e\x)) \ p\(e\x)" by (rule monofun_cfun_arg) thenshow ?thesis by simp qed show ?thesis proof show"(p oo d oo e)\x \ x" for x by (rule p_d_e_below) show"(p oo d oo e)\((p oo d oo e)\x) = (p oo d oo e)\x" for x proof (rule below_antisym) show"(p oo d oo e)\((p oo d oo e)\x) \ (p oo d oo e)\x" by (rule p_d_e_below) have"p\(d\(d\(d\(e\x)))) \ p\(d\(e\(p\(d\(e\x)))))" by (intro monofun_cfun_arg d) thenhave"p\(d\(e\x)) \ p\(d\(e\(p\(d\(e\x)))))" by (simp only: d.idem) thenshow"(p oo d oo e)\x \ (p oo d oo e)\((p oo d oo e)\x)" by simp qed qed qed
lemma finite_deflation_p_d_e: assumes"finite_deflation d" assumes d: "\x. d\x \ e\(p\x)" shows"finite_deflation (p oo d oo e)" proof - interpret d: finite_deflation d by fact show ?thesis proof (rule finite_deflation_intro) have"deflation d" .. thenshow"deflation (p oo d oo e)" using d by (rule deflation_p_d_e) next have"finite ((\x. d\x) ` range (\x. e\x))" by (rule d.finite_image) thenhave"finite ((\x. p\x) ` (\x. d\x) ` range (\x. e\x))" by (rule finite_imageI) thenhave"finite (range (\x. (p oo d oo e)\x))" by (simp add: image_image) thenshow"finite {x. (p oo d oo e)\x = x}" by (rule finite_range_imp_finite_fixes) qed qed
end
subsection \<open>Uniqueness of ep-pairs\<close>
lemma ep_pair_unique_e_lemma: assumes 1: "ep_pair e1 p" and 2: "ep_pair e2 p" shows"e1 \ e2" proof (rule cfun_belowI) fix x have"e1\(p\(e2\x)) \ e2\x" by (rule ep_pair.e_p_below [OF 1]) thenshow"e1\x \ e2\x" by (simp only: ep_pair.e_inverse [OF 2]) qed
lemma ep_pair_unique_e: "ep_pair e1 p \ ep_pair e2 p \ e1 = e2" by (fast intro: below_antisym elim: ep_pair_unique_e_lemma)
lemma ep_pair_unique_p_lemma: assumes 1: "ep_pair e p1" and 2: "ep_pair e p2" shows"p1 \ p2" proof (rule cfun_belowI) fix x have"e\(p1\x) \ x" by (rule ep_pair.e_p_below [OF 1]) thenhave"p2\(e\(p1\x)) \ p2\x" by (rule monofun_cfun_arg) thenshow"p1\x \ p2\x" by (simp only: ep_pair.e_inverse [OF 2]) qed
lemma ep_pair_unique_p: "ep_pair e p1 \ ep_pair e p2 \ p1 = p2" by (fast intro: below_antisym elim: ep_pair_unique_p_lemma)
subsection \<open>Composing ep-pairs\<close>
lemma ep_pair_ID_ID: "ep_pair ID ID" by standard simp_all
lemma ep_pair_comp: assumes"ep_pair e1 p1"and"ep_pair e2 p2" shows"ep_pair (e2 oo e1) (p1 oo p2)" proof interpret ep1: ep_pair e1 p1 by fact interpret ep2: ep_pair e2 p2 by fact fix x y show"(p1 oo p2)\((e2 oo e1)\x) = x" by simp have"e1\(p1\(p2\y)) \ p2\y" by (rule ep1.e_p_below) thenhave"e2\(e1\(p1\(p2\y))) \ e2\(p2\y)" by (rule monofun_cfun_arg) alsohave"e2\(p2\y) \ y" by (rule ep2.e_p_below) finallyshow"(e2 oo e1)\((p1 oo p2)\y) \ y" by simp qed
locale pcpo_ep_pair = ep_pair e p for e :: "'a::pcpo \ 'b::pcpo" and p :: "'b::pcpo \ 'a::pcpo" begin
lemma e_strict [simp]: "e\\ = \" proof - have"\ \ p\\" by (rule minimal) thenhave"e\\ \ e\(p\\)" by (rule monofun_cfun_arg) alsohave"e\(p\\) \ \" by (rule e_p_below) finallyshow"e\\ = \" by simp qed
lemma e_bottom_iff [simp]: "e\x = \ \ x = \" by (rule e_eq_iff [where y="\", unfolded e_strict])
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.