we collect some classical results for Galois connections. These are drawn from 🍋‹ "Backhouse:2000" and "DaveyPriestley:2002" and
MeltonSchmidtStrecker:1985" and "MuellerOlm:1997"› amongst others.
canonical reference is likely 🍋‹"GierzEtAl:2003"›.
focus is on constructing closures (\S\ref{sec:closures}) conveniently; we are less
in the fixed-point story. Many of these results hold for preorders; we simply
with partial orders (via the 🍋‹ordering› locale). 🪙‹conditionally complete lattices› are often sufficient, but for convenience we
assume (unconditional) completeness.
›
(* This is less general than we might hope as \<open>ordering\<close> already quantifies over the entire type. Thereforeitcannothandlelatticeswherewehoistthebottomupabit,likethe\<open>prog\<close>lattice.
Generalising is probably be too much hassle. *) locale galois =
orda: ordering less_eqa lessa
+ ordb: ordering less_eqb lessb for less_eqa (infix‹≤a›50) and lessa (infix‹<\<^sub>a›50) and less_eqb (infix‹≤b›50) and lessb (infix‹<\<^sub>b›50)
+ fixes lower :: "'a ==> 'b" fixes upper :: "'b ==> 'a" assumes galois: "lower x ≤b y ⟷ x ≤a upper y" begin
lemma monotone_lower: shows"monotone (≤a) (≤b) lower" by (rule monotoneI) (use galois orda.trans ordb.refl in blast)
lemma monotone_upper: shows"monotone (≤b) (≤a) upper" by (rule monotoneI) (use galois ordb.trans orda.refl in blast)
lemma upper_lower_expansive: shows"x ≤a upper (lower x)" using galois ordb.refl by blast
lemma lower_upper_contractive: shows"lower (upper x) ≤b x" using galois orda.refl by blast
lemma comp_galois: ―‹🍋‹‹Lemma~19› in "Backhouse:2000"›. Observe that the roles of upper and lower have swapped. › fixes less_eqc :: "'c ==> 'c ==> bool" (infix‹≤c›50) fixes lessc :: "'c ==> 'c ==> bool" (infix‹<\<^sub>c›50) fixes h :: "'a ==> 'c" fixes k :: "'b ==> 'c" assumes"partial_preordering (≤c)" assumes"monotone (≤a) (≤c) h" assumes"monotone (≤b) (≤c) k" shows"(∀x. h (upper x) ≤c k x) ⟷ (∀x. h x ≤c k (lower x))" using assms(1) monotoneD[OF assms(2)] monotoneD[OF assms(3)] by (meson lower_upper_contractive partial_preordering.trans upper_lower_expansive)
lemma lower_upper_le_iff: ―‹🍋‹‹Lemma~23› in "Backhouse:2000"›› assumes"∀x y. lower' x ≤b y ⟷ x ≤a upper' y" shows"(∀x. lower' x ≤b lower x) ⟷ (∀y. upper y ≤a upper' y)" using assms by (meson lower_upper_contractive orda.trans ordb.trans upper_lower_expansive)
lemma lower_upper_unique: ―‹🍋‹‹Lemma~24› in "Backhouse:2000"›› assumes"∀x y. lower' x ≤b y ⟷ x ≤a upper' y" shows"lower' = lower ⟷ upper' = upper" using assms galois lower_upper_contractive orda.eq_iff ordb.eq_iff upper_lower_expansive by blast
lemma lower_downset_upper: ―‹🍋‹‹Lemma~7.32› in "DaveyPriestley:2002"›: inverse image of lower on a downset is the downset of upper › shows"lower -` {a. a ≤b y} = {a. a ≤a upper y}" by (simp add: galois)
lemma lower_downset: ―‹🍋‹‹Lemma~7.32› in "DaveyPriestley:2002"›; equivalent to the Galois axiom › shows"∃!x. lower -` {a. a ≤b y} = {a. a ≤a x}" by (metis lower_downset_upper mem_Collect_eq orda.antisym orda.refl)
end
setup‹Sign.mandatory_path "galois"›
lemma axioms_alt: fixes less_eqa (infix‹≤a›50) fixes less_eqb (infix‹≤b›50) fixes lower :: "'a ==> 'b" fixes upper :: "'b ==> 'a" assumes oa: "ordering less_eqa lessa" assumes ob: "ordering less_eqb lessb" assumes ul: "∀x. x ≤a upper (lower x)" assumes lu: "∀x. lower (upper x) ≤b x" assumes ml: "monotone (≤a) (≤b) lower" assumes mu: "monotone (≤b) (≤a) upper" shows"lower x ≤b y ⟷ x ≤a upper y" by (metis lu ml monotoneD mu oa ob ordering.axioms(1) partial_preordering.trans ul)
locale complete_lattice =
cla: complete_lattice "Infa""Supa""(⊓a)""(≤a)""(<a)""(⊔a)""⊥a""⊤a"
+ clb: complete_lattice "Infb""Supb""(⊓b)""(≤b)""(<b)""(⊔b)""⊥b""⊤b"
+ galois "(≤a)""(<a)""(≤b)""(<b)" lower upper for less_eqa :: "'a ==> 'a ==> bool" (infix‹≤a›50) and lessa (infix‹<\<^sub>a›50) and infa (infixl‹⊓a›70) and supa (infixl‹⊔a›65) and bota (‹⊥a›) and topa (‹⊤a›) and Infa Supa and less_eqb :: "'b ==> 'b ==> bool" (infix‹≤b›50) and lessb (infix‹<\<^sub>b›50) and infb (infixl‹⊓b›70) and supb (infixl‹⊔b›65) and botb (‹⊥b›) and topb (‹⊤b›) and Infb Supb and lower :: "'a ==> 'b" and upper :: "'b ==> 'a" begin
lemma lower_inf_le: shows"lower (x ⊓a y) ≤b lower x ⊓b lower y" using lower_Inf_le[where X="{x, y}"] by simp
lemma mcont_lower: ―‹🍋‹"Backhouse:2000"›: fixed point theory based on Galois connections is less general than using countable chains › shows"mcont Supa (≤a) Supb (≤b) lower" by (meson contI lower_Sup mcontI monotone_lower)
lemma mcont2mcont_lower[cont_intro]: assumes"mcont luba orda Supa (≤a) P" shows"mcont luba orda Supb (≤b) (λx. lower (P x))" using assms mcont_lower
partial_function_definitions.mcont2mcont[OF clb.complete_lattice_partial_function_definitions] by blast
lemma upper_inf: shows"upper (X ⊓b Y) = upper X ⊓a upper Y" using upper_Inf[where X="{X, Y}"] by simp
text‹
a complete lattice ‹lower› is determined by ‹upper› and vice-versa.
›
lemma lower_Inf_upper: shows"lower X = Infb {Y. X ≤a upper Y}" by (auto simp flip: galois intro: clb.Inf_eqI[symmetric])
lemma upper_Sup_lower: shows"upper X = Supa {Y. lower Y ≤b X}" by (auto simp: galois intro: cla.Sup_eqI[symmetric])
lemma upper_downwards_closure_lower: ―‹🍋‹‹Lemma~2.1› in "MeltonSchmidtStrecker:1985"›› shows"upper x = Supa (lower -` {y. y ≤b x})" by (simp add: upper_Sup_lower)
sublocale closure_complete_lattice "(≤a)""(<a)""(⊓a)""(⊔a)""⊥a""⊤a""Infa""Supa" cl by (rule closure_complete_lattice.intro[OF cla.complete_lattice_axioms closure_axioms])
end
locale complete_lattice_distributive =
galois.complete_lattice
+ assumes upper_Sup_le: "upper (Supb X) ≤a Supa (upper ` X)" ―‹ Stronger than Scott continuity, which only asks for this for chain or directed ‹X›. › begin
lemma upper_Sup: shows"upper (Supb X) = Supa (upper ` X)" by (simp add: Sup_upper_le cla.dual_order.antisym upper_Sup_le)
lemma upper_bot: shows"upper ⊥b = ⊥a" using upper_Sup[where X="{}"] by simp
lemma upper_sup: shows"upper (x ⊔b y) = upper x ⊔a upper y" by (rule upper_Sup[where X="{x, y}", simplified])
interpretation conj_imp: galois.complete_lattice_class "(⊓) x""(\<longrightarrow>B) x"for x :: "_::boolean_algebra" ―‹ Classic example › by standard (simp add: boolean_implication.conv_sup inf_commute shunt1)
text‹
are very well-behaved Galois connections arising from the image
and inverse image) of sets under a function; stuttering is one
(\S\ref{sec:safety_logic-stuttering}).
›
locale image_vimage = fixes f :: "'a ==> 'b" begin
definition lower :: "'a set ==> 'b set"where "lower X = f ` X"
definition upper :: "'b set ==> 'a set"where "upper X = f -` X"
lemma upper_empty[iff]: shows"upper {} = {}" unfolding upper_def by simp
sublocale galois.powerset_distributive lower upper unfolding lower_def upper_def by standard (simp_all add: image_subset_iff_subset_vimage vimage_Union)
abbreviation equivalent :: "'a relp"where "equivalent x y ≡ f x = f y"
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.