src/HOL/HOLCF/UpperPD.thy
changeset 41288 a19edebad961
parent 41287 029a6fc1bfb8
child 41289 f655912ac235
equal deleted inserted replaced
41287:029a6fc1bfb8 41288:a19edebad961
    76   "{S::'a pd_basis set. upper_le.ideal S}"
    76   "{S::'a pd_basis set. upper_le.ideal S}"
    77 by (rule upper_le.ex_ideal)
    77 by (rule upper_le.ex_ideal)
    78 
    78 
    79 type_notation (xsymbols) upper_pd ("('(_')\<sharp>)")
    79 type_notation (xsymbols) upper_pd ("('(_')\<sharp>)")
    80 
    80 
    81 instantiation upper_pd :: ("domain") below
    81 instantiation upper_pd :: (bifinite) below
    82 begin
    82 begin
    83 
    83 
    84 definition
    84 definition
    85   "x \<sqsubseteq> y \<longleftrightarrow> Rep_upper_pd x \<subseteq> Rep_upper_pd y"
    85   "x \<sqsubseteq> y \<longleftrightarrow> Rep_upper_pd x \<subseteq> Rep_upper_pd y"
    86 
    86 
    87 instance ..
    87 instance ..
    88 end
    88 end
    89 
    89 
    90 instance upper_pd :: ("domain") po
    90 instance upper_pd :: (bifinite) po
    91 using type_definition_upper_pd below_upper_pd_def
    91 using type_definition_upper_pd below_upper_pd_def
    92 by (rule upper_le.typedef_ideal_po)
    92 by (rule upper_le.typedef_ideal_po)
    93 
    93 
    94 instance upper_pd :: ("domain") cpo
    94 instance upper_pd :: (bifinite) cpo
    95 using type_definition_upper_pd below_upper_pd_def
    95 using type_definition_upper_pd below_upper_pd_def
    96 by (rule upper_le.typedef_ideal_cpo)
    96 by (rule upper_le.typedef_ideal_cpo)
    97 
    97 
    98 definition
    98 definition
    99   upper_principal :: "'a pd_basis \<Rightarrow> 'a upper_pd" where
    99   upper_principal :: "'a pd_basis \<Rightarrow> 'a upper_pd" where
   108 text {* Upper powerdomain is pointed *}
   108 text {* Upper powerdomain is pointed *}
   109 
   109 
   110 lemma upper_pd_minimal: "upper_principal (PDUnit compact_bot) \<sqsubseteq> ys"
   110 lemma upper_pd_minimal: "upper_principal (PDUnit compact_bot) \<sqsubseteq> ys"
   111 by (induct ys rule: upper_pd.principal_induct, simp, simp)
   111 by (induct ys rule: upper_pd.principal_induct, simp, simp)
   112 
   112 
   113 instance upper_pd :: ("domain") pcpo
   113 instance upper_pd :: (bifinite) pcpo
   114 by intro_classes (fast intro: upper_pd_minimal)
   114 by intro_classes (fast intro: upper_pd_minimal)
   115 
   115 
   116 lemma inst_upper_pd_pcpo: "\<bottom> = upper_principal (PDUnit compact_bot)"
   116 lemma inst_upper_pd_pcpo: "\<bottom> = upper_principal (PDUnit compact_bot)"
   117 by (rule upper_pd_minimal [THEN UU_I, symmetric])
   117 by (rule upper_pd_minimal [THEN UU_I, symmetric])
   118 
   118 
   459   assumes "approx_chain a"
   459   assumes "approx_chain a"
   460   shows "approx_chain (\<lambda>i. upper_map\<cdot>(a i))"
   460   shows "approx_chain (\<lambda>i. upper_map\<cdot>(a i))"
   461   using assms unfolding approx_chain_def
   461   using assms unfolding approx_chain_def
   462   by (simp add: lub_APP upper_map_ID finite_deflation_upper_map)
   462   by (simp add: lub_APP upper_map_ID finite_deflation_upper_map)
   463 
   463 
   464 instance upper_pd :: ("domain") bifinite
   464 instance upper_pd :: (bifinite) bifinite
   465 proof
   465 proof
   466   show "\<exists>(a::nat \<Rightarrow> 'a upper_pd \<rightarrow> 'a upper_pd). approx_chain a"
   466   show "\<exists>(a::nat \<Rightarrow> 'a upper_pd \<rightarrow> 'a upper_pd). approx_chain a"
   467     using bifinite [where 'a='a]
   467     using bifinite [where 'a='a]
   468     by (fast intro!: approx_chain_upper_map)
   468     by (fast intro!: approx_chain_upper_map)
   469 qed
   469 qed
   520     by (simp add: cast_DEFL oo_def cfun_eq_iff upper_map_map)
   520     by (simp add: cast_DEFL oo_def cfun_eq_iff upper_map_map)
   521 qed
   521 qed
   522 
   522 
   523 end
   523 end
   524 
   524 
   525 lemma DEFL_upper: "DEFL('a upper_pd) = upper_defl\<cdot>DEFL('a)"
   525 lemma DEFL_upper: "DEFL('a::domain upper_pd) = upper_defl\<cdot>DEFL('a)"
   526 by (rule defl_upper_pd_def)
   526 by (rule defl_upper_pd_def)
   527 
   527 
   528 
   528 
   529 subsection {* Join *}
   529 subsection {* Join *}
   530 
   530