(* Title: HOL/HOLCF/LowerPD.thy Author: Brian Huffman *)
section‹Lower powerdomain›
theory LowerPD imports Compact_Basis begin
subsection‹Basis preorder›
definition
lower_le :: "'a::bifinite pd_basis ==> 'a pd_basis ==> bool" (infix‹≤♭› 50) where "lower_le = (λu v. ∀x∈Rep_pd_basis u. ∃y∈Rep_pd_basis v. x ⊑ y)"
lemma lower_le_refl [simp]: "t ≤♭ t" unfolding lower_le_def by fast
lemma PDUnit_lower_mono: "x ⊑ y ==> PDUnit x ≤♭ PDUnit y" unfolding lower_le_def Rep_PDUnit by fast
lemma PDPlus_lower_mono: "[s ≤♭ t; u ≤♭ v]==> PDPlus s u ≤♭ PDPlus t v" unfolding lower_le_def Rep_PDPlus by fast
lemma PDPlus_lower_le: "t ≤♭ PDPlus t u" unfolding lower_le_def Rep_PDPlus by fast
lemma lower_le_PDUnit_PDUnit_iff [simp]: "(PDUnit a ≤♭ PDUnit b) = (a ⊑ b)" unfolding lower_le_def Rep_PDUnit by fast
lemma lower_le_PDUnit_PDPlus_iff: "(PDUnit a ≤♭ PDPlus t u) = (PDUnit a ≤♭ t ∨ PDUnit a ≤♭ u)" unfolding lower_le_def Rep_PDPlus Rep_PDUnit by fast
lemma lower_le_PDPlus_iff: "(PDPlus t u ≤♭ v) = (t ≤♭ v ∧ u ≤♭ v)" unfolding lower_le_def Rep_PDPlus by fast
lemma lower_le_induct [induct set: lower_le]: assumes le: "t ≤♭ u" assumes 1: "∧a b. a ⊑ b ==> P (PDUnit a) (PDUnit b)" assumes 2: "∧t u a. P (PDUnit a) t ==> P (PDUnit a) (PDPlus t u)" assumes 3: "∧t u v. [P t v; P u v]==> P (PDPlus t u) v" shows"P t u" using le proof (induct t arbitrary: u rule: pd_basis_induct) case (PDUnit a) thenshow ?case proof (induct u rule: pd_basis_induct) case PDUnit thenshow ?caseby (simp add: 1) next case (PDPlus t u) from PDPlus(3) consider (t) "PDUnit a ≤♭ t" | (u) "PDUnit a ≤♭ u" by (auto simp: lower_le_PDUnit_PDPlus_iff) thenshow ?case proof cases case t thenhave"P (PDUnit a) t"by (rule PDPlus(1)) thenshow ?thesis by (rule 2) next case u thenhave"P (PDUnit a) u"by (rule PDPlus(2)) thenhave"P (PDUnit a) (PDPlus u t)"by (rule 2) thenshow ?thesis by (simp only: PDPlus_commute) qed qed next case (PDPlus t t') thenshow ?caseby (simp add: lower_le_PDPlus_iff 3) qed
definition "x ⊑ y ⟷ Rep_lower_pd x ⊆ Rep_lower_pd y"
instance .. end
instance lower_pd :: (bifinite) po using type_definition_lower_pd below_lower_pd_def by (rule lower_le.typedef_ideal_po)
instance lower_pd :: (bifinite) cpo using type_definition_lower_pd below_lower_pd_def by (rule lower_le.typedef_ideal_cpo)
definition
lower_principal :: "'a::bifinite pd_basis ==> 'a lower_pd"where "lower_principal t = Abs_lower_pd {u. u ≤♭ t}"
interpretation lower_pd:
ideal_completion lower_le lower_principal Rep_lower_pd using type_definition_lower_pd below_lower_pd_def using lower_principal_def pd_basis_countable by (rule lower_le.typedef_ideal_completion)
lemma lower_pd_induct1: assumes P: "adm P" assumes unit: "∧x. P {x}♭" assumes insert: "∧x ys. [P {x}♭; P ys]==> P ({x}♭∪♭ ys)" shows"P (xs::'a::bifinite lower_pd)" proof (induct xs rule: lower_pd.principal_induct) have *: "P {Rep_compact_basis a}♭"for a by (rule unit) show"P (lower_principal a)"for a proof (induct a rule: pd_basis_induct1) case PDUnit from * show ?case by (simp only: lower_unit_Rep_compact_basis [symmetric]) next case (PDPlus a t) with * have"P ({Rep_compact_basis a}♭∪♭ lower_principal t)" by (rule insert) thenshow ?case by (simp only: lower_unit_Rep_compact_basis [symmetric] lower_plus_principal [symmetric]) qed qed (rule P)
lemma lower_pd_induct [case_names adm lower_unit lower_plus, induct type: lower_pd]: assumes P: "adm P" assumes unit: "∧x. P {x}♭" assumes plus: "∧xs ys. [P xs; P ys]==> P (xs ∪♭ ys)" shows"P (xs::'a::bifinite lower_pd)" proof (induct xs rule: lower_pd.principal_induct) show"P (lower_principal a)"for a proof (induct a rule: pd_basis_induct) case PDUnit thenshow ?case by (simp only: lower_unit_Rep_compact_basis [symmetric] unit) next case PDPlus thenshow ?case by (simp only: lower_plus_principal [symmetric] plus) qed qed (rule P)
subsection‹Monadic bind›
definition
lower_bind_basis :: "'a::bifinite pd_basis ==> ('a → 'b lower_pd) → 'b::bifinite lower_pd"where "lower_bind_basis = fold_pd (λa. Λ f. f⋅(Rep_compact_basis a)) (λx y. Λ f. x⋅f ∪♭ y⋅f)"
lemma approx_chain_lower_map: assumes"approx_chain a" shows"approx_chain (λi. lower_map⋅(a i))" using assms unfolding approx_chain_def by (simp add: lub_APP lower_map_ID finite_deflation_lower_map)
instance lower_pd :: (bifinite) bifinite proof show"∃(a::nat ==> 'a lower_pd → 'a lower_pd). approx_chain a" using bifinite [where 'a='a] by (fast intro!: approx_chain_lower_map) qed
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 und die Messung sind noch experimentell.