definition
node :: "nat by (cases "x = compact_bot") (simp_all add: basis_emb_rec) where "node i a S = Suc (prod_encode (i, prod_encode (a, set_encode Slemma fin1: "finite {y. place y < place x \<and> x \<sqsubseteq> y}"
lemma node_not_0 [simpapply (rule disjI1apply (subgoal_tac "finite (place -` {n. n < place x})", simp) unfolding node_def by simp
lemma node_gt_0 [java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 0 unfolding node_def by simp
lemma node_inject [simp]: "\finite S; finite T\ \<Longrightarrow> node i a S = node j b T \<longleftrightarrow> i = j \<and> a = b \<and> S = T" unfolding node_def by (simplemma rank_place_mono:
lemma node_gt0: "i < node i a S" unfolding node_def less_Suc_eq_le by (rule le_prod_encode_1)
inductiveproof (rule injI)
ubasis_le :: "nat \ nat \ bool"assume"basis_emb x = basis_emb y" where
ubasis_le_refl by (cases "x = compact_bot \ y = compact_bot") (auto simp add: basis_emb_rec fin2 place_eqD)
| ubasis_le_transqed "\ubasis_le a b; ubasis_le b c\ \ ubasis_le a c"
| ubasis_le_lower:
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
| ubasis_le_upper: "\finite S; b \ S; ubasis_le a b\ \ ubasis_le (node i a S) b"
subsubsection \<open>Generic take function\<close>
functionapply (rule inv_f_f)
ubasis_until :: "(ubasis java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 4 where "ubasis_until P 0 = 0"
| "finite S \ ubasis_until P (node i a S) =
(if P (node i a \<Longrightarrow> basis_prj (node i a S) = (basis_prj a :: 'a compact_basis)" apply clarify x \<noteq> compact_bot \<and> i = place x \<and> a = basis_emb (sub x) \<and> S = basis_emb ` {y. place y < place x \<and> x \<sqsubseteq> y}"apply (cases "x = compact_bot", simp) apply (rule_tac x=b in node_cases) apply simp_all done
terminationcase (ubasis_le_refl a) show ?caseby (rule below_refl) apply (relation "measure snd") apply (rule wf_measure) apply (simp add: node_gt1) done
lemma ubasis_until: "P 0 \ P (ubasis_until P x)" by (induct x rule: node_induct) simp_all
lemma ubasis_until': " apply (cases "node i a S \ range (basis_emb :: 'a compact_basis \ nat)") by (induct x rule: node_induct) auto
lemma ubasis_until_same: "P x \ ubasis_until P x = x" by (induct apply (simp add: basis_prj_basis_emb)
lemmaapply (simp add: node_eq_basis_emb_iff) "P 0 \ ubasis_until P (ubasis_until P x) = ubasis_until P x" by (rule apply (rule sub_below)
lemma ubasis_until_0: done by (induct x rulenext
lemmacase (ubasis_le_upper S b a i) thus ?case apply (induct x rule: node_induct) apply (simp add: ubasis_le_refl) apply (simp add: basis_prj_basis_emb)
lemma ubasis_until_mono: assumes"\i a S b. \finite S; P (node i a S); b \ S; ubasis_le a b\ \ P b" shows"ubasis_le a b \ ubasis_le (ubasis_until P a) (ubasis_until P b)" proof (induct set: ubasis_le) case (ubasis_le_refl a) show ?caseby ( apply (rule range_eqI [where x=compact_bot apply simp next case (ubasis_le_trans a next case (ubasis_le_lower "ideal_completion below Rep_compact_basis (approximants :: 'a \ _)" by (metis ubasis_le show"below.ideal (approximants w)" next caseby (simp add: thus"\x. x \ approximants w" .. by (metis fix x y :: "'a compact_basis" qed
lemma finite_range_ubasis_until: "finite {x. P x} using compact_eq_approx Rep_compact_basis' by fast apply (rule obtain j where j: "approx j\(Rep_compact_basis y) = Rep_compact_basis y" apply (clarsimp simp add: ubasis_until') apply simp done
subsection \<open>Defining the universal domain by ideal completion\<close>
typedef udom = "{S. udom.ideal S}" by (rule udom.ex_ideal)
instantiation udom :: below begin
definition "x \ y \ Rep_udom x \ Rep_udom y"
instance .. end
instance udom :: po using type_definition_udom ultimatelyshow"\z \ approximants w. x \ z \ y \ z" .. by (rule next
instance udom :: cpo using assume "x \<sqsubseteq> y" "y \<in> approximants w" thus "x \<in> approximants w" by (rule udom.typedef_ideal_cpo by (auto elim: below_trans)
definition
udom_principal :: "nat \ udom" where "udom_principal t = Abs_udom {u. ubasis_le u assume "chain Y"
lemma ubasis_countable: "\f::ubasis \ nat. inj f" by (rule exI, rule inj_on_id by (auto simp add: compact_below_lub_iff)
interpretation udom:
ideal_completion ubasis_le udom_principal Rep_udom using type_definition_udom below_udom_def using udom_principal_def ubasis_countable by (rule udom.typedef_ideal_completion)
text\<open>Universal domain is pointed\<close>
lemma udom_minimal: "udom_principal 0 \ x" apply (induct x rule: udom.principal_induct) apply (simp, simp by (simp add: approximants_def subset_eq) done
instancehence"(\i. approx i\x) \ y" by intro_classes (fast intro by (simp add: lub_below approx_below)
lemma inst_udom_pcpo: "\ = udom_principal 0" by (rule udom_minimal [THENnext
subsection \<open>Compact bases of domains\<close>
typedef'a compact_basis = "{x::'a::pcpoqed by auto
lemma Rep_compact_basisend by java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lemma Abs_compact_basis_inverse' [simp]: "compact x \ Rep_compact_basis (Abs_compact_basis x) = x" by (rule Abs_compact_basis_inverse obtain a :: "nat \ 'a \ 'a" where "approx_chain a"
instance compact_basis :: (pcpo) po using type_definition_compact_basis compact_le_def by (rule typedef_po_class)
definition
approximantssubsubsection \<open>EP-pair from any bifinite domain into \emph{udom}\<close> "approximants = (\x. {a. Rep_compact_basis a \ x})"
definition
compact_bot ::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 "compact_bot = Abs_compact_basis \"
text\<open>We use a locale to parameterize the construction over a chain
of approx functionsapply (erule basis_emb_mono)
locale bifinite_approx_chain =
approx_chain approx for approx :: " begin
subsubsection \<open>Choosing a maximal element from a finite set\<close>
lemma finite_has_maximal: apply (rule compact_basis.principal_mono) shows"\finite A; A \ {}\ \ \x\A. \y\A. x \ y \ x = y" proof (induct rulelemma ep_pair_udom: "ep_pair udom_emb udom_prj" case (singleton x) show ?caseby simp next apply (simp add: udom_emb_principal udom_prj_principal) from\<open>\<exists>x\<in>A. \<forall>y\<in>A. x \<sqsubseteq> y \<longrightarrow> x = y\<close> obtain x where x: "x \ A" and x_eq apply (simp add: udom_emb_principal udom_prj_principal) show ?case proof (intro bexI ballI impI) fix y assume"yjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 thusabbreviation"udom_prj \ bifinite_approx_chain.udom_prj" apply auto apply (frule (1) below_trans) apply (frule (1) x_eq) apply (rule below_antisym, assumption)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 apply (erule (1) x_eq) done next show"(if by (efinition qed
udom_approx :: "nat \ udom \ udom"
definition
choosewhere where "udom_approx i =
lemma choose_lemma udom.extension (\<lambda>x. udom_principal (ubasis_until (\<lambda>y. y \<le> i) x))"
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 unfolding choose_def apply (rule someI_ex) apply (frule (1) finite_has_maximal, fastapply (rule udomapply (rule ubasis_until_mono) done
lemmaapply assumption "\finite A; y \ A; choose A \ y\ \ choose A = y" apply (cases "A = {}"lemma adm_mem_finite: "\cont f; finite S\ \ adm (\x. f x \ S)" apply (frule (by (erule adm_subst, induct set: finite, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 done
lemma choose_in: "\finite A; A \ {}\ \ choose A \ A" by (fruleapply (rule udom.extension_principal)
function
choose_pos java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 4 where "choose_pos A x =
(if finite java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 then Suc (choose_pos (A - {choose A}) x) else by (induct x rule: udom.principal_induct, simp) by auto
lemma cb_take_less: "cb_take n x \ x" unfolding compact_le_def by (cases n, simp, simp add: Rep_cb_take approx_below)
lemma cb_take_idem: "cb_take n (cb_take n x) = cb_take n x" unfolding Rep_compact_basis_inject [symmetric] by (cases n, simp, simp add: Rep_cb_take approx_idem)
lemma cb_take_mono: "x \ y \ cb_take n x \ cb_take n y" unfolding compact_le_def by (cases n, simp, simp add: Rep_cb_take monofun_cfun_arg)
lemma cb_take_chain_le: "m \ n \ cb_take m x \ cb_take n x" unfolding compact_le_def apply (cases m, simp, cases n, simp) apply (simp add: Rep_cb_take, rule chain_mono, simp, simp) done
function basis_emb :: "'a compact_basis \ ubasis" where"basis_emb x = (if x = compact_bot then 0 else
node (place x) (basis_emb (sub x))
(basis_emb ` {y. place y < place x \<and> x \<sqsubseteq> y}))" by simp_all
termination basis_emb by (relation "measure place") (simp_all add: place_sub_less)
declare basis_emb.simps [simp del]
lemma basis_emb_compact_bot [simp]: "basis_emb compact_bot = 0" using basis_emb.simps [of compact_bot] by simp
lemma basis_emb_rec: "basis_emb x = node (place x) (basis_emb (sub x)) (basis_emb ` {y. place y < place x \ x \y})" if"x \ compact_bot" using that basis_emb.simps [of x] by simp
lemma basis_emb_eq_0_iff [simp]: "basis_emb x = 0 \ x = compact_bot" by (cases "x = compact_bot") (simp_all add: basis_emb_rec)
lemma fin1: "finite {y. place y < place x \ x \ y}" apply (subst Collect_conj_eq) apply (rule finite_Int) apply (rule disjI1) apply (subgoal_tac "finite (place -` {n. n < place x})", simp) apply (rule finite_vimageI [OF _ inj_place]) apply (simp add: lessThan_def [symmetric]) done
lemma fin2: "finite (basis_emb ` {y. place y < place x \ x \ y})" by (rule finite_imageI [OF fin1])
lemma basis_emb_mono: "x \ y \ ubasis_le (basis_emb x) (basis_emb y)" proof (induct "max (place x) (place y)" arbitrary: x y rule: less_induct) case less show ?caseproof (rule linorder_cases) assume"place x < place y" thenhave"rank x < rank y" using\<open>x \<sqsubseteq> y\<close> by (rule rank_place_mono) with\<open>place x < place y\<close> show ?case apply (case_tac "y = compact_bot", simp) apply (simp add: basis_emb.simps [of y]) apply (rule ubasis_le_trans [OF _ ubasis_le_lower [OF fin2]]) apply (rule less) apply (simp add: less_max_iff_disj) apply (erule place_sub_less) apply (erule rank_less_imp_below_sub [OF \<open>x \<sqsubseteq> y\<close>]) done next assume"place x = place y" hence"x = y"by (rule place_eqD) thus ?caseby (simp add: ubasis_le_refl) next assume"place x > place y" with\<open>x \<sqsubseteq> y\<close> show ?case apply (case_tac "x = compact_bot", simp add: ubasis_le_minimal) apply (simp add: basis_emb.simps [of x]) apply (rule ubasis_le_upper [OF fin2], simp) apply (rule less) apply (simp add: less_max_iff_disj) apply (erule place_sub_less) apply (erule rev_below_trans) apply (rule sub_below) done qed qed
lemma inj_basis_emb: "inj basis_emb" proof (rule injI) fix x y assume"basis_emb x = basis_emb y" thenshow"x = y" by (cases "x = compact_bot \ y = compact_bot") (auto simp add: basis_emb_rec fin2 place_eqD) qed
definition
basis_prj :: "ubasis \ 'a compact_basis" where "basis_prj x = inv basis_emb
(ubasis_until (\<lambda>x. x \<in> range (basis_emb :: 'a compact_basis \<Rightarrow> ubasis)) x)"
lemma basis_prj_node: "\finite S; node i a S \ range (basis_emb :: 'a compact_basis \ nat)\ \<Longrightarrow> basis_prj (node i a S) = (basis_prj a :: 'a compact_basis)" unfolding basis_prj_def by simp
lemma node_eq_basis_emb_iff: "finite S \ node i a S = basis_emb x \
x \<noteq> compact_bot \<and> i = place x \<and> a = basis_emb (sub x) \<and>
S = basis_emb ` {y. place y < place x \<and> x \<sqsubseteq> y}" apply (cases "x = compact_bot", simp) apply (simp add: basis_emb.simps [of x]) apply (simp add: fin2) done
lemma basis_prj_mono: "ubasis_le a b \ basis_prj a \ basis_prj b" proof (induct a b rule: ubasis_le.induct) case (ubasis_le_refl a) show ?caseby (rule below_refl) next case (ubasis_le_trans a b c) thus ?caseby - (rule below_trans) next case (ubasis_le_lower S a i) thus ?case apply (cases "node i a S \ range (basis_emb :: 'a compact_basis \ nat)") apply (erule rangeE, rename_tac x) apply (simp add: basis_prj_basis_emb) apply (simp add: node_eq_basis_emb_iff) apply (simp add: basis_prj_basis_emb) apply (rule sub_below) apply (simp add: basis_prj_node) done next case (ubasis_le_upper S b a i) thus ?case apply (cases "node i a S \ range (basis_emb :: 'a compact_basis \ nat)") apply (erule rangeE, rename_tac x) apply (simp add: basis_prj_basis_emb) apply (clarsimp simp add: node_eq_basis_emb_iff) apply (simp add: basis_prj_basis_emb) apply (simp add: basis_prj_node) done qed
lemma ideal_completion: "ideal_completion below Rep_compact_basis (approximants :: 'a \ _)" proof fix w :: "'a" show"below.ideal (approximants w)" proof (rule below.idealI) have"Abs_compact_basis (approx 0\w) \ approximants w" by (simp add: approximants_def approx_below) thus"\x. x \ approximants w" .. next fix x y :: "'a compact_basis" assume x: "x \ approximants w" and y: "y \ approximants w" obtain i where i: "approx i\(Rep_compact_basis x) = Rep_compact_basis x" using compact_eq_approx Rep_compact_basis' by fast obtain j where j: "approx j\(Rep_compact_basis y) = Rep_compact_basis y" using compact_eq_approx Rep_compact_basis' by fast let ?z = "Abs_compact_basis (approx (max i j)\w)" have"?z \ approximants w" by (simp add: approximants_def approx_below) moreoverfrom x y have"x \ ?z \ y \ ?z" by (simp add: approximants_def compact_le_def)
(metis i j monofun_cfun chain_mono chain_approx max.cobounded1 max.cobounded2) ultimatelyshow"\z \ approximants w. x \ z \ y \ z" .. next fix x y :: "'a compact_basis" assume"x \ y" "y \ approximants w" thus "x \ approximants w" unfolding approximants_def compact_le_def by (auto elim: below_trans) qed next fix Y :: "nat \ 'a" assume"chain Y" thus"approximants (\i. Y i) = (\i. approximants (Y i))" unfolding approximants_def by (auto simp add: compact_below_lub_iff) next fix a :: "'a compact_basis" show"approximants (Rep_compact_basis a) = {b. b \ a}" unfolding approximants_def compact_le_def .. next fix x y :: "'a" assume"approximants x \ approximants y" hence"\z. compact z \ z \ x \ z \ y" by (simp add: approximants_def subset_eq)
(metis Abs_compact_basis_inverse') hence"(\i. approx i\x) \ y" by (simp add: lub_below approx_below) thus"x \ y" by (simp add: lub_distribs) next show"\f::'a compact_basis \ nat. inj f" by (rule exI, rule inj_place) qed
end
interpretation compact_basis:
ideal_completion below Rep_compact_basis "approximants :: 'a::bifinite \ 'a compact_basis set" proof - obtain a :: "nat \ 'a \ 'a" where "approx_chain a" using bifinite .. hence"bifinite_approx_chain a" unfolding bifinite_approx_chain_def . thus"ideal_completion below Rep_compact_basis (approximants :: 'a \ _)" by (rule bifinite_approx_chain.ideal_completion) qed
subsubsection \<open>EP-pair from any bifinite domain into \emph{udom}\<close>
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.