(* Title: Dual_Ordered_Lattice.thy Authors: Makarius; Peter Gammie; Brian Huffman; Florian Haftmann, TU Muenchen
*)
section \<open>Type of dual ordered lattices\<close>
theory Dual_Ordered_Lattice imports Main begin
text\<open>
The \<^emph>\<open>dual\<close> of an ordered structure is an isomorphic copy of the
underlying type, with the \<open>\<le>\<close> relation defined as the inverse
of the original one.
The class of lattices is closed under formation of dual structures.
This means that for any theorem of lattice theory, the dualized
statement holds as well; this important fact simplifies many proofs
of lattice theory. \<close>
lemma bij_dual: "bij dual" using inj_dual surj_dual by (rule bijI)
lemma bij_undual: "bij undual" using inj_undual surj_undual by (rule bijI)
instance dual :: (finite) finite proof from finite have"finite (range dual :: 'a dual set)" by (rule finite_imageI) thenshow"finite (UNIV :: 'a dual set)" by (simp add: surj_dual) qed
instantiation dual :: (equal) equal begin
lift_definition equal_dual :: "'a dual \ 'a dual \ bool" is HOL.equal .
instance by (standard; transfer) (simp add: equal)
context fixes f :: "'a::complete_lattice \ 'a" and g :: "'a dual \ 'a dual" assumes"mono f" defines"g \ dual \ f \ undual" begin
private lemma mono_dual: "mono g" proof fix x y :: "'a dual" assume"x \ y" thenhave"undual y \ undual x" by (simp add: dual_less_eq_iff) with\<open>mono f\<close> have "f (undual y) \<le> f (undual x)" by (rule monoD) thenhave"(dual \ f \ undual) x \ (dual \ f \ undual) y" by simp thenshow"g x \ g y" by (simp add: g_def) qed
lemma lfp_dual_gfp: "lfp f = undual (gfp g)" (is"?lhs = ?rhs") proof (rule antisym) have"dual (undual (g (gfp g))) \ dual (f (undual (gfp g)))" by (simp add: g_def) with mono_dual have"f (undual (gfp g)) \ undual (gfp g)" by (simp add: gfp_unfold [where f = g, symmetric] dual_less_eq_iff) thenshow"?lhs \ ?rhs" by (rule lfp_lowerbound) from\<open>mono f\<close> have "dual (lfp f) \<le> dual (undual (gfp g))" by (simp add: lfp_fixpoint gfp_upperbound g_def) thenshow"?rhs \ ?lhs" by (simp only: less_eq_dual_iff) qed
lemma gfp_dual_lfp: "gfp f = undual (lfp g)" proof - have"mono (\x. undual (undual x))" by (rule monoI) (simp add: dual_less_eq_iff) moreoverhave"mono (\a. dual (dual (f a)))" using\<open>mono f\<close> by (auto intro: monoI dest: monoD) moreoverhave"gfp f = gfp (\x. undual (undual (dual (dual (f x)))))" by simp ultimatelyhave"undual (undual (gfp (\x. dual
(dual (f (undual (undual x))))))) =
gfp (\<lambda>x. undual (undual (dual (dual (f x)))))" by (subst gfp_rolling [where g = "\x. undual (undual x)"]) simp_all thenhave"gfp f =
undual
(undual
(gfp (\<lambda>x. dual (dual (f (undual (undual x)))))))" by simp alsohave"\ = undual (undual (gfp (dual \ g \ undual)))" by (simp add: comp_def g_def) alsohave"\ = undual (lfp g)" using mono_dual by (simp only: Dual_Ordered_Lattice.lfp_dual_gfp) finallyshow ?thesis . 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 ist noch experimentell.