# HG changeset patch # User huffman # Date 1200338939 -3600 # Node ID 2179c66612189f9780a0a0fd97d2b380fefc92ec # Parent 098469c6c351c3f1c3784f373f1ba44aa23ed8e9 class bifinite supersedes class dcpo; remove unnecessary dcpo stuff diff -r 098469c6c351 -r 2179c6661218 src/HOLCF/Cprod.thy --- a/src/HOLCF/Cprod.thy Mon Jan 14 20:04:40 2008 +0100 +++ b/src/HOLCF/Cprod.thy Mon Jan 14 20:28:59 2008 +0100 @@ -118,26 +118,6 @@ apply (erule monofun_snd [THEN ub2ub_monofun]) done -lemma directed_lub_cprod: - fixes S :: "('a::dcpo \ 'b::dcpo) set" - assumes S: "directed S" - shows "S <<| (\x\S. fst x, \x\S. snd x)" -apply (rule is_lubI) -apply (rule is_ubI) -apply (rule_tac t=x in surjective_pairing [THEN ssubst]) -apply (rule monofun_pair) -apply (erule is_ub_thelub' [OF dir2dir_monofun [OF monofun_fst S] imageI]) -apply (erule is_ub_thelub' [OF dir2dir_monofun [OF monofun_snd S] imageI]) -apply (rule_tac t=u in surjective_pairing [THEN ssubst]) -apply (rule monofun_pair) -apply (rule is_lub_thelub') -apply (rule dir2dir_monofun [OF monofun_fst S]) -apply (erule ub2ub_monofun' [OF monofun_fst]) -apply (rule is_lub_thelub') -apply (rule dir2dir_monofun [OF monofun_snd S]) -apply (erule ub2ub_monofun' [OF monofun_snd]) -done - lemma thelub_cprod: "chain (S::nat \ 'a::cpo \ 'b::cpo) \ lub (range S) = (\i. fst (S i), \i. snd (S i))" @@ -152,15 +132,6 @@ thus "\x. range S <<| x" .. qed -instance "*" :: (dcpo, dcpo) dcpo -proof - fix S :: "('a \ 'b) set" - assume "directed S" - hence "S <<| (\x\S. fst x, \x\S. snd x)" - by (rule directed_lub_cprod) - thus "\x. S <<| x" .. -qed - instance "*" :: (finite_po, finite_po) finite_po .. subsection {* Product type is pointed *} diff -r 098469c6c351 -r 2179c6661218 src/HOLCF/Discrete.thy --- a/src/HOLCF/Discrete.thy Mon Jan 14 20:04:40 2008 +0100 +++ b/src/HOLCF/Discrete.thy Mon Jan 14 20:28:59 2008 +0100 @@ -51,31 +51,6 @@ "!!S::nat=>('a::type)discr. chain(S) ==> range(S) = {S 0}" by (fast elim: discr_chain0) -lemma discr_directed_lemma: - fixes S :: "'a::type discr set" - assumes S: "directed S" - shows "\x. S = {x}" -proof - - obtain x where x: "x \ S" - using S by (rule directedE1) - hence "S = {x}" - proof (safe) - fix y assume y: "y \ S" - obtain z where "x \ z" "y \ z" - using S x y by (rule directedE2) - thus "y = x" by simp - qed - thus "\x. S = {x}" .. -qed - -instance discr :: (type) dcpo -proof - fix S :: "'a discr set" - assume "directed S" - hence "\x. S = {x}" by (rule discr_directed_lemma) - thus "\x. S <<| x" by (fast intro: is_lub_singleton) -qed - instance discr :: (finite) finite_po proof have "finite (Discr ` (UNIV :: 'a set))" diff -r 098469c6c351 -r 2179c6661218 src/HOLCF/Ffun.thy --- a/src/HOLCF/Ffun.thy Mon Jan 14 20:04:40 2008 +0100 +++ b/src/HOLCF/Ffun.thy Mon Jan 14 20:28:59 2008 +0100 @@ -84,32 +84,11 @@ apply (erule ub2ub_fun) done -lemma lub_fun': - fixes S :: "('a::type \ 'b::dcpo) set" - assumes S: "directed S" - shows "S <<| (\x. \f\S. f x)" -apply (rule is_lubI) -apply (rule is_ubI) -apply (rule less_fun_ext) -apply (rule is_ub_thelub') -apply (rule dir2dir_monofun [OF monofun_app S]) -apply (erule imageI) -apply (rule less_fun_ext) -apply (rule is_lub_thelub') -apply (rule dir2dir_monofun [OF monofun_app S]) -apply (erule ub2ub_monofun' [OF monofun_app]) -done - lemma thelub_fun: "chain (S::nat \ 'a::type \ 'b::cpo) \ lub (range S) = (\x. \i. S i x)" by (rule lub_fun [THEN thelubI]) -lemma thelub_fun': - "directed (S::('a::type \ 'b::dcpo) set) - \ lub S = (\x. \f\S. f x)" -by (rule lub_fun' [THEN thelubI]) - lemma cpo_fun: "chain (S::nat \ 'a::type \ 'b::cpo) \ \x. range S <<| x" by (rule exI, erule lub_fun) @@ -117,13 +96,6 @@ instance "fun" :: (type, cpo) cpo by intro_classes (rule cpo_fun) -lemma dcpo_fun: - "directed (S::('a::type \ 'b::dcpo) set) \ \x. S <<| x" -by (rule exI, erule lub_fun') - -instance "fun" :: (type, dcpo) dcpo -by intro_classes (rule dcpo_fun) - instance "fun" :: (finite, finite_po) finite_po .. text {* chain-finite function spaces *} diff -r 098469c6c351 -r 2179c6661218 src/HOLCF/Pcpo.thy --- a/src/HOLCF/Pcpo.thy Mon Jan 14 20:04:40 2008 +0100 +++ b/src/HOLCF/Pcpo.thy Mon Jan 14 20:28:59 2008 +0100 @@ -17,40 +17,20 @@ -- {* class axiom: *} cpo: "chain S \ \x. range S <<| x" -axclass dcpo < po - dcpo: "directed S \ \x. S <<| x" - -instance dcpo < cpo -by (intro_classes, rule dcpo [OF directed_chain]) - text {* in cpo's everthing equal to THE lub has lub properties for every chain *} lemma thelubE: "\chain S; (\i. S i) = (l::'a::cpo)\ \ range S <<| l" by (blast dest: cpo intro: lubI) -lemma thelubE': "\directed S; lub S = (l::'a::dcpo)\ \ S <<| l" -by (blast dest: dcpo intro: lubI) - text {* Properties of the lub *} lemma is_ub_thelub: "chain (S::nat \ 'a::cpo) \ S x \ (\i. S i)" by (blast dest: cpo intro: lubI [THEN is_ub_lub]) -lemma is_ub_thelub': "\directed S; (x::'a::dcpo) \ S\ \ x \ lub S" -apply (drule thelubE' [OF _ refl]) -apply (drule is_lubD1) -apply (erule (1) is_ubD) -done - lemma is_lub_thelub: "\chain (S::nat \ 'a::cpo); range S <| x\ \ (\i. S i) \ x" by (blast dest: cpo intro: lubI [THEN is_lub_lub]) -lemma is_lub_thelub': "\directed S; S <| x\ \ lub S \ (x::'a::dcpo)" -apply (drule dcpo, clarify, drule lubI) -apply (erule is_lub_lub, assumption) -done - lemma lub_range_mono: "\range X \ range Y; chain Y; chain (X::nat \ 'a::cpo)\ \ (\i. X i) \ (\i. Y i)" @@ -289,8 +269,9 @@ apply (simp add: finite_chain_def) done -instance finite_po < dcpo +instance finite_po < cpo apply intro_classes +apply (drule directed_chain) apply (drule directed_finiteD [OF _ finite subset_refl]) apply (erule bexE, rule exI) apply (erule (1) is_lub_maximal) diff -r 098469c6c351 -r 2179c6661218 src/HOLCF/SetPcpo.thy --- a/src/HOLCF/SetPcpo.thy Mon Jan 14 20:04:40 2008 +0100 +++ b/src/HOLCF/SetPcpo.thy Mon Jan 14 20:28:59 2008 +0100 @@ -25,7 +25,7 @@ lemma Union_is_lub: "A <<| Union A" unfolding is_lub_def is_ub_def less_set_def by fast -instance set :: (type) dcpo +instance set :: (type) cpo by (intro_classes, rule exI, rule Union_is_lub) lemma lub_eq_Union: "lub = Union" diff -r 098469c6c351 -r 2179c6661218 src/HOLCF/Up.thy --- a/src/HOLCF/Up.thy Mon Jan 14 20:04:40 2008 +0100 +++ b/src/HOLCF/Up.thy Mon Jan 14 20:28:59 2008 +0100 @@ -177,55 +177,6 @@ instance u :: (cpo) cpo by intro_classes (rule cpo_up) -lemma up_directed_lemma: - "directed (S::'a::dcpo u set) \ - (directed (Iup -` S) \ S <<| Iup (lub (Iup -` S))) \ - S = {Ibottom}" -apply (case_tac "\x. Iup x \ S") -apply (rule disjI1) -apply (subgoal_tac "directed (Iup -` S)") -apply (rule conjI, assumption) -apply (rule is_lubI) -apply (rule is_ubI) -apply (case_tac x, simp, simp) -apply (erule is_ub_thelub', simp) -apply (case_tac u) -apply (erule exE) -apply (drule (1) is_ubD) -apply simp -apply simp -apply (erule is_lub_thelub') -apply (rule is_ubI, simp) -apply (drule (1) is_ubD, simp) -apply (rule directedI) -apply (erule exE) -apply (rule exI) -apply (erule vimageI2) -apply simp -apply (drule_tac x="Iup x" and y="Iup y" in directedD2, assumption+) -apply (erule bexE, rename_tac z) -apply (case_tac z) -apply simp -apply (rule_tac x=a in bexI) -apply simp -apply simp -apply (rule disjI2) -apply (simp, safe) -apply (case_tac x, simp, simp) -apply (drule directedD1) -apply (clarify, rename_tac x) -apply (case_tac x, simp, simp) -done - -lemma dcpo_up: "directed (S::'a::dcpo u set) \ \x. S <<| x" -apply (frule up_directed_lemma, safe) -apply (erule exI) -apply (rule exI, rule is_lub_singleton) -done - -instance u :: (dcpo) dcpo -by intro_classes (rule dcpo_up) - subsection {* Lifted cpo is pointed *} lemma least_up: "\x::'a u. \y. x \ y"