src/HOL/HOLCF/Algebraic.thy
changeset 41286 3d7685a4a5ff
parent 40888 28cd51cff70c
child 41287 029a6fc1bfb8
     1.1 --- a/src/HOL/HOLCF/Algebraic.thy	Sun Dec 19 04:06:02 2010 -0800
     1.2 +++ b/src/HOL/HOLCF/Algebraic.thy	Sun Dec 19 05:15:31 2010 -0800
     1.3 @@ -97,9 +97,10 @@
     1.4    "defl_principal t = Abs_defl {u. u \<sqsubseteq> t}"
     1.5  
     1.6  lemma fin_defl_countable: "\<exists>f::fin_defl \<Rightarrow> nat. inj f"
     1.7 -proof
     1.8 -  have *: "\<And>d. finite (approx_chain.place udom_approx `
     1.9 -               Rep_compact_basis -` {x. Rep_fin_defl d\<cdot>x = x})"
    1.10 +proof -
    1.11 +  obtain f :: "udom compact_basis \<Rightarrow> nat" where inj_f: "inj f"
    1.12 +    using compact_basis.countable ..
    1.13 +  have *: "\<And>d. finite (f ` Rep_compact_basis -` {x. Rep_fin_defl d\<cdot>x = x})"
    1.14      apply (rule finite_imageI)
    1.15      apply (rule finite_vimageI)
    1.16      apply (rule Rep_fin_defl.finite_fixes)
    1.17 @@ -107,11 +108,11 @@
    1.18      done
    1.19    have range_eq: "range Rep_compact_basis = {x. compact x}"
    1.20      using type_definition_compact_basis by (rule type_definition.Rep_range)
    1.21 -  show "inj (\<lambda>d. set_encode
    1.22 -    (approx_chain.place udom_approx ` Rep_compact_basis -` {x. Rep_fin_defl d\<cdot>x = x}))"
    1.23 +  have "inj (\<lambda>d. set_encode
    1.24 +    (f ` Rep_compact_basis -` {x. Rep_fin_defl d\<cdot>x = x}))"
    1.25      apply (rule inj_onI)
    1.26      apply (simp only: set_encode_eq *)
    1.27 -    apply (simp only: inj_image_eq_iff approx_chain.inj_place [OF udom_approx])
    1.28 +    apply (simp only: inj_image_eq_iff inj_f)
    1.29      apply (drule_tac f="image Rep_compact_basis" in arg_cong)
    1.30      apply (simp del: vimage_Collect_eq add: range_eq set_eq_iff)
    1.31      apply (rule Rep_fin_defl_inject [THEN iffD1])
    1.32 @@ -121,6 +122,7 @@
    1.33      apply (rule Rep_fin_defl.compact_belowI, rename_tac z)
    1.34      apply (drule_tac x=z in spec, simp)
    1.35      done
    1.36 +  thus ?thesis by - (rule exI)
    1.37  qed
    1.38  
    1.39  interpretation defl: ideal_completion below defl_principal Rep_defl