semantic spaces are modelled as lattices arising from the fixed
of various closure operators. We attempt to reduce our proof
by defining a locale for Kuratowski's closure axioms,
we do not requre strictness (i.e., it need not be the case that
closure maps ‹⊥› to ‹⊥›). 🍋‹‹\S2.33› in
DaveyPriestley:2002"› term these 🪙‹topped
structures›; see also 🍋‹"PfaltzSlapal:2013"› for additional useful
.
›
locale closure =
ordering "(\<le>)""(<)" ―‹ We use a partial order as a preorder does not ensure that the closure is idempotent › for less_eq :: "'a ==> 'a ==> bool" (infix‹\≤›50) and less :: "'a ==> 'a ==> bool" (infix‹<›50)
+ fixes cl :: "'a ==> 'a" assumes cl: "x \<le> cl y ⟷ cl x \<le> cl y" ―‹ All-in-one non-strict Kuratowski axiom › begin
definition closed :: "'a set"where ―‹ These pre fixed points form a complete lattice ala Tarski/Knaster › "closed = {x. cl x \<le> x}"
lemma closed_clI: assumes"cl x \<le> x" shows"x ∈ closed" unfolding closed_def using assms by simp
lemma least: assumes"x \<le> y" assumes"y ∈ closed" shows"cl x \<le> y" using assms cl closed_def trans by (blast intro: expansive)
lemma least_conv: assumes"y ∈ closed" shows"cl x \<le> y ⟷ x \<le> y" using assms expansive least trans by blast
lemma closed[iff]: shows"cl x ∈ closed" unfolding closed_def by (simp add: refl)
lemma le_closedE: assumes"x \<le> cl y" assumes"y ∈ closed" shows"x \<le> y" using assms closed_def trans by blast
lemma closed_conv: ―‹ Typically used to manifest the closure using ‹subst›› assumes"X ∈ closed" shows"X = cl X" using assms unfolding closed_def by (blast intro: antisym expansive)
end
lemma (in ordering) closure_axioms_alt_def: ―‹ Equivalence with the Kuratowski closure axioms › shows"closure_axioms (\<le>) cl ⟷ (∀x. x \<le> cl x) ∧ monotone (\<le>) (\<le>) cl ∧ (∀x. cl (cl x) = cl x)" unfolding closure_axioms_def monotone_def by (metis antisym trans refl)
subsection‹ Complete lattices and algebraic closures\label{sec:closures-lattices} ›
locale closure_complete_lattice =
complete_lattice "\<Sqinter>""\<Squnion>""(\<sqinter>)""(\<le>)""(<)""(\<squnion>)""\<bottom>""\<top>"
+ closure "(\<le>)""(<)" cl for less_eqa :: "'a ==> 'a ==> bool" (infix‹\≤›50) and lessa (infix‹<›50) and infa (infixl‹\⊓›70) and supa (infixl‹\⊔›65) and bota (‹\⊥›) and topa (‹\⊤›) and Inf (‹\⊓›) and Sup (‹\⊔›) and cl :: "'a ==> 'a" begin
lemma cl_bot_least: shows"cl \<bottom> \<le> cl X" using cl by auto
lemma cl_Inf_closed: shows"cl x = \<Sqinter>{y ∈ closed. x \<le> y}" by (blast intro: sym[OF Inf_eqI] least expansive)
closures for logical purposes are taken to be ``algebraic'', aka ``consequence operators'' 🍋‹‹Definition~7.12› in "DaveyPriestley:2002"›, where 🪙‹compactness› does the work
the finite/singleton sets.
›
locale closure_complete_lattice_algebraic = ―‹🍋‹‹Definition~7.12› in "DaveyPriestley:2002"››
closure_complete_lattice
+ assumes algebraic_le: "cl x \<le> \<Squnion>(cl ` ({y. y \<le> x} ∩ compact_points))" ―‹ The converse is given by monotonicity › begin
lemma algebraic: shows"cl x = \<Squnion>(cl ` ({y. y \<le> x} ∩ compact_points))" by (clarsimp simp: order.eq_iff Sup_le_iff algebraic_le expansive simp flip: cl elim!: order.trans)
lemma cont_cl: ―‹ Equivalent to @{thm [source] algebraic_le} 🍋‹‹Theorem~7.14› in "DaveyPriestley:2002"›› shows"cont \<Squnion> (\<le>) \<Squnion> (\<le>) cl" proof(rule contI) fix X :: "'a set" assume X: "Complete_Partial_Order.chain (\<le>) X""X ≠ {}" show"cl (\<Squnion>X) = \<Squnion>(cl ` X)" (is"?lhs = ?rhs") proof(rule order.antisym[OF _ Sup_cl_le]) have"?lhs = \<Squnion>(cl ` ({y. y \<le> \<Squnion>X} ∩ compact_points))"by (subst algebraic) simp alsofrom X have"…\<le> \<Squnion>(cl ` ({Y |Y x. Y \<le> x ∧ x ∈ X} ∩ compact_points))" by (auto dest: chain_directed compact_points_directedD intro: SUP_upper simp: Sup_le_iff) alsohave"…\<le> ?rhs" by (clarsimp simp: Sup_le_iff SUP_upper2 monotoneD[OF monotone_cl]) finallyshow"?lhs \<le> ?rhs" . qed qed
lemma mcont2mcont_cl[cont_intro]: assumes"mcont luba orda \<Squnion> (\<le>) F" shows"mcont luba orda \<Squnion> (\<le>) (λx. cl (F x))" using assms ccpo.mcont2mcont[OF complete_lattice_ccpo] mcont_cl by blast
lemma closure_sup_irreducible_on: ―‹ converse requires the closure to be T0 › assumes"sup_irreducible_on closed (cl x)" shows"sup_irreducible_on closed x" using assms sup_irreducible_on_def closed_conv closed_sup by auto
locale closure_complete_distrib_lattice_distributive_class =
closure_complete_lattice_distributive "(≤)""(<)""(⊓)""(⊔)""⊥ :: _ :: complete_distrib_lattice""⊤""Inf""Sup" begin
text‹
lattice arising from the closed elements for a distributive closure is completely distributive,
.e., ‹Inf› and ‹Sup› distribute. See 🍋‹‹Section~10.23› in "DaveyPriestley:2002"›.
›
lemma closed_complete_distrib_lattice_axiomI': assumes"∀A∈A. ∀x∈A. x ∈ closed" shows"(⊓X∈A. ⊔X ⊔ cl ⊥) ≤⊔(Inf ` {f ` A |f. (∀X⊆closed. f X ∈ closed) ∧ (∀Y ∈ A. f Y ∈ Y)}) ⊔ cl ⊥" proof - from assms have"∃f'. f ` A = f' ` A ∧ (∀X⊆closed. f' X ∈ closed) ∧ (∀Y∈A. f' Y ∈ Y)" if"∀Y∈A. f Y ∈ Y"for f using that by (fastforce intro!: exI[where x="λx. if f x ∈ closed then f x else cl ⊥"]) thenshow ?thesis by (clarsimp simp: Inf_Sup Sup_le_iff simp flip: INF_sup intro!: le_supI1 Sup_upper) qed
lemma closed_complete_distrib_lattice_axiomI[intro]: assumes"∀A∈A. ∀x∈A. x ∈ closed" shows"(⊓X∈A. ⊔X ⊔ cl ⊥) ≤⊔(Inf ` {B. (∃f. (∀x. (∀x∈x. x ∈ closed) ⟶ f x ∈ closed) ∧ B = f ` A ∧ (∀Y∈A. f Y ∈ Y)) ∧ (∀x∈B. x ∈ closed)}) ⊔ cl ⊥" by (rule order.trans[OF closed_complete_distrib_lattice_axiomI'[OF assms]])
(use assms in‹clarsimp simp: Sup_le_iff ac_simps›; fast intro!: exI imageI Sup_upper le_supI2)
lemma closed_strict_complete_distrib_lattice_axiomI[intro]: assumes"cl ⊥ = ⊥" assumes"∀A∈A. ∀x∈A. x ∈ closed" shows"(⊓X∈A. ⊔X) ≤⊔(Inf ` {x. (∃f. (∀x. (∀x∈x. x ∈ closed) ⟶ f x ∈ closed) ∧ x = f ` A ∧ (∀Y∈A. f Y ∈ Y)) ∧ (∀x∈x. x ∈ closed)})" using closed_complete_distrib_lattice_axiomI[simplified assms(1), simplified, OF assms(2)] .
end
subsection‹ Closures over powersets\label{sec:closures-powersets} ›
locale closure_powerset =
closure_complete_lattice_class cl for cl :: "'a set ==> 'a set" begin
lemmas expansive' = subsetD[OF expansive]
lemma closedI[intro]: assumes"∧x. x ∈ cl X ==> x ∈ X" shows"X ∈ closed" unfolding closed_def using assms by blast
lemma closedE: assumes"x ∈ cl Y" assumes"Y ∈ closed" shows"x ∈ Y" using assms closed_def by auto
locale closure_powerset_distributive =
closure_powerset
+ closure_complete_distrib_lattice_distributive_class begin
lemmas distributive = pointwise_distributive_iff[THEN iffD1, rule_format, OF cl_Sup]
(* don't use \<open>sublocale\<close> as it yields name clashes *) lemma algebraic_axiom: ―‹🍋‹‹Theorem~7.14› in "DaveyPriestley:2002"›› shows"cl x ⊆∪ (cl ` ({y. y ⊆ x} ∩ local.compact_points))" unfolding compact_points_def complete_lattice_class.compact_points_def[symmetric] by (metis Int_iff algebraic cl_Sup_not_empty complete_lattice_class.compact_pointsI emptyE
finite.intros(1) mem_Collect_eq order_bot_class.bot_least order.refl)
lemma cl_insert: shows"cl (insert x X) = cl {x} ∪ cl X" by (metis cl_sup insert_is_Un)
lemma cl_UNION: shows"cl (∪i∈I. f i) = (∪i∈I. cl (f i)) ∪ cl {}" by (auto simp add: cl_Sup SUP_upper)
lemma closed_UNION: assumes"∧i. i ∈ I ==> f i ∈ closed" shows"(∪i∈I. f i) ∪ cl {} ∈ closed" using assms closed_def by (auto simp: cl_Sup cl_sup)
lemma sort_of_inverse: ― ‹🍋‹‹Proposition~2.5› in "PfaltzSlapal:2013"›› assumes"y ∈ cl X - cl {}" shows"∃x∈X. y ∈ cl {x}" using assms by (subst (asm) distributive) blast
lemma cl_diff_le: shows"cl x - cl y ⊆ cl (x - y)" by (metis Diff_subset_conv Un_Diff_cancel Un_upper2 cl_sup)
lemma sup_irreducible_on_singleton: shows"sup_irreducible_on closed (cl {a})" by (rule sup_irreducible_onI)
(metis Un_iff sup_bot.right_neutral expansive insert_subset least antisym local.sup.commute sup_ge2)
end
subsection‹ Matroids and antimatroids\label{sec:closures-matroids} ›
text‹
🪙‹exchange› axiom characterises 🪙‹matroids› (see, for instance,
S\ref{sec:galois-concrete}), while the 🪙‹anti-exchange› axiom characterises
{emph ‹antimatroids›} (see e.g. \S\ref{sec:closures-downwards}).
definition anti_exchange :: "('a set ==> 'a set) ==> bool"where "anti_exchange cl ⟷ (∀X x y. x ≠ y ∧ y ∈ cl (insert x X) - cl X ⟶ x ∉ cl (insert y X) - cl X)"
definition exchange :: "('a set ==> 'a set) ==> bool"where "exchange cl ⟷ (∀X x y. y ∈ cl (insert x X) - cl X ⟶ x ∈ cl (insert y X) - cl X)"
lemma anti_exchangeD: assumes"y ∈ cl (insert x X) - cl X" assumes"x ≠ y" assumes"anti_exchange cl" shows"x ∉ cl (insert y X) - cl X" using assms unfolding anti_exchange_def by blast
lemma exchange_Image: ―‹ Some matroids arise from equivalence relations. Note ‹sym r ∧ trans r ⟶ Refl r›› shows"exchange (Image r) ⟷ sym r ∧ trans r" by (auto 60 simp: exchange_def sym_def intro!: transI elim: transE)
locale closure_powerset_distributive_exchange =
closure_powerset_distributive
+ assumes exchange: "exchange cl" begin
lemma exchange_closed_inter: assumes"Q ∈ closed" shows"cl P ∩ Q = cl (P ∩ Q)" (is"?lhs = ?rhs") and"Q ∩ cl P = cl (P ∩ Q)" (is ?thesis1) proof - show"?lhs = ?rhs" proof(rule antisym) have"((∪x∈P. cl {x}) ∪ cl {}) ∩ Q ⊆ (∪x∈P ∩ cl Q. cl {x}) ∪ cl {}" by clarsimp (metis IntI UnCI cl_insert exchange_exchange mk_disjoint_insert) thenshow"?lhs ⊆ ?rhs" by (simp flip: distributive closed_conv[OF assms]) from assms show"?rhs ⊆ ?lhs" using cl_inf_le closed_conv by blast qed thenshow ?thesis1 by blast qed
lemma exchange_both_closed_inter: assumes"P ∈ closed" assumes"Q ∈ closed" shows"cl (P ∩ Q) = P ∩ Q" using assms closed_conv closed_inf by force
end
lemma anti_exchange_Image: ―‹ when ‹r› is asymmetric on distinct points › shows"anti_exchange (Image r) ⟷ (∀x y. x ≠ y ∧ (x, y) ∈ r ⟶ (y, x) ∉ r)" by (auto simp: anti_exchange_def)
lemma closure_complete_lattice_comp: assumes"closure_complete_lattice Infa Supa infa lesseqa lessa supa bota topa cl1" assumes"closure_complete_lattice Infa Supa infa lesseqa lessa supa bota topa cl2" assumes"∧X. cl1 (cl2 X) = cl2 (cl1 X)" shows"closure_complete_lattice Infa Supa infa lesseqa lessa supa bota topa (λX. cl1 (cl2 X))" using assms(1)[unfolded closure_complete_lattice_def]
closure_comp[OF closure_complete_lattice.axioms(2)[OF assms(1)]
closure_complete_lattice.axioms(2)[OF assms(2)]]
assms(3) by (blast intro: closure_complete_lattice.intro)
interpretation id_cl: closure_powerset_distributive id by standard auto
subsubsection‹ Reflexive, symmetric and transitive closures ›
text‹
reflexive closure const‹reflcl› is very well behaved. Note the new bottom is @{const ‹Id›}.
reflexive transitive closure @{const ‹rtrancl›} and transitive closure @{const ‹trancl›} are clearly not distributive.
const‹rtrancl› is neither matroidal nor antimatroidal.
›
interpretation reflcl_cl: closure_powerset_distributive_exchange reflcl by standard (auto simp: exchange_def)
interpretation symcl_cl: closure_powerset_distributive_exchange "λX. X ∪ X-1" by standard (auto simp: exchange_def)
interpretation trancl_cl: closure_powerset trancl by standard (metis r_into_trancl' subsetI trancl_id trancl_mono trans_trancl)
interpretation rtrancl_cl: closure_powerset rtrancl by standard (use rtrancl_subset_rtrancl in blast)
lemma rtrancl_closed_Id: shows"Id ∈ rtrancl_cl.closed" using rtrancl_cl.idempotent rtrancl_empty by fastforce
lemma rtrancl_closed_reflcl_closed: shows"rtrancl_cl.closed ⊆ reflcl_cl.closed" using rtrancl_cl.closed_conv by fast
subsubsection‹ Relation image ›
lemma idempotent_Image: assumes"r ⊆ Y × Y" assumes"refl_on Y r" assumes"trans r" assumes"X ⊆ Y" shows"r `` r `` X = r `` X" using assms by (auto elim: transE intro: refl_onD refl_onD)
lemmas distributive_Image = Image_eq_UN
lemma closure_powerset_distributive_ImageI: assumes"cl = Image r" assumes"refl r" assumes"trans r" shows"closure_powerset_distributive cl" proof - have"closure_axioms (⊆) cl" unfolding order.closure_axioms_alt_def proof (intro conjI) show"∀x. x ⊆ cl x" unfolding‹cl = Image r› using‹refl r› by (metis subset_refl Image_Id refl_alt_def[of r] Image_mono[of Id r]) next show"mono cl" unfolding‹cl = Image r› using mono_Image . next show"∀x. cl (cl x) = cl x" unfolding‹cl = Image r› using‹refl r›‹trans r› by (metis top_greatest top_greatest[of r] UNIV_Times_UNIV idempotent_Image[of r UNIV]) qed with‹cl = Image r›show ?thesis by - (intro_locales; auto simp: closure_complete_lattice_distributive_axioms_def) qed
lemma closure_powerset_distributive_exchange_ImageI: assumes"cl = Image r" assumes"equiv UNIV r" ―‹ symmetric, transitive and universal domain › shows"closure_powerset_distributive_exchange cl" using closure_powerset_distributive_ImageI[OF assms(1)] exchange_Image[of r] assms unfolding closure_powerset_distributive_exchange_def closure_powerset_distributive_exchange_axioms_def by (metis equivE)
interpretation Image_rtrancl: closure_powerset_distributive "Image (r*)" by (rule closure_powerset_distributive_ImageI) auto
define Kleene closure in the traditional way with respect to some
that our various lattices satisfy. As trace models are not
to validate ‹x ∙⊥ = ⊥› 🍋‹‹Axiom~13› in "Kozen:1994"›, we
reuse existing developments of Kleene Algebra (and Concurrent
Algebra 🍋‹"HoareMoellerStruthWehrman:2011"›). In general
is not distributive.
›
locale weak_kleene = fixes unit :: "'a::complete_lattice" (‹ε›) fixes comp :: "'a ==> 'a ==> 'a" (infixl‹∙›60) assumes comp_assoc: "(x ∙ y) ∙ z = x ∙ (y ∙ z)" assumes weak_comp_unitL: "ε ≤ x ==> ε ∙ x = x" assumes comp_unitR: "x ∙ ε = x" assumes comp_supL: "(x ⊔ y) ∙ z = (x ∙ z) ⊔ (y ∙ z)" assumes comp_supR: "x ∙ (y ⊔ z) = (x ∙ y) ⊔ (x ∙ z)" assumes mcont_compL: "mcont Sup (≤) Sup (≤) (λx. x ∙ y)" assumes mcont_compR: "mcont Sup (≤) Sup (≤) (λy. x ∙ y)" assumes comp_botL: "⊥∙ x = ⊥" begin
lemma mcont2mcont_comp: assumes"mcont Supa orda Sup (≤) f" assumes"mcont Supa orda Sup (≤) g" shows"mcont Supa orda Sup (≤) (λx. f x ∙ g x)" by (simp add: ccpo.mcont2mcont'[OF complete_lattice_ccpo mcont_compL _ assms(1)]
ccpo.mcont2mcont'[OF complete_lattice_ccpo mcont_compR _ assms(2)])
lemma mono2mono_comp: assumes"monotone orda (≤) f" assumes"monotone orda (≤) g" shows"monotone orda (≤) (λx. f x ∙ g x)" using mcont_mono[OF mcont_compL] mcont_mono[OF mcont_compR] assms by (clarsimp simp: monotone_def) (meson order.trans)
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.