# HG changeset patch # User huffman # Date 1286816044 25200 # Node ID e3948547b541fb5d71edc0f5a679ef89de40047d # Parent ad60d7311f4360954f62b96e1e79aca591c9fa81 add HOLCF/Library/Defl_Bifinite.thy, which proves instance defl :: bifinite diff -r ad60d7311f43 -r e3948547b541 src/HOLCF/IsaMakefile --- a/src/HOLCF/IsaMakefile Mon Oct 11 08:32:09 2010 -0700 +++ b/src/HOLCF/IsaMakefile Mon Oct 11 09:54:04 2010 -0700 @@ -102,6 +102,7 @@ HOLCF-Library: HOLCF $(LOG)/HOLCF-Library.gz $(LOG)/HOLCF-Library.gz: $(OUT)/HOLCF \ + Library/Defl_Bifinite.thy \ Library/List_Cpo.thy \ Library/Stream.thy \ Library/Strict_Fun.thy \ diff -r ad60d7311f43 -r e3948547b541 src/HOLCF/Library/Defl_Bifinite.thy --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/HOLCF/Library/Defl_Bifinite.thy Mon Oct 11 09:54:04 2010 -0700 @@ -0,0 +1,650 @@ +(* Title: HOLCF/Library/Defl_Bifinite.thy + Author: Brian Huffman +*) + +header {* Algebraic deflations are a bifinite domain *} + +theory Defl_Bifinite +imports HOLCF Infinite_Set +begin + +subsection {* Lemmas about MOST *} + +default_sort type + +lemma MOST_INFM: + assumes inf: "infinite (UNIV::'a set)" + shows "MOST x::'a. P x \ INFM x::'a. P x" + unfolding Alm_all_def Inf_many_def + apply (auto simp add: Collect_neg_eq) + apply (drule (1) finite_UnI) + apply (simp add: Compl_partition2 inf) + done + +lemma MOST_SucI: "MOST n. P n \ MOST n. P (Suc n)" +by (rule MOST_inj [OF _ inj_Suc]) + +lemma MOST_SucD: "MOST n. P (Suc n) \ MOST n. P n" +unfolding MOST_nat +apply (clarify, rule_tac x="Suc m" in exI, clarify) +apply (erule Suc_lessE, simp) +done + +lemma MOST_Suc_iff: "(MOST n. P (Suc n)) \ (MOST n. P n)" +by (rule iffI [OF MOST_SucD MOST_SucI]) + +lemma INFM_finite_Bex_distrib: + "finite A \ (INFM y. \x\A. P x y) \ (\x\A. INFM y. P x y)" +by (induct set: finite, simp, simp add: INFM_disj_distrib) + +lemma MOST_finite_Ball_distrib: + "finite A \ (MOST y. \x\A. P x y) \ (\x\A. MOST y. P x y)" +by (induct set: finite, simp, simp add: MOST_conj_distrib) + +lemma MOST_ge_nat: "MOST n::nat. m \ n" +unfolding MOST_nat_le by fast + +subsection {* Eventually constant sequences *} + +definition + eventually_constant :: "(nat \ 'a) \ bool" +where + "eventually_constant S = (\x. MOST i. S i = x)" + +lemma eventually_constant_MOST_MOST: + "eventually_constant S \ (MOST m. MOST n. S n = S m)" +unfolding eventually_constant_def MOST_nat +apply safe +apply (rule_tac x=m in exI, clarify) +apply (rule_tac x=m in exI, clarify) +apply simp +apply fast +done + +lemma eventually_constantI: "MOST i. S i = x \ eventually_constant S" +unfolding eventually_constant_def by fast + +lemma eventually_constant_comp: + "eventually_constant (\i. S i) \ eventually_constant (\i. f (S i))" +unfolding eventually_constant_def +apply (erule exE, rule_tac x="f x" in exI) +apply (erule MOST_mono, simp) +done + +lemma eventually_constant_Suc_iff: + "eventually_constant (\i. S (Suc i)) \ eventually_constant (\i. S i)" +unfolding eventually_constant_def +by (subst MOST_Suc_iff, rule refl) + +lemma eventually_constant_SucD: + "eventually_constant (\i. S (Suc i)) \ eventually_constant (\i. S i)" +by (rule eventually_constant_Suc_iff [THEN iffD1]) + +subsection {* Limits of eventually constant sequences *} + +definition + eventual :: "(nat \ 'a) \ 'a" where + "eventual S = (THE x. MOST i. S i = x)" + +lemma eventual_eqI: "MOST i. S i = x \ eventual S = x" +unfolding eventual_def +apply (rule the_equality, assumption) +apply (rename_tac y) +apply (subgoal_tac "MOST i::nat. y = x", simp) +apply (erule MOST_rev_mp) +apply (erule MOST_rev_mp) +apply simp +done + +lemma MOST_eq_eventual: + "eventually_constant S \ MOST i. S i = eventual S" +unfolding eventually_constant_def +by (erule exE, simp add: eventual_eqI) + +lemma eventual_mem_range: + "eventually_constant S \ eventual S \ range S" +apply (drule MOST_eq_eventual) +apply (simp only: MOST_nat_le, clarify) +apply (drule spec, drule mp, rule order_refl) +apply (erule range_eqI [OF sym]) +done + +lemma eventually_constant_MOST_iff: + assumes S: "eventually_constant S" + shows "(MOST n. P (S n)) \ P (eventual S)" +apply (subgoal_tac "(MOST n. P (S n)) \ (MOST n::nat. P (eventual S))") +apply simp +apply (rule iffI) +apply (rule MOST_rev_mp [OF MOST_eq_eventual [OF S]]) +apply (erule MOST_mono, force) +apply (rule MOST_rev_mp [OF MOST_eq_eventual [OF S]]) +apply (erule MOST_mono, simp) +done + +lemma MOST_eventual: + "\eventually_constant S; MOST n. P (S n)\ \ P (eventual S)" +proof - + assume "eventually_constant S" + hence "MOST n. S n = eventual S" + by (rule MOST_eq_eventual) + moreover assume "MOST n. P (S n)" + ultimately have "MOST n. S n = eventual S \ P (S n)" + by (rule MOST_conj_distrib [THEN iffD2, OF conjI]) + hence "MOST n::nat. P (eventual S)" + by (rule MOST_mono) auto + thus ?thesis by simp +qed + +lemma eventually_constant_MOST_Suc_eq: + "eventually_constant S \ MOST n. S (Suc n) = S n" +apply (drule MOST_eq_eventual) +apply (frule MOST_Suc_iff [THEN iffD2]) +apply (erule MOST_rev_mp) +apply (erule MOST_rev_mp) +apply simp +done + +lemma eventual_comp: + "eventually_constant S \ eventual (\i. f (S i)) = f (eventual (\i. S i))" +apply (rule eventual_eqI) +apply (rule MOST_mono) +apply (erule MOST_eq_eventual) +apply simp +done + +subsection {* Constructing finite deflations by iteration *} + +default_sort cpo + +lemma le_Suc_induct: + assumes le: "i \ j" + assumes step: "\i. P i (Suc i)" + assumes refl: "\i. P i i" + assumes trans: "\i j k. \P i j; P j k\ \ P i k" + shows "P i j" +proof (cases "i = j") + assume "i = j" + thus "P i j" by (simp add: refl) +next + assume "i \ j" + with le have "i < j" by simp + thus "P i j" using step trans by (rule less_Suc_induct) +qed + +definition + eventual_iterate :: "('a \ 'a::cpo) \ ('a \ 'a)" +where + "eventual_iterate f = eventual (\n. iterate n\f)" + +text {* A pre-deflation is like a deflation, but not idempotent. *} + +locale pre_deflation = + fixes f :: "'a \ 'a::cpo" + assumes below: "\x. f\x \ x" + assumes finite_range: "finite (range (\x. f\x))" +begin + +lemma iterate_below: "iterate i\f\x \ x" +by (induct i, simp_all add: below_trans [OF below]) + +lemma iterate_fixed: "f\x = x \ iterate i\f\x = x" +by (induct i, simp_all) + +lemma antichain_iterate_app: "i \ j \ iterate j\f\x \ iterate i\f\x" +apply (erule le_Suc_induct) +apply (simp add: below) +apply (rule below_refl) +apply (erule (1) below_trans) +done + +lemma finite_range_iterate_app: "finite (range (\i. iterate i\f\x))" +proof (rule finite_subset) + show "range (\i. iterate i\f\x) \ insert x (range (\x. f\x))" + by (clarify, case_tac i, simp_all) + show "finite (insert x (range (\x. f\x)))" + by (simp add: finite_range) +qed + +lemma eventually_constant_iterate_app: + "eventually_constant (\i. iterate i\f\x)" +unfolding eventually_constant_def MOST_nat_le +proof - + let ?Y = "\i. iterate i\f\x" + have "\j. \k. ?Y j \ ?Y k" + apply (rule finite_range_has_max) + apply (erule antichain_iterate_app) + apply (rule finite_range_iterate_app) + done + then obtain j where j: "\k. ?Y j \ ?Y k" by fast + show "\z m. \n\m. ?Y n = z" + proof (intro exI allI impI) + fix k + assume "j \ k" + hence "?Y k \ ?Y j" by (rule antichain_iterate_app) + also have "?Y j \ ?Y k" by (rule j) + finally show "?Y k = ?Y j" . + qed +qed + +lemma eventually_constant_iterate: + "eventually_constant (\n. iterate n\f)" +proof - + have "\y\range (\x. f\x). eventually_constant (\i. iterate i\f\y)" + by (simp add: eventually_constant_iterate_app) + hence "\y\range (\x. f\x). MOST i. MOST j. iterate j\f\y = iterate i\f\y" + unfolding eventually_constant_MOST_MOST . + hence "MOST i. MOST j. \y\range (\x. f\x). iterate j\f\y = iterate i\f\y" + by (simp only: MOST_finite_Ball_distrib [OF finite_range]) + hence "MOST i. MOST j. \x. iterate j\f\(f\x) = iterate i\f\(f\x)" + by simp + hence "MOST i. MOST j. \x. iterate (Suc j)\f\x = iterate (Suc i)\f\x" + by (simp only: iterate_Suc2) + hence "MOST i. MOST j. iterate (Suc j)\f = iterate (Suc i)\f" + by (simp only: expand_cfun_eq) + hence "eventually_constant (\i. iterate (Suc i)\f)" + unfolding eventually_constant_MOST_MOST . + thus "eventually_constant (\i. iterate i\f)" + by (rule eventually_constant_SucD) +qed + +abbreviation + d :: "'a \ 'a" +where + "d \ eventual_iterate f" + +lemma MOST_d: "MOST n. P (iterate n\f) \ P d" +unfolding eventual_iterate_def +using eventually_constant_iterate by (rule MOST_eventual) + +lemma f_d: "f\(d\x) = d\x" +apply (rule MOST_d) +apply (subst iterate_Suc [symmetric]) +apply (rule eventually_constant_MOST_Suc_eq) +apply (rule eventually_constant_iterate_app) +done + +lemma d_fixed_iff: "d\x = x \ f\x = x" +proof + assume "d\x = x" + with f_d [where x=x] + show "f\x = x" by simp +next + assume f: "f\x = x" + have "\n. iterate n\f\x = x" + by (rule allI, rule nat.induct, simp, simp add: f) + hence "MOST n. iterate n\f\x = x" + by (rule ALL_MOST) + thus "d\x = x" + by (rule MOST_d) +qed + +lemma finite_deflation_d: "finite_deflation d" +proof + fix x :: 'a + have "d \ range (\n. iterate n\f)" + unfolding eventual_iterate_def + using eventually_constant_iterate + by (rule eventual_mem_range) + then obtain n where n: "d = iterate n\f" .. + have "iterate n\f\(d\x) = d\x" + using f_d by (rule iterate_fixed) + thus "d\(d\x) = d\x" + by (simp add: n) +next + fix x :: 'a + show "d\x \ x" + by (rule MOST_d, simp add: iterate_below) +next + from finite_range + have "finite {x. f\x = x}" + by (rule finite_range_imp_finite_fixes) + thus "finite {x. d\x = x}" + by (simp add: d_fixed_iff) +qed + +lemma deflation_d: "deflation d" +using finite_deflation_d +by (rule finite_deflation_imp_deflation) + +end + +lemma finite_deflation_eventual_iterate: + "pre_deflation d \ finite_deflation (eventual_iterate d)" +by (rule pre_deflation.finite_deflation_d) + +lemma pre_deflation_oo: + assumes "finite_deflation d" + assumes f: "\x. f\x \ x" + shows "pre_deflation (d oo f)" +proof + interpret d: finite_deflation d by fact + fix x + show "\x. (d oo f)\x \ x" + by (simp, rule below_trans [OF d.below f]) + show "finite (range (\x. (d oo f)\x))" + by (rule finite_subset [OF _ d.finite_range], auto) +qed + +lemma eventual_iterate_oo_fixed_iff: + assumes "finite_deflation d" + assumes f: "\x. f\x \ x" + shows "eventual_iterate (d oo f)\x = x \ d\x = x \ f\x = x" +proof - + interpret d: finite_deflation d by fact + let ?e = "d oo f" + interpret e: pre_deflation "d oo f" + using `finite_deflation d` f + by (rule pre_deflation_oo) + let ?g = "eventual (\n. iterate n\?e)" + show ?thesis + apply (subst e.d_fixed_iff) + apply simp + apply safe + apply (erule subst) + apply (rule d.idem) + apply (rule below_antisym) + apply (rule f) + apply (erule subst, rule d.below) + apply simp + done +qed + +lemma eventual_mono: + assumes A: "eventually_constant A" + assumes B: "eventually_constant B" + assumes below: "\n. A n \ B n" + shows "eventual A \ eventual B" +proof - + from A have "MOST n. A n = eventual A" + by (rule MOST_eq_eventual) + then have "MOST n. eventual A \ B n" + by (rule MOST_mono) (erule subst, rule below) + with B show "eventual A \ eventual B" + by (rule MOST_eventual) +qed + +lemma eventual_iterate_mono: + assumes f: "pre_deflation f" and g: "pre_deflation g" and "f \ g" + shows "eventual_iterate f \ eventual_iterate g" +unfolding eventual_iterate_def +apply (rule eventual_mono) +apply (rule pre_deflation.eventually_constant_iterate [OF f]) +apply (rule pre_deflation.eventually_constant_iterate [OF g]) +apply (rule monofun_cfun_arg [OF `f \ g`]) +done + +lemma cont2cont_eventual_iterate_oo: + assumes d: "finite_deflation d" + assumes cont: "cont f" and below: "\x y. f x\y \ y" + shows "cont (\x. eventual_iterate (d oo f x))" + (is "cont ?e") +proof (rule contI2) + show "monofun ?e" + apply (rule monofunI) + apply (rule eventual_iterate_mono) + apply (rule pre_deflation_oo [OF d below]) + apply (rule pre_deflation_oo [OF d below]) + apply (rule monofun_cfun_arg) + apply (erule cont2monofunE [OF cont]) + done +next + fix Y :: "nat \ 'b" + assume Y: "chain Y" + with cont have fY: "chain (\i. f (Y i))" + by (rule ch2ch_cont) + assume eY: "chain (\i. ?e (Y i))" + have lub_below: "\x. f (\i. Y i)\x \ x" + by (rule admD [OF _ Y], simp add: cont, rule below) + have "deflation (?e (\i. Y i))" + apply (rule pre_deflation.deflation_d) + apply (rule pre_deflation_oo [OF d lub_below]) + done + then show "?e (\i. Y i) \ (\i. ?e (Y i))" + proof (rule deflation.belowI) + fix x :: 'a + assume "?e (\i. Y i)\x = x" + hence "d\x = x" and "f (\i. Y i)\x = x" + by (simp_all add: eventual_iterate_oo_fixed_iff [OF d lub_below]) + hence "(\i. f (Y i)\x) = x" + apply (simp only: cont2contlubE [OF cont Y]) + apply (simp only: contlub_cfun_fun [OF fY]) + done + have "compact (d\x)" + using d by (rule finite_deflation.compact) + then have "compact x" + using `d\x = x` by simp + then have "compact (\i. f (Y i)\x)" + using `(\i. f (Y i)\x) = x` by simp + then have "\n. max_in_chain n (\i. f (Y i)\x)" + by - (rule compact_imp_max_in_chain, simp add: fY, assumption) + then obtain n where n: "max_in_chain n (\i. f (Y i)\x)" .. + then have "f (Y n)\x = x" + using `(\i. f (Y i)\x) = x` fY by (simp add: maxinch_is_thelub) + with `d\x = x` have "?e (Y n)\x = x" + by (simp add: eventual_iterate_oo_fixed_iff [OF d below]) + moreover have "?e (Y n)\x \ (\i. ?e (Y i)\x)" + by (rule is_ub_thelub, simp add: eY) + ultimately have "x \ (\i. ?e (Y i))\x" + by (simp add: contlub_cfun_fun eY) + also have "(\i. ?e (Y i))\x \ x" + apply (rule deflation.below) + apply (rule admD [OF adm_deflation eY]) + apply (rule pre_deflation.deflation_d) + apply (rule pre_deflation_oo [OF d below]) + done + finally show "(\i. ?e (Y i))\x = x" .. + qed +qed + +subsection {* Take function for finite deflations *} + +definition + defl_take :: "nat \ (udom \ udom) \ (udom \ udom)" +where + "defl_take i d = eventual_iterate (udom_approx i oo d)" + +lemma finite_deflation_defl_take: + "deflation d \ finite_deflation (defl_take i d)" +unfolding defl_take_def +apply (rule pre_deflation.finite_deflation_d) +apply (rule pre_deflation_oo) +apply (rule finite_deflation_udom_approx) +apply (erule deflation.below) +done + +lemma deflation_defl_take: + "deflation d \ deflation (defl_take i d)" +apply (rule finite_deflation_imp_deflation) +apply (erule finite_deflation_defl_take) +done + +lemma defl_take_fixed_iff: + "deflation d \ defl_take i d\x = x \ udom_approx i\x = x \ d\x = x" +unfolding defl_take_def +apply (rule eventual_iterate_oo_fixed_iff) +apply (rule finite_deflation_udom_approx) +apply (erule deflation.below) +done + +lemma defl_take_below: + "\a \ b; deflation a; deflation b\ \ defl_take i a \ defl_take i b" +apply (rule deflation.belowI) +apply (erule deflation_defl_take) +apply (simp add: defl_take_fixed_iff) +apply (erule (1) deflation.belowD) +apply (erule conjunct2) +done + +lemma cont2cont_defl_take: + assumes cont: "cont f" and below: "\x y. f x\y \ y" + shows "cont (\x. defl_take i (f x))" +unfolding defl_take_def +using finite_deflation_udom_approx assms +by (rule cont2cont_eventual_iterate_oo) + +definition + fd_take :: "nat \ fin_defl \ fin_defl" +where + "fd_take i d = Abs_fin_defl (defl_take i (Rep_fin_defl d))" + +lemma Rep_fin_defl_fd_take: + "Rep_fin_defl (fd_take i d) = defl_take i (Rep_fin_defl d)" +unfolding fd_take_def +apply (rule Abs_fin_defl_inverse [unfolded mem_Collect_eq]) +apply (rule finite_deflation_defl_take) +apply (rule deflation_Rep_fin_defl) +done + +lemma fd_take_fixed_iff: + "Rep_fin_defl (fd_take i d)\x = x \ + udom_approx i\x = x \ Rep_fin_defl d\x = x" +unfolding Rep_fin_defl_fd_take +apply (rule defl_take_fixed_iff) +apply (rule deflation_Rep_fin_defl) +done + +lemma fd_take_below: "fd_take n d \ d" +apply (rule fin_defl_belowI) +apply (simp add: fd_take_fixed_iff) +done + +lemma fd_take_idem: "fd_take n (fd_take n d) = fd_take n d" +apply (rule fin_defl_eqI) +apply (simp add: fd_take_fixed_iff) +done + +lemma fd_take_mono: "a \ b \ fd_take n a \ fd_take n b" +apply (rule fin_defl_belowI) +apply (simp add: fd_take_fixed_iff) +apply (simp add: fin_defl_belowD) +done + +lemma approx_fixed_le_lemma: "\i \ j; udom_approx i\x = x\ \ udom_approx j\x = x" +apply (rule deflation.belowD) +apply (rule finite_deflation_imp_deflation) +apply (rule finite_deflation_udom_approx) +apply (erule chain_mono [OF chain_udom_approx]) +apply assumption +done + +lemma fd_take_chain: "m \ n \ fd_take m a \ fd_take n a" +apply (rule fin_defl_belowI) +apply (simp add: fd_take_fixed_iff) +apply (simp add: approx_fixed_le_lemma) +done + +lemma finite_range_fd_take: "finite (range (fd_take n))" +apply (rule finite_imageD [where f="\a. {x. Rep_fin_defl a\x = x}"]) +apply (rule finite_subset [where B="Pow {x. udom_approx n\x = x}"]) +apply (clarify, simp add: fd_take_fixed_iff) +apply (simp add: finite_deflation.finite_fixes [OF finite_deflation_udom_approx]) +apply (rule inj_onI, clarify) +apply (simp add: set_eq_iff fin_defl_eqI) +done + +lemma fd_take_covers: "\n. fd_take n a = a" +apply (rule_tac x= + "Max ((\x. LEAST n. udom_approx n\x = x) ` {x. Rep_fin_defl a\x = x})" in exI) +apply (rule below_antisym) +apply (rule fd_take_below) +apply (rule fin_defl_belowI) +apply (simp add: fd_take_fixed_iff) +apply (rule approx_fixed_le_lemma) +apply (rule Max_ge) +apply (rule finite_imageI) +apply (rule Rep_fin_defl.finite_fixes) +apply (rule imageI) +apply (erule CollectI) +apply (rule LeastI_ex) +apply (rule approx_chain.compact_eq_approx [OF udom_approx]) +apply (erule subst) +apply (rule Rep_fin_defl.compact) +done + +subsection {* Chain of approx functions on algebraic deflations *} + +definition + defl_approx :: "nat \ defl \ defl" +where + "defl_approx = (\i. defl.basis_fun (\d. defl_principal (fd_take i d)))" + +lemma defl_approx_principal: + "defl_approx i\(defl_principal d) = defl_principal (fd_take i d)" +unfolding defl_approx_def +by (simp add: defl.basis_fun_principal fd_take_mono) + +lemma defl_approx: "approx_chain defl_approx" +proof + show chain: "chain defl_approx" + unfolding defl_approx_def + by (simp add: chainI defl.basis_fun_mono fd_take_mono fd_take_chain) + show idem: "\i x. defl_approx i\(defl_approx i\x) = defl_approx i\x" + apply (induct_tac x rule: defl.principal_induct, simp) + apply (simp add: defl_approx_principal fd_take_idem) + done + show below: "\i x. defl_approx i\x \ x" + apply (induct_tac x rule: defl.principal_induct, simp) + apply (simp add: defl_approx_principal fd_take_below) + done + show lub: "(\i. defl_approx i) = ID" + apply (rule ext_cfun, rule below_antisym) + apply (simp add: contlub_cfun_fun chain lub_below_iff chain below) + apply (induct_tac x rule: defl.principal_induct, simp) + apply (simp add: contlub_cfun_fun chain) + apply (simp add: compact_below_lub_iff defl.compact_principal chain) + apply (simp add: defl_approx_principal) + apply (subgoal_tac "\i. fd_take i a = a", metis below_refl) + apply (rule fd_take_covers) + done + show "\i. finite {x. defl_approx i\x = x}" + apply (rule finite_range_imp_finite_fixes) + apply (rule_tac B="defl_principal ` range (fd_take i)" in rev_finite_subset) + apply (simp add: finite_range_fd_take) + apply (clarsimp, rename_tac x) + apply (induct_tac x rule: defl.principal_induct) + apply (simp add: adm_mem_finite finite_range_fd_take) + apply (simp add: defl_approx_principal) + done +qed + +subsection {* Algebraic deflations are a bifinite domain *} + +instantiation defl :: bifinite +begin + +definition + "emb = udom_emb defl_approx" + +definition + "prj = udom_prj defl_approx" + +definition + "defl (t::defl itself) = + (\i. defl_principal (Abs_fin_defl (emb oo defl_approx i oo prj)))" + +instance proof + show ep: "ep_pair emb (prj :: udom \ defl)" + unfolding emb_defl_def prj_defl_def + by (rule ep_pair_udom [OF defl_approx]) + show "cast\DEFL(defl) = emb oo (prj :: udom \ defl)" + unfolding defl_defl_def + apply (subst contlub_cfun_arg) + apply (rule chainI) + apply (rule defl.principal_mono) + apply (simp add: below_fin_defl_def) + apply (simp add: Abs_fin_defl_inverse approx_chain.finite_deflation_approx [OF defl_approx] + ep_pair.finite_deflation_e_d_p [OF ep]) + apply (intro monofun_cfun below_refl) + apply (rule chainE) + apply (rule approx_chain.chain_approx [OF defl_approx]) + apply (subst cast_defl_principal) + apply (simp add: Abs_fin_defl_inverse approx_chain.finite_deflation_approx [OF defl_approx] + ep_pair.finite_deflation_e_d_p [OF ep]) + apply (simp add: lub_distribs approx_chain.chain_approx [OF defl_approx] + approx_chain.lub_approx [OF defl_approx]) + done +qed + +end + +end diff -r ad60d7311f43 -r e3948547b541 src/HOLCF/Library/HOLCF_Library.thy --- a/src/HOLCF/Library/HOLCF_Library.thy Mon Oct 11 08:32:09 2010 -0700 +++ b/src/HOLCF/Library/HOLCF_Library.thy Mon Oct 11 09:54:04 2010 -0700 @@ -1,5 +1,6 @@ theory HOLCF_Library imports + Defl_Bifinite List_Cpo Stream Strict_Fun