| author | wenzelm | 
| Tue, 27 Mar 2018 13:59:01 +0200 | |
| changeset 67953 | f646d1c826a1 | 
| parent 67399 | eab6ce8368fa | 
| child 68488 | dfbd80c3d180 | 
| permissions | -rw-r--r-- | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1 | (* Title: HOL/Algebra/Complete_Lattice.thy | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 2 | Author: Clemens Ballarin, started 7 November 2003 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 3 | Copyright: Clemens Ballarin | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 4 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 5 | Most congruence rules by Stephan Hohe. | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 6 | With additional contributions from Alasdair Armstrong and Simon Foster. | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 7 | *) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 8 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 9 | theory Complete_Lattice | 
| 66579 | 10 | imports Lattice | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 11 | begin | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 12 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 13 | section \<open>Complete Lattices\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 14 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 15 | locale weak_complete_lattice = weak_partial_order + | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 16 | assumes sup_exists: | 
| 67091 | 17 | "[| A \<subseteq> carrier L |] ==> \<exists>s. least L s (Upper L A)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 18 | and inf_exists: | 
| 67091 | 19 | "[| A \<subseteq> carrier L |] ==> \<exists>i. greatest L i (Lower L A)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 20 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 21 | sublocale weak_complete_lattice \<subseteq> weak_lattice | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 22 | proof | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 23 | fix x y | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 24 | assume a: "x \<in> carrier L" "y \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 25 |   thus "\<exists>s. is_lub L s {x, y}"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 26 |     by (rule_tac sup_exists[of "{x, y}"], auto)
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 27 |   from a show "\<exists>s. is_glb L s {x, y}"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 28 |     by (rule_tac inf_exists[of "{x, y}"], auto)
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 29 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 30 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 31 | text \<open>Introduction rule: the usual definition of complete lattice\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 32 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 33 | lemma (in weak_partial_order) weak_complete_latticeI: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 34 | assumes sup_exists: | 
| 67091 | 35 | "!!A. [| A \<subseteq> carrier L |] ==> \<exists>s. least L s (Upper L A)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 36 | and inf_exists: | 
| 67091 | 37 | "!!A. [| A \<subseteq> carrier L |] ==> \<exists>i. greatest L i (Lower L A)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 38 | shows "weak_complete_lattice L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 39 | by standard (auto intro: sup_exists inf_exists) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 40 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 41 | lemma (in weak_complete_lattice) dual_weak_complete_lattice: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 42 | "weak_complete_lattice (inv_gorder L)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 43 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 44 | interpret dual: weak_lattice "inv_gorder L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 45 | by (metis dual_weak_lattice) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 46 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 47 | show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 48 | apply (unfold_locales) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 49 | apply (simp_all add:inf_exists sup_exists) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 50 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 51 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 52 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 53 | lemma (in weak_complete_lattice) supI: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 54 | "[| !!l. least L l (Upper L A) ==> P l; A \<subseteq> carrier L |] | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 55 | ==> P (\<Squnion>A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 56 | proof (unfold sup_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 57 | assume L: "A \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 58 | and P: "!!l. least L l (Upper L A) ==> P l" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 59 | with sup_exists obtain s where "least L s (Upper L A)" by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 60 | with L show "P (SOME l. least L l (Upper L A))" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 61 | by (fast intro: someI2 weak_least_unique P) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 62 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 63 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 64 | lemma (in weak_complete_lattice) sup_closed [simp]: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 65 | "A \<subseteq> carrier L ==> \<Squnion>A \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 66 | by (rule supI) simp_all | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 67 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 68 | lemma (in weak_complete_lattice) sup_cong: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 69 |   assumes "A \<subseteq> carrier L" "B \<subseteq> carrier L" "A {.=} B"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 70 | shows "\<Squnion> A .= \<Squnion> B" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 71 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 72 | have "\<And> x. is_lub L x A \<longleftrightarrow> is_lub L x B" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 73 | by (rule least_Upper_cong_r, simp_all add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 74 | moreover have "\<Squnion> B \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 75 | by (simp add: assms(2)) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 76 | ultimately show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 77 | by (simp add: sup_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 78 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 79 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 80 | sublocale weak_complete_lattice \<subseteq> weak_bounded_lattice | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 81 | apply (unfold_locales) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 82 | apply (metis Upper_empty empty_subsetI sup_exists) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 83 | apply (metis Lower_empty empty_subsetI inf_exists) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 84 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 85 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 86 | lemma (in weak_complete_lattice) infI: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 87 | "[| !!i. greatest L i (Lower L A) ==> P i; A \<subseteq> carrier L |] | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 88 | ==> P (\<Sqinter>A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 89 | proof (unfold inf_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 90 | assume L: "A \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 91 | and P: "!!l. greatest L l (Lower L A) ==> P l" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 92 | with inf_exists obtain s where "greatest L s (Lower L A)" by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 93 | with L show "P (SOME l. greatest L l (Lower L A))" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 94 | by (fast intro: someI2 weak_greatest_unique P) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 95 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 96 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 97 | lemma (in weak_complete_lattice) inf_closed [simp]: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 98 | "A \<subseteq> carrier L ==> \<Sqinter>A \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 99 | by (rule infI) simp_all | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 100 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 101 | lemma (in weak_complete_lattice) inf_cong: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 102 |   assumes "A \<subseteq> carrier L" "B \<subseteq> carrier L" "A {.=} B"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 103 | shows "\<Sqinter> A .= \<Sqinter> B" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 104 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 105 | have "\<And> x. is_glb L x A \<longleftrightarrow> is_glb L x B" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 106 | by (rule greatest_Lower_cong_r, simp_all add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 107 | moreover have "\<Sqinter> B \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 108 | by (simp add: assms(2)) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 109 | ultimately show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 110 | by (simp add: inf_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 111 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 112 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 113 | theorem (in weak_partial_order) weak_complete_lattice_criterion1: | 
| 67091 | 114 | assumes top_exists: "\<exists>g. greatest L g (carrier L)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 115 | and inf_exists: | 
| 67091 | 116 |       "\<And>A. [| A \<subseteq> carrier L; A \<noteq> {} |] ==> \<exists>i. greatest L i (Lower L A)"
 | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 117 | shows "weak_complete_lattice L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 118 | proof (rule weak_complete_latticeI) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 119 | from top_exists obtain top where top: "greatest L top (carrier L)" .. | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 120 | fix A | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 121 | assume L: "A \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 122 | let ?B = "Upper L A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 123 | from L top have "top \<in> ?B" by (fast intro!: Upper_memI intro: greatest_le) | 
| 67091 | 124 |   then have B_non_empty: "?B \<noteq> {}" by fast
 | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 125 | have B_L: "?B \<subseteq> carrier L" by simp | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 126 | from inf_exists [OF B_L B_non_empty] | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 127 | obtain b where b_inf_B: "greatest L b (Lower L ?B)" .. | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 128 | have "least L b (Upper L A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 129 | apply (rule least_UpperI) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 130 | apply (rule greatest_le [where A = "Lower L ?B"]) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 131 | apply (rule b_inf_B) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 132 | apply (rule Lower_memI) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 133 | apply (erule Upper_memD [THEN conjunct1]) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 134 | apply assumption | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 135 | apply (rule L) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 136 | apply (fast intro: L [THEN subsetD]) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 137 | apply (erule greatest_Lower_below [OF b_inf_B]) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 138 | apply simp | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 139 | apply (rule L) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 140 | apply (rule greatest_closed [OF b_inf_B]) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 141 | done | 
| 67091 | 142 | then show "\<exists>s. least L s (Upper L A)" .. | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 143 | next | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 144 | fix A | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 145 | assume L: "A \<subseteq> carrier L" | 
| 67091 | 146 | show "\<exists>i. greatest L i (Lower L A)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 147 |   proof (cases "A = {}")
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 148 | case True then show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 149 | by (simp add: top_exists) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 150 | next | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 151 | case False with L show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 152 | by (rule inf_exists) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 153 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 154 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 155 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 156 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 157 | text \<open>Supremum\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 158 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 159 | declare (in partial_order) weak_sup_of_singleton [simp del] | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 160 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 161 | lemma (in partial_order) sup_of_singleton [simp]: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 162 |   "x \<in> carrier L ==> \<Squnion>{x} = x"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 163 | using weak_sup_of_singleton unfolding eq_is_equal . | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 164 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 165 | lemma (in upper_semilattice) join_assoc_lemma: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 166 | assumes L: "x \<in> carrier L" "y \<in> carrier L" "z \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 167 |   shows "x \<squnion> (y \<squnion> z) = \<Squnion>{x, y, z}"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 168 | using weak_join_assoc_lemma L unfolding eq_is_equal . | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 169 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 170 | lemma (in upper_semilattice) join_assoc: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 171 | assumes L: "x \<in> carrier L" "y \<in> carrier L" "z \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 172 | shows "(x \<squnion> y) \<squnion> z = x \<squnion> (y \<squnion> z)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 173 | using weak_join_assoc L unfolding eq_is_equal . | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 174 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 175 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 176 | text \<open>Infimum\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 177 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 178 | declare (in partial_order) weak_inf_of_singleton [simp del] | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 179 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 180 | lemma (in partial_order) inf_of_singleton [simp]: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 181 |   "x \<in> carrier L ==> \<Sqinter>{x} = x"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 182 | using weak_inf_of_singleton unfolding eq_is_equal . | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 183 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 184 | text \<open>Condition on \<open>A\<close>: infimum exists.\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 185 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 186 | lemma (in lower_semilattice) meet_assoc_lemma: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 187 | assumes L: "x \<in> carrier L" "y \<in> carrier L" "z \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 188 |   shows "x \<sqinter> (y \<sqinter> z) = \<Sqinter>{x, y, z}"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 189 | using weak_meet_assoc_lemma L unfolding eq_is_equal . | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 190 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 191 | lemma (in lower_semilattice) meet_assoc: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 192 | assumes L: "x \<in> carrier L" "y \<in> carrier L" "z \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 193 | shows "(x \<sqinter> y) \<sqinter> z = x \<sqinter> (y \<sqinter> z)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 194 | using weak_meet_assoc L unfolding eq_is_equal . | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 195 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 196 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 197 | subsection \<open>Infimum Laws\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 198 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 199 | context weak_complete_lattice | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 200 | begin | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 201 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 202 | lemma inf_glb: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 203 | assumes "A \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 204 | shows "greatest L (\<Sqinter>A) (Lower L A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 205 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 206 | obtain i where "greatest L i (Lower L A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 207 | by (metis assms inf_exists) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 208 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 209 | thus ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 210 | apply (simp add: inf_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 211 | apply (rule someI2[of _ "i"]) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 212 | apply (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 213 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 214 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 215 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 216 | lemma inf_lower: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 217 | assumes "A \<subseteq> carrier L" "x \<in> A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 218 | shows "\<Sqinter>A \<sqsubseteq> x" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 219 | by (metis assms greatest_Lower_below inf_glb) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 220 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 221 | lemma inf_greatest: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 222 | assumes "A \<subseteq> carrier L" "z \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 223 | "(\<And>x. x \<in> A \<Longrightarrow> z \<sqsubseteq> x)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 224 | shows "z \<sqsubseteq> \<Sqinter>A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 225 | by (metis Lower_memI assms greatest_le inf_glb) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 226 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 227 | lemma weak_inf_empty [simp]: "\<Sqinter>{} .= \<top>"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 228 | by (metis Lower_empty empty_subsetI inf_glb top_greatest weak_greatest_unique) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 229 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 230 | lemma weak_inf_carrier [simp]: "\<Sqinter>carrier L .= \<bottom>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 231 | by (metis bottom_weak_eq inf_closed inf_lower subset_refl) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 232 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 233 | lemma weak_inf_insert [simp]: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 234 | "\<lbrakk> a \<in> carrier L; A \<subseteq> carrier L \<rbrakk> \<Longrightarrow> \<Sqinter>insert a A .= a \<sqinter> \<Sqinter>A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 235 | apply (rule weak_le_antisym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 236 | apply (force intro: meet_le inf_greatest inf_lower inf_closed) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 237 | apply (rule inf_greatest) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 238 | apply (force) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 239 | apply (force intro: inf_closed) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 240 | apply (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 241 | apply (metis inf_closed meet_left) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 242 | apply (force intro: le_trans inf_closed meet_right meet_left inf_lower) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 243 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 244 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 245 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 246 | subsection \<open>Supremum Laws\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 247 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 248 | lemma sup_lub: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 249 | assumes "A \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 250 | shows "least L (\<Squnion>A) (Upper L A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 251 | by (metis Upper_is_closed assms least_closed least_cong supI sup_closed sup_exists weak_least_unique) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 252 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 253 | lemma sup_upper: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 254 | assumes "A \<subseteq> carrier L" "x \<in> A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 255 | shows "x \<sqsubseteq> \<Squnion>A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 256 | by (metis assms least_Upper_above supI) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 257 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 258 | lemma sup_least: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 259 | assumes "A \<subseteq> carrier L" "z \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 260 | "(\<And>x. x \<in> A \<Longrightarrow> x \<sqsubseteq> z)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 261 | shows "\<Squnion>A \<sqsubseteq> z" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 262 | by (metis Upper_memI assms least_le sup_lub) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 263 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 264 | lemma weak_sup_empty [simp]: "\<Squnion>{} .= \<bottom>"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 265 | by (metis Upper_empty bottom_least empty_subsetI sup_lub weak_least_unique) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 266 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 267 | lemma weak_sup_carrier [simp]: "\<Squnion>carrier L .= \<top>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 268 | by (metis Lower_closed Lower_empty sup_closed sup_upper top_closed top_higher weak_le_antisym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 269 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 270 | lemma weak_sup_insert [simp]: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 271 | "\<lbrakk> a \<in> carrier L; A \<subseteq> carrier L \<rbrakk> \<Longrightarrow> \<Squnion>insert a A .= a \<squnion> \<Squnion>A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 272 | apply (rule weak_le_antisym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 273 | apply (rule sup_least) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 274 | apply (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 275 | apply (metis join_left sup_closed) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 276 | apply (rule le_trans) defer | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 277 | apply (rule join_right) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 278 | apply (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 279 | apply (rule join_le) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 280 | apply (auto intro: sup_upper sup_least sup_closed) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 281 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 282 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 283 | end | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 284 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 285 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 286 | subsection \<open>Fixed points of a lattice\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 287 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 288 | definition "fps L f = {x \<in> carrier L. f x .=\<^bsub>L\<^esub> x}"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 289 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 290 | abbreviation "fpl L f \<equiv> L\<lparr>carrier := fps L f\<rparr>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 291 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 292 | lemma (in weak_partial_order) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 293 | use_fps: "x \<in> fps L f \<Longrightarrow> f x .= x" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 294 | by (simp add: fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 295 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 296 | lemma fps_carrier [simp]: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 297 | "fps L f \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 298 | by (auto simp add: fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 299 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 300 | lemma (in weak_complete_lattice) fps_sup_image: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 301 | assumes "f \<in> carrier L \<rightarrow> carrier L" "A \<subseteq> fps L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 302 | shows "\<Squnion> (f ` A) .= \<Squnion> A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 303 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 304 | from assms(2) have AL: "A \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 305 | by (auto simp add: fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 306 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 307 | show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 308 | proof (rule sup_cong, simp_all add: AL) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 309 | from assms(1) AL show "f ` A \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 310 | by (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 311 |     from assms(2) show "f ` A {.=} A"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 312 | apply (auto simp add: fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 313 | apply (rule set_eqI2) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 314 | apply blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 315 | apply (rename_tac b) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 316 | apply (rule_tac x="f b" in bexI) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 317 | apply (metis (mono_tags, lifting) Ball_Collect assms(1) Pi_iff local.sym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 318 | apply (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 319 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 320 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 321 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 322 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 323 | lemma (in weak_complete_lattice) fps_idem: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 324 |   "\<lbrakk> f \<in> carrier L \<rightarrow> carrier L; Idem f \<rbrakk> \<Longrightarrow> fps L f {.=} f ` carrier L"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 325 | apply (rule set_eqI2) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 326 | apply (auto simp add: idempotent_def fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 327 | apply (metis Pi_iff local.sym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 328 | apply force | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 329 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 330 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 331 | context weak_complete_lattice | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 332 | begin | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 333 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 334 | lemma weak_sup_pre_fixed_point: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 335 | assumes "f \<in> carrier L \<rightarrow> carrier L" "isotone L L f" "A \<subseteq> fps L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 336 | shows "(\<Squnion>\<^bsub>L\<^esub> A) \<sqsubseteq>\<^bsub>L\<^esub> f (\<Squnion>\<^bsub>L\<^esub> A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 337 | proof (rule sup_least) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 338 | from assms(3) show AL: "A \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 339 | by (auto simp add: fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 340 | thus fA: "f (\<Squnion>A) \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 341 | by (simp add: assms funcset_carrier[of f L L]) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 342 | fix x | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 343 | assume xA: "x \<in> A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 344 | hence "x \<in> fps L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 345 | using assms subsetCE by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 346 | hence "f x .=\<^bsub>L\<^esub> x" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 347 | by (auto simp add: fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 348 | moreover have "f x \<sqsubseteq>\<^bsub>L\<^esub> f (\<Squnion>\<^bsub>L\<^esub>A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 349 | by (meson AL assms(2) subsetCE sup_closed sup_upper use_iso1 xA) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 350 | ultimately show "x \<sqsubseteq>\<^bsub>L\<^esub> f (\<Squnion>\<^bsub>L\<^esub>A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 351 | by (meson AL fA assms(1) funcset_carrier le_cong local.refl subsetCE xA) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 352 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 353 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 354 | lemma weak_sup_post_fixed_point: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 355 | assumes "f \<in> carrier L \<rightarrow> carrier L" "isotone L L f" "A \<subseteq> fps L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 356 | shows "f (\<Sqinter>\<^bsub>L\<^esub> A) \<sqsubseteq>\<^bsub>L\<^esub> (\<Sqinter>\<^bsub>L\<^esub> A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 357 | proof (rule inf_greatest) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 358 | from assms(3) show AL: "A \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 359 | by (auto simp add: fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 360 | thus fA: "f (\<Sqinter>A) \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 361 | by (simp add: assms funcset_carrier[of f L L]) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 362 | fix x | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 363 | assume xA: "x \<in> A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 364 | hence "x \<in> fps L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 365 | using assms subsetCE by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 366 | hence "f x .=\<^bsub>L\<^esub> x" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 367 | by (auto simp add: fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 368 | moreover have "f (\<Sqinter>\<^bsub>L\<^esub>A) \<sqsubseteq>\<^bsub>L\<^esub> f x" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 369 | by (meson AL assms(2) inf_closed inf_lower subsetCE use_iso1 xA) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 370 | ultimately show "f (\<Sqinter>\<^bsub>L\<^esub>A) \<sqsubseteq>\<^bsub>L\<^esub> x" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 371 | by (meson AL assms(1) fA funcset_carrier le_cong_r subsetCE xA) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 372 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 373 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 374 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 375 | subsubsection \<open>Least fixed points\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 376 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 377 | lemma LFP_closed [intro, simp]: | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 378 | "LFP f \<in> carrier L" | 
| 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 379 | by (metis (lifting) LEAST_FP_def inf_closed mem_Collect_eq subsetI) | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 380 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 381 | lemma LFP_lowerbound: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 382 | assumes "x \<in> carrier L" "f x \<sqsubseteq> x" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 383 | shows "LFP f \<sqsubseteq> x" | 
| 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 384 | by (auto intro:inf_lower assms simp add:LEAST_FP_def) | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 385 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 386 | lemma LFP_greatest: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 387 | assumes "x \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 388 | "(\<And>u. \<lbrakk> u \<in> carrier L; f u \<sqsubseteq> u \<rbrakk> \<Longrightarrow> x \<sqsubseteq> u)" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 389 | shows "x \<sqsubseteq> LFP f" | 
| 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 390 | by (auto simp add:LEAST_FP_def intro:inf_greatest assms) | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 391 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 392 | lemma LFP_lemma2: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 393 | assumes "Mono f" "f \<in> carrier L \<rightarrow> carrier L" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 394 | shows "f (LFP f) \<sqsubseteq> LFP f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 395 | using assms | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 396 | apply (auto simp add:Pi_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 397 | apply (rule LFP_greatest) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 398 | apply (metis LFP_closed) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 399 | apply (metis LFP_closed LFP_lowerbound le_trans use_iso1) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 400 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 401 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 402 | lemma LFP_lemma3: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 403 | assumes "Mono f" "f \<in> carrier L \<rightarrow> carrier L" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 404 | shows "LFP f \<sqsubseteq> f (LFP f)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 405 | using assms | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 406 | apply (auto simp add:Pi_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 407 | apply (metis LFP_closed LFP_lemma2 LFP_lowerbound assms(2) use_iso2) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 408 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 409 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 410 | lemma LFP_weak_unfold: | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 411 | "\<lbrakk> Mono f; f \<in> carrier L \<rightarrow> carrier L \<rbrakk> \<Longrightarrow> LFP f .= f (LFP f)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 412 | by (auto intro: LFP_lemma2 LFP_lemma3 funcset_mem) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 413 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 414 | lemma LFP_fixed_point [intro]: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 415 | assumes "Mono f" "f \<in> carrier L \<rightarrow> carrier L" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 416 | shows "LFP f \<in> fps L f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 417 | proof - | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 418 | have "f (LFP f) \<in> carrier L" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 419 | using assms(2) by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 420 | with assms show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 421 | by (simp add: LFP_weak_unfold fps_def local.sym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 422 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 423 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 424 | lemma LFP_least_fixed_point: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 425 | assumes "Mono f" "f \<in> carrier L \<rightarrow> carrier L" "x \<in> fps L f" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 426 | shows "LFP f \<sqsubseteq> x" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 427 | using assms by (force intro: LFP_lowerbound simp add: fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 428 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 429 | lemma LFP_idem: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 430 | assumes "f \<in> carrier L \<rightarrow> carrier L" "Mono f" "Idem f" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 431 | shows "LFP f .= (f \<bottom>)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 432 | proof (rule weak_le_antisym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 433 | from assms(1) show fb: "f \<bottom> \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 434 | by (rule funcset_mem, simp) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 435 | from assms show mf: "LFP f \<in> carrier L" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 436 | by blast | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 437 | show "LFP f \<sqsubseteq> f \<bottom>" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 438 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 439 | have "f (f \<bottom>) .= f \<bottom>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 440 | by (auto simp add: fps_def fb assms(3) idempotent) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 441 | moreover have "f (f \<bottom>) \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 442 | by (rule funcset_mem[of f "carrier L"], simp_all add: assms fb) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 443 | ultimately show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 444 | by (auto intro: LFP_lowerbound simp add: fb) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 445 | qed | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 446 | show "f \<bottom> \<sqsubseteq> LFP f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 447 | proof - | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 448 | have "f \<bottom> \<sqsubseteq> f (LFP f)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 449 | by (auto intro: use_iso1[of _ f] simp add: assms) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 450 | moreover have "... .= LFP f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 451 | using assms(1) assms(2) fps_def by force | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 452 | moreover from assms(1) have "f (LFP f) \<in> carrier L" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 453 | by (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 454 | ultimately show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 455 | using fb by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 456 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 457 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 458 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 459 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 460 | subsubsection \<open>Greatest fixed points\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 461 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 462 | lemma GFP_closed [intro, simp]: | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 463 | "GFP f \<in> carrier L" | 
| 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 464 | by (auto intro:sup_closed simp add:GREATEST_FP_def) | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 465 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 466 | lemma GFP_upperbound: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 467 | assumes "x \<in> carrier L" "x \<sqsubseteq> f x" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 468 | shows "x \<sqsubseteq> GFP f" | 
| 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 469 | by (auto intro:sup_upper assms simp add:GREATEST_FP_def) | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 470 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 471 | lemma GFP_least: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 472 | assumes "x \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 473 | "(\<And>u. \<lbrakk> u \<in> carrier L; u \<sqsubseteq> f u \<rbrakk> \<Longrightarrow> u \<sqsubseteq> x)" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 474 | shows "GFP f \<sqsubseteq> x" | 
| 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 475 | by (auto simp add:GREATEST_FP_def intro:sup_least assms) | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 476 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 477 | lemma GFP_lemma2: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 478 | assumes "Mono f" "f \<in> carrier L \<rightarrow> carrier L" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 479 | shows "GFP f \<sqsubseteq> f (GFP f)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 480 | using assms | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 481 | apply (auto simp add:Pi_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 482 | apply (rule GFP_least) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 483 | apply (metis GFP_closed) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 484 | apply (metis GFP_closed GFP_upperbound le_trans use_iso2) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 485 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 486 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 487 | lemma GFP_lemma3: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 488 | assumes "Mono f" "f \<in> carrier L \<rightarrow> carrier L" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 489 | shows "f (GFP f) \<sqsubseteq> GFP f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 490 | by (metis GFP_closed GFP_lemma2 GFP_upperbound assms funcset_mem use_iso2) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 491 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 492 | lemma GFP_weak_unfold: | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 493 | "\<lbrakk> Mono f; f \<in> carrier L \<rightarrow> carrier L \<rbrakk> \<Longrightarrow> GFP f .= f (GFP f)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 494 | by (auto intro: GFP_lemma2 GFP_lemma3 funcset_mem) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 495 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 496 | lemma (in weak_complete_lattice) GFP_fixed_point [intro]: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 497 | assumes "Mono f" "f \<in> carrier L \<rightarrow> carrier L" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 498 | shows "GFP f \<in> fps L f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 499 | using assms | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 500 | proof - | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 501 | have "f (GFP f) \<in> carrier L" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 502 | using assms(2) by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 503 | with assms show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 504 | by (simp add: GFP_weak_unfold fps_def local.sym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 505 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 506 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 507 | lemma GFP_greatest_fixed_point: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 508 | assumes "Mono f" "f \<in> carrier L \<rightarrow> carrier L" "x \<in> fps L f" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 509 | shows "x \<sqsubseteq> GFP f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 510 | using assms | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 511 | by (rule_tac GFP_upperbound, auto simp add: fps_def, meson PiE local.sym weak_refl) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 512 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 513 | lemma GFP_idem: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 514 | assumes "f \<in> carrier L \<rightarrow> carrier L" "Mono f" "Idem f" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 515 | shows "GFP f .= (f \<top>)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 516 | proof (rule weak_le_antisym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 517 | from assms(1) show fb: "f \<top> \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 518 | by (rule funcset_mem, simp) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 519 | from assms show mf: "GFP f \<in> carrier L" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 520 | by blast | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 521 | show "f \<top> \<sqsubseteq> GFP f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 522 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 523 | have "f (f \<top>) .= f \<top>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 524 | by (auto simp add: fps_def fb assms(3) idempotent) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 525 | moreover have "f (f \<top>) \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 526 | by (rule funcset_mem[of f "carrier L"], simp_all add: assms fb) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 527 | ultimately show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 528 | by (rule_tac GFP_upperbound, simp_all add: fb local.sym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 529 | qed | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 530 | show "GFP f \<sqsubseteq> f \<top>" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 531 | proof - | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 532 | have "GFP f \<sqsubseteq> f (GFP f)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 533 | by (simp add: GFP_lemma2 assms(1) assms(2)) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 534 | moreover have "... \<sqsubseteq> f \<top>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 535 | by (auto intro: use_iso1[of _ f] simp add: assms) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 536 | moreover from assms(1) have "f (GFP f) \<in> carrier L" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 537 | by (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 538 | ultimately show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 539 | using fb local.le_trans by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 540 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 541 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 542 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 543 | end | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 544 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 545 | |
| 67226 | 546 | subsection \<open>Complete lattices where \<open>eq\<close> is the Equality\<close> | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 547 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 548 | locale complete_lattice = partial_order + | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 549 | assumes sup_exists: | 
| 67091 | 550 | "[| A \<subseteq> carrier L |] ==> \<exists>s. least L s (Upper L A)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 551 | and inf_exists: | 
| 67091 | 552 | "[| A \<subseteq> carrier L |] ==> \<exists>i. greatest L i (Lower L A)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 553 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 554 | sublocale complete_lattice \<subseteq> lattice | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 555 | proof | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 556 | fix x y | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 557 | assume a: "x \<in> carrier L" "y \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 558 |   thus "\<exists>s. is_lub L s {x, y}"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 559 |     by (rule_tac sup_exists[of "{x, y}"], auto)
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 560 |   from a show "\<exists>s. is_glb L s {x, y}"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 561 |     by (rule_tac inf_exists[of "{x, y}"], auto)
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 562 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 563 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 564 | sublocale complete_lattice \<subseteq> weak?: weak_complete_lattice | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 565 | by standard (auto intro: sup_exists inf_exists) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 566 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 567 | lemma complete_lattice_lattice [simp]: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 568 | assumes "complete_lattice X" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 569 | shows "lattice X" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 570 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 571 | interpret c: complete_lattice X | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 572 | by (simp add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 573 | show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 574 | by (unfold_locales) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 575 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 576 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 577 | text \<open>Introduction rule: the usual definition of complete lattice\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 578 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 579 | lemma (in partial_order) complete_latticeI: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 580 | assumes sup_exists: | 
| 67091 | 581 | "!!A. [| A \<subseteq> carrier L |] ==> \<exists>s. least L s (Upper L A)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 582 | and inf_exists: | 
| 67091 | 583 | "!!A. [| A \<subseteq> carrier L |] ==> \<exists>i. greatest L i (Lower L A)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 584 | shows "complete_lattice L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 585 | by standard (auto intro: sup_exists inf_exists) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 586 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 587 | theorem (in partial_order) complete_lattice_criterion1: | 
| 67091 | 588 | assumes top_exists: "\<exists>g. greatest L g (carrier L)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 589 | and inf_exists: | 
| 67091 | 590 |       "!!A. [| A \<subseteq> carrier L; A \<noteq> {} |] ==> \<exists>i. greatest L i (Lower L A)"
 | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 591 | shows "complete_lattice L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 592 | proof (rule complete_latticeI) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 593 | from top_exists obtain top where top: "greatest L top (carrier L)" .. | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 594 | fix A | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 595 | assume L: "A \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 596 | let ?B = "Upper L A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 597 | from L top have "top \<in> ?B" by (fast intro!: Upper_memI intro: greatest_le) | 
| 67091 | 598 |   then have B_non_empty: "?B \<noteq> {}" by fast
 | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 599 | have B_L: "?B \<subseteq> carrier L" by simp | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 600 | from inf_exists [OF B_L B_non_empty] | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 601 | obtain b where b_inf_B: "greatest L b (Lower L ?B)" .. | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 602 | have "least L b (Upper L A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 603 | apply (rule least_UpperI) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 604 | apply (rule greatest_le [where A = "Lower L ?B"]) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 605 | apply (rule b_inf_B) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 606 | apply (rule Lower_memI) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 607 | apply (erule Upper_memD [THEN conjunct1]) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 608 | apply assumption | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 609 | apply (rule L) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 610 | apply (fast intro: L [THEN subsetD]) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 611 | apply (erule greatest_Lower_below [OF b_inf_B]) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 612 | apply simp | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 613 | apply (rule L) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 614 | apply (rule greatest_closed [OF b_inf_B]) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 615 | done | 
| 67091 | 616 | then show "\<exists>s. least L s (Upper L A)" .. | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 617 | next | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 618 | fix A | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 619 | assume L: "A \<subseteq> carrier L" | 
| 67091 | 620 | show "\<exists>i. greatest L i (Lower L A)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 621 |   proof (cases "A = {}")
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 622 | case True then show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 623 | by (simp add: top_exists) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 624 | next | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 625 | case False with L show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 626 | by (rule inf_exists) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 627 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 628 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 629 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 630 | (* TODO: prove dual version *) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 631 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 632 | subsection \<open>Fixed points\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 633 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 634 | context complete_lattice | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 635 | begin | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 636 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 637 | lemma LFP_unfold: | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 638 | "\<lbrakk> Mono f; f \<in> carrier L \<rightarrow> carrier L \<rbrakk> \<Longrightarrow> LFP f = f (LFP f)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 639 | using eq_is_equal weak.LFP_weak_unfold by auto | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 640 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 641 | lemma LFP_const: | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 642 | "t \<in> carrier L \<Longrightarrow> LFP (\<lambda> x. t) = t" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 643 | by (simp add: local.le_antisym weak.LFP_greatest weak.LFP_lowerbound) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 644 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 645 | lemma LFP_id: | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 646 | "LFP id = \<bottom>" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 647 | by (simp add: local.le_antisym weak.LFP_lowerbound) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 648 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 649 | lemma GFP_unfold: | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 650 | "\<lbrakk> Mono f; f \<in> carrier L \<rightarrow> carrier L \<rbrakk> \<Longrightarrow> GFP f = f (GFP f)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 651 | using eq_is_equal weak.GFP_weak_unfold by auto | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 652 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 653 | lemma GFP_const: | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 654 | "t \<in> carrier L \<Longrightarrow> GFP (\<lambda> x. t) = t" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 655 | by (simp add: local.le_antisym weak.GFP_least weak.GFP_upperbound) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 656 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 657 | lemma GFP_id: | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 658 | "GFP id = \<top>" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 659 | using weak.GFP_upperbound by auto | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 660 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 661 | end | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 662 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 663 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 664 | subsection \<open>Interval complete lattices\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 665 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 666 | context weak_complete_lattice | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 667 | begin | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 668 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 669 | lemma at_least_at_most_Sup: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 670 | "\<lbrakk> a \<in> carrier L; b \<in> carrier L; a \<sqsubseteq> b \<rbrakk> \<Longrightarrow> \<Squnion> \<lbrace>a..b\<rbrace> .= b" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 671 | apply (rule weak_le_antisym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 672 | apply (rule sup_least) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 673 | apply (auto simp add: at_least_at_most_closed) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 674 | apply (rule sup_upper) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 675 | apply (auto simp add: at_least_at_most_closed) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 676 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 677 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 678 | lemma at_least_at_most_Inf: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 679 | "\<lbrakk> a \<in> carrier L; b \<in> carrier L; a \<sqsubseteq> b \<rbrakk> \<Longrightarrow> \<Sqinter> \<lbrace>a..b\<rbrace> .= a" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 680 | apply (rule weak_le_antisym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 681 | apply (rule inf_lower) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 682 | apply (auto simp add: at_least_at_most_closed) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 683 | apply (rule inf_greatest) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 684 | apply (auto simp add: at_least_at_most_closed) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 685 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 686 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 687 | end | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 688 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 689 | lemma weak_complete_lattice_interval: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 690 | assumes "weak_complete_lattice L" "a \<in> carrier L" "b \<in> carrier L" "a \<sqsubseteq>\<^bsub>L\<^esub> b" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 691 | shows "weak_complete_lattice (L \<lparr> carrier := \<lbrace>a..b\<rbrace>\<^bsub>L\<^esub> \<rparr>)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 692 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 693 | interpret L: weak_complete_lattice L | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 694 | by (simp add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 695 | interpret weak_partial_order "L \<lparr> carrier := \<lbrace>a..b\<rbrace>\<^bsub>L\<^esub> \<rparr>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 696 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 697 | have "\<lbrace>a..b\<rbrace>\<^bsub>L\<^esub> \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 698 | by (auto, simp add: at_least_at_most_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 699 | thus "weak_partial_order (L\<lparr>carrier := \<lbrace>a..b\<rbrace>\<^bsub>L\<^esub>\<rparr>)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 700 | by (simp add: L.weak_partial_order_axioms weak_partial_order_subset) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 701 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 702 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 703 | show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 704 | proof | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 705 | fix A | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 706 | assume a: "A \<subseteq> carrier (L\<lparr>carrier := \<lbrace>a..b\<rbrace>\<^bsub>L\<^esub>\<rparr>)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 707 | show "\<exists>s. is_lub (L\<lparr>carrier := \<lbrace>a..b\<rbrace>\<^bsub>L\<^esub>\<rparr>) s A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 708 |     proof (cases "A = {}")
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 709 | case True | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 710 | thus ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 711 | by (rule_tac x="a" in exI, auto simp add: least_def assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 712 | next | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 713 | case False | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 714 | show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 715 | proof (rule_tac x="\<Squnion>\<^bsub>L\<^esub> A" in exI, rule least_UpperI, simp_all) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 716 | show b:"\<And> x. x \<in> A \<Longrightarrow> x \<sqsubseteq>\<^bsub>L\<^esub> \<Squnion>\<^bsub>L\<^esub>A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 717 | using a by (auto intro: L.sup_upper, meson L.at_least_at_most_closed L.sup_upper subset_trans) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 718 | show "\<And>y. y \<in> Upper (L\<lparr>carrier := \<lbrace>a..b\<rbrace>\<^bsub>L\<^esub>\<rparr>) A \<Longrightarrow> \<Squnion>\<^bsub>L\<^esub>A \<sqsubseteq>\<^bsub>L\<^esub> y" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 719 | using a L.at_least_at_most_closed by (rule_tac L.sup_least, auto intro: funcset_mem simp add: Upper_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 720 | from a show "A \<subseteq> \<lbrace>a..b\<rbrace>\<^bsub>L\<^esub>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 721 | by (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 722 | from a show "\<Squnion>\<^bsub>L\<^esub>A \<in> \<lbrace>a..b\<rbrace>\<^bsub>L\<^esub>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 723 | apply (rule_tac L.at_least_at_most_member) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 724 | apply (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 725 | apply (meson L.at_least_at_most_closed L.sup_closed subset_trans) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 726 | apply (meson False L.at_least_at_most_closed L.at_least_at_most_lower L.le_trans L.sup_closed b all_not_in_conv assms(2) contra_subsetD subset_trans) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 727 | apply (rule L.sup_least) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 728 | apply (auto simp add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 729 | using L.at_least_at_most_closed apply blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 730 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 731 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 732 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 733 | show "\<exists>s. is_glb (L\<lparr>carrier := \<lbrace>a..b\<rbrace>\<^bsub>L\<^esub>\<rparr>) s A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 734 |     proof (cases "A = {}")
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 735 | case True | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 736 | thus ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 737 | by (rule_tac x="b" in exI, auto simp add: greatest_def assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 738 | next | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 739 | case False | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 740 | show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 741 | proof (rule_tac x="\<Sqinter>\<^bsub>L\<^esub> A" in exI, rule greatest_LowerI, simp_all) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 742 | show b:"\<And>x. x \<in> A \<Longrightarrow> \<Sqinter>\<^bsub>L\<^esub>A \<sqsubseteq>\<^bsub>L\<^esub> x" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 743 | using a L.at_least_at_most_closed by (force intro!: L.inf_lower) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 744 | show "\<And>y. y \<in> Lower (L\<lparr>carrier := \<lbrace>a..b\<rbrace>\<^bsub>L\<^esub>\<rparr>) A \<Longrightarrow> y \<sqsubseteq>\<^bsub>L\<^esub> \<Sqinter>\<^bsub>L\<^esub>A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 745 | using a L.at_least_at_most_closed by (rule_tac L.inf_greatest, auto intro: funcset_carrier' simp add: Lower_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 746 | from a show "A \<subseteq> \<lbrace>a..b\<rbrace>\<^bsub>L\<^esub>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 747 | by (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 748 | from a show "\<Sqinter>\<^bsub>L\<^esub>A \<in> \<lbrace>a..b\<rbrace>\<^bsub>L\<^esub>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 749 | apply (rule_tac L.at_least_at_most_member) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 750 | apply (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 751 | apply (meson L.at_least_at_most_closed L.inf_closed subset_trans) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 752 | apply (meson L.at_least_at_most_closed L.at_least_at_most_lower L.inf_greatest assms(2) set_rev_mp subset_trans) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 753 | apply (meson False L.at_least_at_most_closed L.at_least_at_most_upper L.inf_closed L.le_trans b all_not_in_conv assms(3) contra_subsetD subset_trans) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 754 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 755 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 756 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 757 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 758 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 759 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 760 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 761 | subsection \<open>Knaster-Tarski theorem and variants\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 762 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 763 | text \<open>The set of fixed points of a complete lattice is itself a complete lattice\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 764 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 765 | theorem Knaster_Tarski: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 766 | assumes "weak_complete_lattice L" "f \<in> carrier L \<rightarrow> carrier L" "isotone L L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 767 | shows "weak_complete_lattice (fpl L f)" (is "weak_complete_lattice ?L'") | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 768 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 769 | interpret L: weak_complete_lattice L | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 770 | by (simp add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 771 | interpret weak_partial_order ?L' | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 772 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 773 |     have "{x \<in> carrier L. f x .=\<^bsub>L\<^esub> x} \<subseteq> carrier L"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 774 | by (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 775 | thus "weak_partial_order ?L'" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 776 | by (simp add: L.weak_partial_order_axioms weak_partial_order_subset) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 777 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 778 | show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 779 | proof (unfold_locales, simp_all) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 780 | fix A | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 781 | assume A: "A \<subseteq> fps L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 782 | show "\<exists>s. is_lub (fpl L f) s A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 783 | proof | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 784 | from A have AL: "A \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 785 | by (meson fps_carrier subset_eq) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 786 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 787 | let ?w = "\<Squnion>\<^bsub>L\<^esub> A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 788 | have w: "f (\<Squnion>\<^bsub>L\<^esub>A) \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 789 | by (rule funcset_mem[of f "carrier L"], simp_all add: AL assms(2)) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 790 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 791 | have pf_w: "(\<Squnion>\<^bsub>L\<^esub> A) \<sqsubseteq>\<^bsub>L\<^esub> f (\<Squnion>\<^bsub>L\<^esub> A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 792 | by (simp add: A L.weak_sup_pre_fixed_point assms(2) assms(3)) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 793 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 794 | have f_top_chain: "f ` \<lbrace>?w..\<top>\<^bsub>L\<^esub>\<rbrace>\<^bsub>L\<^esub> \<subseteq> \<lbrace>?w..\<top>\<^bsub>L\<^esub>\<rbrace>\<^bsub>L\<^esub>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 795 | proof (auto simp add: at_least_at_most_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 796 | fix x | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 797 | assume b: "x \<in> carrier L" "\<Squnion>\<^bsub>L\<^esub>A \<sqsubseteq>\<^bsub>L\<^esub> x" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 798 | from b show fx: "f x \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 799 | using assms(2) by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 800 | show "\<Squnion>\<^bsub>L\<^esub>A \<sqsubseteq>\<^bsub>L\<^esub> f x" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 801 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 802 | have "?w \<sqsubseteq>\<^bsub>L\<^esub> f ?w" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 803 | proof (rule_tac L.sup_least, simp_all add: AL w) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 804 | fix y | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 805 | assume c: "y \<in> A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 806 | hence y: "y \<in> fps L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 807 | using A subsetCE by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 808 | with assms have "y .=\<^bsub>L\<^esub> f y" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 809 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 810 | from y have "y \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 811 | by (simp add: fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 812 | moreover hence "f y \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 813 | by (rule_tac funcset_mem[of f "carrier L"], simp_all add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 814 | ultimately show ?thesis using y | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 815 | by (rule_tac L.sym, simp_all add: L.use_fps) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 816 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 817 | moreover have "y \<sqsubseteq>\<^bsub>L\<^esub> \<Squnion>\<^bsub>L\<^esub>A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 818 | by (simp add: AL L.sup_upper c(1)) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 819 | ultimately show "y \<sqsubseteq>\<^bsub>L\<^esub> f (\<Squnion>\<^bsub>L\<^esub>A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 820 | by (meson fps_def AL funcset_mem L.refl L.weak_complete_lattice_axioms assms(2) assms(3) c(1) isotone_def rev_subsetD weak_complete_lattice.sup_closed weak_partial_order.le_cong) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 821 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 822 | thus ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 823 | by (meson AL funcset_mem L.le_trans L.sup_closed assms(2) assms(3) b(1) b(2) use_iso2) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 824 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 825 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 826 | show "f x \<sqsubseteq>\<^bsub>L\<^esub> \<top>\<^bsub>L\<^esub>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 827 | by (simp add: fx) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 828 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 829 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 830 | let ?L' = "L\<lparr> carrier := \<lbrace>?w..\<top>\<^bsub>L\<^esub>\<rbrace>\<^bsub>L\<^esub> \<rparr>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 831 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 832 | interpret L': weak_complete_lattice ?L' | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 833 | by (auto intro: weak_complete_lattice_interval simp add: L.weak_complete_lattice_axioms AL) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 834 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 835 | let ?L'' = "L\<lparr> carrier := fps L f \<rparr>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 836 | |
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 837 | show "is_lub ?L'' (LFP\<^bsub>?L'\<^esub> f) A" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 838 | proof (rule least_UpperI, simp_all) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 839 | fix x | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 840 | assume "x \<in> Upper ?L'' A" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 841 | hence "LFP\<^bsub>?L'\<^esub> f \<sqsubseteq>\<^bsub>?L'\<^esub> x" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 842 | apply (rule_tac L'.LFP_lowerbound) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 843 | apply (auto simp add: Upper_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 844 | apply (simp add: A AL L.at_least_at_most_member L.sup_least set_rev_mp) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 845 | apply (simp add: Pi_iff assms(2) fps_def, rule_tac L.weak_refl) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 846 | apply (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 847 | apply (rule funcset_mem[of f "carrier L"], simp_all add: assms(2)) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 848 | done | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 849 | thus " LFP\<^bsub>?L'\<^esub> f \<sqsubseteq>\<^bsub>L\<^esub> x" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 850 | by (simp) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 851 | next | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 852 | fix x | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 853 | assume xA: "x \<in> A" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 854 | show "x \<sqsubseteq>\<^bsub>L\<^esub> LFP\<^bsub>?L'\<^esub> f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 855 | proof - | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 856 | have "LFP\<^bsub>?L'\<^esub> f \<in> carrier ?L'" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 857 | by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 858 | thus ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 859 | by (simp, meson AL L.at_least_at_most_closed L.at_least_at_most_lower L.le_trans L.sup_closed L.sup_upper xA subsetCE) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 860 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 861 | next | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 862 | show "A \<subseteq> fps L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 863 | by (simp add: A) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 864 | next | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 865 | show "LFP\<^bsub>?L'\<^esub> f \<in> fps L f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 866 | proof (auto simp add: fps_def) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 867 | have "LFP\<^bsub>?L'\<^esub> f \<in> carrier ?L'" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 868 | by (rule L'.LFP_closed) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 869 | thus c:"LFP\<^bsub>?L'\<^esub> f \<in> carrier L" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 870 | by (auto simp add: at_least_at_most_def) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 871 | have "LFP\<^bsub>?L'\<^esub> f .=\<^bsub>?L'\<^esub> f (LFP\<^bsub>?L'\<^esub> f)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 872 | proof (rule "L'.LFP_weak_unfold", simp_all) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 873 | show "f \<in> \<lbrace>\<Squnion>\<^bsub>L\<^esub>A..\<top>\<^bsub>L\<^esub>\<rbrace>\<^bsub>L\<^esub> \<rightarrow> \<lbrace>\<Squnion>\<^bsub>L\<^esub>A..\<top>\<^bsub>L\<^esub>\<rbrace>\<^bsub>L\<^esub>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 874 | apply (auto simp add: Pi_def at_least_at_most_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 875 | using assms(2) apply blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 876 | apply (meson AL funcset_mem L.le_trans L.sup_closed assms(2) assms(3) pf_w use_iso2) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 877 | using assms(2) apply blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 878 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 879 | from assms(3) show "Mono\<^bsub>L\<lparr>carrier := \<lbrace>\<Squnion>\<^bsub>L\<^esub>A..\<top>\<^bsub>L\<^esub>\<rbrace>\<^bsub>L\<^esub>\<rparr>\<^esub> f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 880 | apply (auto simp add: isotone_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 881 | using L'.weak_partial_order_axioms apply blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 882 | apply (meson L.at_least_at_most_closed subsetCE) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 883 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 884 | qed | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 885 | thus "f (LFP\<^bsub>?L'\<^esub> f) .=\<^bsub>L\<^esub> LFP\<^bsub>?L'\<^esub> f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 886 | by (simp add: L.equivalence_axioms funcset_carrier' c assms(2) equivalence.sym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 887 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 888 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 889 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 890 | show "\<exists>i. is_glb (L\<lparr>carrier := fps L f\<rparr>) i A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 891 | proof | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 892 | from A have AL: "A \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 893 | by (meson fps_carrier subset_eq) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 894 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 895 | let ?w = "\<Sqinter>\<^bsub>L\<^esub> A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 896 | have w: "f (\<Sqinter>\<^bsub>L\<^esub>A) \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 897 | by (simp add: AL funcset_carrier' assms(2)) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 898 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 899 | have pf_w: "f (\<Sqinter>\<^bsub>L\<^esub> A) \<sqsubseteq>\<^bsub>L\<^esub> (\<Sqinter>\<^bsub>L\<^esub> A)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 900 | by (simp add: A L.weak_sup_post_fixed_point assms(2) assms(3)) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 901 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 902 | have f_bot_chain: "f ` \<lbrace>\<bottom>\<^bsub>L\<^esub>..?w\<rbrace>\<^bsub>L\<^esub> \<subseteq> \<lbrace>\<bottom>\<^bsub>L\<^esub>..?w\<rbrace>\<^bsub>L\<^esub>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 903 | proof (auto simp add: at_least_at_most_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 904 | fix x | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 905 | assume b: "x \<in> carrier L" "x \<sqsubseteq>\<^bsub>L\<^esub> \<Sqinter>\<^bsub>L\<^esub>A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 906 | from b show fx: "f x \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 907 | using assms(2) by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 908 | show "f x \<sqsubseteq>\<^bsub>L\<^esub> \<Sqinter>\<^bsub>L\<^esub>A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 909 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 910 | have "f ?w \<sqsubseteq>\<^bsub>L\<^esub> ?w" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 911 | proof (rule_tac L.inf_greatest, simp_all add: AL w) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 912 | fix y | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 913 | assume c: "y \<in> A" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 914 | with assms have "y .=\<^bsub>L\<^esub> f y" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 915 | by (metis (no_types, lifting) A funcset_carrier'[OF assms(2)] L.sym fps_def mem_Collect_eq subset_eq) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 916 | moreover have "\<Sqinter>\<^bsub>L\<^esub>A \<sqsubseteq>\<^bsub>L\<^esub> y" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 917 | by (simp add: AL L.inf_lower c) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 918 | ultimately show "f (\<Sqinter>\<^bsub>L\<^esub>A) \<sqsubseteq>\<^bsub>L\<^esub> y" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 919 | by (meson AL L.inf_closed L.le_trans c pf_w set_rev_mp w) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 920 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 921 | thus ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 922 | by (meson AL L.inf_closed L.le_trans assms(3) b(1) b(2) fx use_iso2 w) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 923 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 924 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 925 | show "\<bottom>\<^bsub>L\<^esub> \<sqsubseteq>\<^bsub>L\<^esub> f x" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 926 | by (simp add: fx) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 927 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 928 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 929 | let ?L' = "L\<lparr> carrier := \<lbrace>\<bottom>\<^bsub>L\<^esub>..?w\<rbrace>\<^bsub>L\<^esub> \<rparr>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 930 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 931 | interpret L': weak_complete_lattice ?L' | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 932 | by (auto intro!: weak_complete_lattice_interval simp add: L.weak_complete_lattice_axioms AL) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 933 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 934 | let ?L'' = "L\<lparr> carrier := fps L f \<rparr>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 935 | |
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 936 | show "is_glb ?L'' (GFP\<^bsub>?L'\<^esub> f) A" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 937 | proof (rule greatest_LowerI, simp_all) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 938 | fix x | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 939 | assume "x \<in> Lower ?L'' A" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 940 | hence "x \<sqsubseteq>\<^bsub>?L'\<^esub> GFP\<^bsub>?L'\<^esub> f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 941 | apply (rule_tac L'.GFP_upperbound) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 942 | apply (auto simp add: Lower_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 943 | apply (meson A AL L.at_least_at_most_member L.bottom_lower L.weak_complete_lattice_axioms fps_carrier subsetCE weak_complete_lattice.inf_greatest) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 944 | apply (simp add: funcset_carrier' L.sym assms(2) fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 945 | done | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 946 | thus "x \<sqsubseteq>\<^bsub>L\<^esub> GFP\<^bsub>?L'\<^esub> f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 947 | by (simp) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 948 | next | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 949 | fix x | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 950 | assume xA: "x \<in> A" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 951 | show "GFP\<^bsub>?L'\<^esub> f \<sqsubseteq>\<^bsub>L\<^esub> x" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 952 | proof - | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 953 | have "GFP\<^bsub>?L'\<^esub> f \<in> carrier ?L'" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 954 | by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 955 | thus ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 956 | by (simp, meson AL L.at_least_at_most_closed L.at_least_at_most_upper L.inf_closed L.inf_lower L.le_trans subsetCE xA) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 957 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 958 | next | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 959 | show "A \<subseteq> fps L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 960 | by (simp add: A) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 961 | next | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 962 | show "GFP\<^bsub>?L'\<^esub> f \<in> fps L f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 963 | proof (auto simp add: fps_def) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 964 | have "GFP\<^bsub>?L'\<^esub> f \<in> carrier ?L'" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 965 | by (rule L'.GFP_closed) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 966 | thus c:"GFP\<^bsub>?L'\<^esub> f \<in> carrier L" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 967 | by (auto simp add: at_least_at_most_def) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 968 | have "GFP\<^bsub>?L'\<^esub> f .=\<^bsub>?L'\<^esub> f (GFP\<^bsub>?L'\<^esub> f)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 969 | proof (rule "L'.GFP_weak_unfold", simp_all) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 970 | show "f \<in> \<lbrace>\<bottom>\<^bsub>L\<^esub>..?w\<rbrace>\<^bsub>L\<^esub> \<rightarrow> \<lbrace>\<bottom>\<^bsub>L\<^esub>..?w\<rbrace>\<^bsub>L\<^esub>" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 971 | apply (auto simp add: Pi_def at_least_at_most_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 972 | using assms(2) apply blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 973 | apply (simp add: funcset_carrier' assms(2)) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 974 | apply (meson AL funcset_carrier L.inf_closed L.le_trans assms(2) assms(3) pf_w use_iso2) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 975 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 976 | from assms(3) show "Mono\<^bsub>L\<lparr>carrier := \<lbrace>\<bottom>\<^bsub>L\<^esub>..?w\<rbrace>\<^bsub>L\<^esub>\<rparr>\<^esub> f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 977 | apply (auto simp add: isotone_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 978 | using L'.weak_partial_order_axioms apply blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 979 | using L.at_least_at_most_closed apply (blast intro: funcset_carrier') | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 980 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 981 | qed | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 982 | thus "f (GFP\<^bsub>?L'\<^esub> f) .=\<^bsub>L\<^esub> GFP\<^bsub>?L'\<^esub> f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 983 | by (simp add: L.equivalence_axioms funcset_carrier' c assms(2) equivalence.sym) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 984 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 985 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 986 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 987 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 988 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 989 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 990 | theorem Knaster_Tarski_top: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 991 | assumes "weak_complete_lattice L" "isotone L L f" "f \<in> carrier L \<rightarrow> carrier L" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 992 | shows "\<top>\<^bsub>fpl L f\<^esub> .=\<^bsub>L\<^esub> GFP\<^bsub>L\<^esub> f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 993 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 994 | interpret L: weak_complete_lattice L | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 995 | by (simp add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 996 | interpret L': weak_complete_lattice "fpl L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 997 | by (rule Knaster_Tarski, simp_all add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 998 | show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 999 | proof (rule L.weak_le_antisym, simp_all) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 1000 | show "\<top>\<^bsub>fpl L f\<^esub> \<sqsubseteq>\<^bsub>L\<^esub> GFP\<^bsub>L\<^esub> f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1001 | by (rule L.GFP_greatest_fixed_point, simp_all add: assms L'.top_closed[simplified]) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 1002 | show "GFP\<^bsub>L\<^esub> f \<sqsubseteq>\<^bsub>L\<^esub> \<top>\<^bsub>fpl L f\<^esub>" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1003 | proof - | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 1004 | have "GFP\<^bsub>L\<^esub> f \<in> fps L f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1005 | by (rule L.GFP_fixed_point, simp_all add: assms) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 1006 | hence "GFP\<^bsub>L\<^esub> f \<in> carrier (fpl L f)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1007 | by simp | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 1008 | hence "GFP\<^bsub>L\<^esub> f \<sqsubseteq>\<^bsub>fpl L f\<^esub> \<top>\<^bsub>fpl L f\<^esub>" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1009 | by (rule L'.top_higher) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1010 | thus ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1011 | by simp | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1012 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1013 | show "\<top>\<^bsub>fpl L f\<^esub> \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1014 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1015 | have "carrier (fpl L f) \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1016 | by (auto simp add: fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1017 | with L'.top_closed show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1018 | by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1019 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1020 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1021 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1022 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1023 | theorem Knaster_Tarski_bottom: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1024 | assumes "weak_complete_lattice L" "isotone L L f" "f \<in> carrier L \<rightarrow> carrier L" | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 1025 | shows "\<bottom>\<^bsub>fpl L f\<^esub> .=\<^bsub>L\<^esub> LFP\<^bsub>L\<^esub> f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1026 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1027 | interpret L: weak_complete_lattice L | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1028 | by (simp add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1029 | interpret L': weak_complete_lattice "fpl L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1030 | by (rule Knaster_Tarski, simp_all add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1031 | show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1032 | proof (rule L.weak_le_antisym, simp_all) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 1033 | show "LFP\<^bsub>L\<^esub> f \<sqsubseteq>\<^bsub>L\<^esub> \<bottom>\<^bsub>fpl L f\<^esub>" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1034 | by (rule L.LFP_least_fixed_point, simp_all add: assms L'.bottom_closed[simplified]) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 1035 | show "\<bottom>\<^bsub>fpl L f\<^esub> \<sqsubseteq>\<^bsub>L\<^esub> LFP\<^bsub>L\<^esub> f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1036 | proof - | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 1037 | have "LFP\<^bsub>L\<^esub> f \<in> fps L f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1038 | by (rule L.LFP_fixed_point, simp_all add: assms) | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 1039 | hence "LFP\<^bsub>L\<^esub> f \<in> carrier (fpl L f)" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1040 | by simp | 
| 66580 
e5b1d4d55bf6
Avoid \mu and \nu as constant syntax, use LFP and GFP instead.
 ballarin parents: 
66579diff
changeset | 1041 | hence "\<bottom>\<^bsub>fpl L f\<^esub> \<sqsubseteq>\<^bsub>fpl L f\<^esub> LFP\<^bsub>L\<^esub> f" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1042 | by (rule L'.bottom_lower) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1043 | thus ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1044 | by simp | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1045 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1046 | show "\<bottom>\<^bsub>fpl L f\<^esub> \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1047 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1048 | have "carrier (fpl L f) \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1049 | by (auto simp add: fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1050 | with L'.bottom_closed show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1051 | by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1052 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1053 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1054 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1055 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1056 | text \<open>If a function is both idempotent and isotone then the image of the function forms a complete lattice\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1057 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1058 | theorem Knaster_Tarski_idem: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1059 | assumes "complete_lattice L" "f \<in> carrier L \<rightarrow> carrier L" "isotone L L f" "idempotent L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1060 | shows "complete_lattice (L\<lparr>carrier := f ` carrier L\<rparr>)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1061 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1062 | interpret L: complete_lattice L | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1063 | by (simp add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1064 | have "fps L f = f ` carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1065 | using L.weak.fps_idem[OF assms(2) assms(4)] | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1066 | by (simp add: L.set_eq_is_eq) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1067 | then interpret L': weak_complete_lattice "(L\<lparr>carrier := f ` carrier L\<rparr>)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1068 | by (metis Knaster_Tarski L.weak.weak_complete_lattice_axioms assms(2) assms(3)) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1069 | show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1070 | using L'.sup_exists L'.inf_exists | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1071 | by (unfold_locales, auto simp add: L.eq_is_equal) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1072 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1073 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1074 | theorem Knaster_Tarski_idem_extremes: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1075 | assumes "weak_complete_lattice L" "isotone L L f" "idempotent L f" "f \<in> carrier L \<rightarrow> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1076 | shows "\<top>\<^bsub>fpl L f\<^esub> .=\<^bsub>L\<^esub> f (\<top>\<^bsub>L\<^esub>)" "\<bottom>\<^bsub>fpl L f\<^esub> .=\<^bsub>L\<^esub> f (\<bottom>\<^bsub>L\<^esub>)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1077 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1078 | interpret L: weak_complete_lattice "L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1079 | by (simp_all add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1080 | interpret L': weak_complete_lattice "fpl L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1081 | by (rule Knaster_Tarski, simp_all add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1082 | have FA: "fps L f \<subseteq> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1083 | by (auto simp add: fps_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1084 | show "\<top>\<^bsub>fpl L f\<^esub> .=\<^bsub>L\<^esub> f (\<top>\<^bsub>L\<^esub>)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1085 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1086 | from FA have "\<top>\<^bsub>fpl L f\<^esub> \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1087 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1088 | have "\<top>\<^bsub>fpl L f\<^esub> \<in> fps L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1089 | using L'.top_closed by auto | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1090 | thus ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1091 | using FA by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1092 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1093 | moreover with assms have "f \<top>\<^bsub>L\<^esub> \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1094 | by (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1095 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1096 | ultimately show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1097 | using L.trans[OF Knaster_Tarski_top[of L f] L.GFP_idem[of f]] | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1098 | by (simp_all add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1099 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1100 | show "\<bottom>\<^bsub>fpl L f\<^esub> .=\<^bsub>L\<^esub> f (\<bottom>\<^bsub>L\<^esub>)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1101 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1102 | from FA have "\<bottom>\<^bsub>fpl L f\<^esub> \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1103 | proof - | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1104 | have "\<bottom>\<^bsub>fpl L f\<^esub> \<in> fps L f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1105 | using L'.bottom_closed by auto | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1106 | thus ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1107 | using FA by blast | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1108 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1109 | moreover with assms have "f \<bottom>\<^bsub>L\<^esub> \<in> carrier L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1110 | by (auto) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1111 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1112 | ultimately show ?thesis | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1113 | using L.trans[OF Knaster_Tarski_bottom[of L f] L.LFP_idem[of f]] | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1114 | by (simp_all add: assms) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1115 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1116 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1117 | |
| 66187 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1118 | theorem Knaster_Tarski_idem_inf_eq: | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1119 | assumes "weak_complete_lattice L" "isotone L L f" "idempotent L f" "f \<in> carrier L \<rightarrow> carrier L" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1120 | "A \<subseteq> fps L f" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1121 | shows "\<Sqinter>\<^bsub>fpl L f\<^esub> A .=\<^bsub>L\<^esub> f (\<Sqinter>\<^bsub>L\<^esub> A)" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1122 | proof - | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1123 | interpret L: weak_complete_lattice "L" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1124 | by (simp_all add: assms) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1125 | interpret L': weak_complete_lattice "fpl L f" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1126 | by (rule Knaster_Tarski, simp_all add: assms) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1127 | have FA: "fps L f \<subseteq> carrier L" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1128 | by (auto simp add: fps_def) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1129 | have A: "A \<subseteq> carrier L" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1130 | using FA assms(5) by blast | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1131 | have fA: "f (\<Sqinter>\<^bsub>L\<^esub>A) \<in> fps L f" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1132 | by (metis (no_types, lifting) A L.idempotent L.inf_closed PiE assms(3) assms(4) fps_def mem_Collect_eq) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1133 | have infA: "\<Sqinter>\<^bsub>fpl L f\<^esub>A \<in> fps L f" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1134 | by (rule L'.inf_closed[simplified], simp add: assms) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1135 | show ?thesis | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1136 | proof (rule L.weak_le_antisym) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1137 | show ic: "\<Sqinter>\<^bsub>fpl L f\<^esub>A \<in> carrier L" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1138 | using FA infA by blast | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1139 | show fc: "f (\<Sqinter>\<^bsub>L\<^esub>A) \<in> carrier L" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1140 | using FA fA by blast | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1141 | show "f (\<Sqinter>\<^bsub>L\<^esub>A) \<sqsubseteq>\<^bsub>L\<^esub> \<Sqinter>\<^bsub>fpl L f\<^esub>A" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1142 | proof - | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1143 | have "\<And>x. x \<in> A \<Longrightarrow> f (\<Sqinter>\<^bsub>L\<^esub>A) \<sqsubseteq>\<^bsub>L\<^esub> x" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1144 | by (meson A FA L.inf_closed L.inf_lower L.le_trans L.weak_sup_post_fixed_point assms(2) assms(4) assms(5) fA subsetCE) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1145 | hence "f (\<Sqinter>\<^bsub>L\<^esub>A) \<sqsubseteq>\<^bsub>fpl L f\<^esub> \<Sqinter>\<^bsub>fpl L f\<^esub>A" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1146 | by (rule_tac L'.inf_greatest, simp_all add: fA assms(3,5)) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1147 | thus ?thesis | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1148 | by (simp) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1149 | qed | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1150 | show "\<Sqinter>\<^bsub>fpl L f\<^esub>A \<sqsubseteq>\<^bsub>L\<^esub> f (\<Sqinter>\<^bsub>L\<^esub>A)" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1151 | proof - | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1152 | have "\<And>x. x \<in> A \<Longrightarrow> \<Sqinter>\<^bsub>fpl L f\<^esub>A \<sqsubseteq>\<^bsub>fpl L f\<^esub> x" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1153 | by (rule L'.inf_lower, simp_all add: assms) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1154 | hence "\<Sqinter>\<^bsub>fpl L f\<^esub>A \<sqsubseteq>\<^bsub>L\<^esub> (\<Sqinter>\<^bsub>L\<^esub>A)" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1155 | apply (rule_tac L.inf_greatest, simp_all add: A) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1156 | using FA infA apply blast | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1157 | done | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1158 | hence 1:"f(\<Sqinter>\<^bsub>fpl L f\<^esub>A) \<sqsubseteq>\<^bsub>L\<^esub> f(\<Sqinter>\<^bsub>L\<^esub>A)" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1159 | by (metis (no_types, lifting) A FA L.inf_closed assms(2) infA subsetCE use_iso1) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1160 | have 2:"\<Sqinter>\<^bsub>fpl L f\<^esub>A \<sqsubseteq>\<^bsub>L\<^esub> f (\<Sqinter>\<^bsub>fpl L f\<^esub>A)" | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1161 | by (metis (no_types, lifting) FA L.sym L.use_fps L.weak_complete_lattice_axioms PiE assms(4) infA subsetCE weak_complete_lattice_def weak_partial_order.weak_refl) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1162 | |
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1163 | show ?thesis | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1164 | using FA fA infA by (auto intro!: L.le_trans[OF 2 1] ic fc, metis FA PiE assms(4) subsetCE) | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1165 | qed | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1166 | qed | 
| 
85925d4ae93d
Additional corollary Knaster_Tarski_idem_inf_eq.
 ballarin parents: 
65099diff
changeset | 1167 | qed | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1168 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1169 | subsection \<open>Examples\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1170 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1171 | subsubsection \<open>The Powerset of a Set is a Complete Lattice\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1172 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1173 | theorem powerset_is_complete_lattice: | 
| 67399 | 1174 | "complete_lattice \<lparr>carrier = Pow A, eq = (=), le = (\<subseteq>)\<rparr>" | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1175 | (is "complete_lattice ?L") | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1176 | proof (rule partial_order.complete_latticeI) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1177 | show "partial_order ?L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1178 | by standard auto | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1179 | next | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1180 | fix B | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1181 | assume "B \<subseteq> carrier ?L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1182 | then have "least ?L (\<Union> B) (Upper ?L B)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1183 | by (fastforce intro!: least_UpperI simp: Upper_def) | 
| 67091 | 1184 | then show "\<exists>s. least ?L s (Upper ?L B)" .. | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1185 | next | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1186 | fix B | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1187 | assume "B \<subseteq> carrier ?L" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1188 | then have "greatest ?L (\<Inter> B \<inter> A) (Lower ?L B)" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1189 |     txt \<open>@{term "\<Inter> B"} is not the infimum of @{term B}:
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1190 |       @{term "\<Inter> {} = UNIV"} which is in general bigger than @{term "A"}! \<close>
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1191 | by (fastforce intro!: greatest_LowerI simp: Lower_def) | 
| 67091 | 1192 | then show "\<exists>i. greatest ?L i (Lower ?L B)" .. | 
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1193 | qed | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1194 | |
| 66579 | 1195 | text \<open>Another example, that of the lattice of subgroups of a group, | 
| 1196 |   can be found in Group theory (Section~\ref{sec:subgroup-lattice}).\<close>
 | |
| 65099 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1197 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1198 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1199 | subsection \<open>Limit preserving functions\<close> | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1200 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1201 | definition weak_sup_pres :: "('a, 'c) gorder_scheme \<Rightarrow> ('b, 'd) gorder_scheme \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool" where
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1202 | "weak_sup_pres X Y f \<equiv> complete_lattice X \<and> complete_lattice Y \<and> (\<forall> A \<subseteq> carrier X. A \<noteq> {} \<longrightarrow> f (\<Squnion>\<^bsub>X\<^esub> A) = (\<Squnion>\<^bsub>Y\<^esub> (f ` A)))"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1203 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1204 | definition sup_pres :: "('a, 'c) gorder_scheme \<Rightarrow> ('b, 'd) gorder_scheme \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool" where
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1205 | "sup_pres X Y f \<equiv> complete_lattice X \<and> complete_lattice Y \<and> (\<forall> A \<subseteq> carrier X. f (\<Squnion>\<^bsub>X\<^esub> A) = (\<Squnion>\<^bsub>Y\<^esub> (f ` A)))" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1206 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1207 | definition weak_inf_pres :: "('a, 'c) gorder_scheme \<Rightarrow> ('b, 'd) gorder_scheme \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool" where
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1208 | "weak_inf_pres X Y f \<equiv> complete_lattice X \<and> complete_lattice Y \<and> (\<forall> A \<subseteq> carrier X. A \<noteq> {} \<longrightarrow> f (\<Sqinter>\<^bsub>X\<^esub> A) = (\<Sqinter>\<^bsub>Y\<^esub> (f ` A)))"
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1209 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1210 | definition inf_pres :: "('a, 'c) gorder_scheme \<Rightarrow> ('b, 'd) gorder_scheme \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> bool" where
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1211 | "inf_pres X Y f \<equiv> complete_lattice X \<and> complete_lattice Y \<and> (\<forall> A \<subseteq> carrier X. f (\<Sqinter>\<^bsub>X\<^esub> A) = (\<Sqinter>\<^bsub>Y\<^esub> (f ` A)))" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1212 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1213 | lemma weak_sup_pres: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1214 | "sup_pres X Y f \<Longrightarrow> weak_sup_pres X Y f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1215 | by (simp add: sup_pres_def weak_sup_pres_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1216 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1217 | lemma weak_inf_pres: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1218 | "inf_pres X Y f \<Longrightarrow> weak_inf_pres X Y f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1219 | by (simp add: inf_pres_def weak_inf_pres_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1220 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1221 | lemma sup_pres_is_join_pres: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1222 | assumes "weak_sup_pres X Y f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1223 | shows "join_pres X Y f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1224 | using assms | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1225 | apply (simp add: join_pres_def weak_sup_pres_def, safe) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1226 | apply (rename_tac x y) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1227 |   apply (drule_tac x="{x, y}" in spec)
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1228 | apply (auto simp add: join_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1229 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1230 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1231 | lemma inf_pres_is_meet_pres: | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1232 | assumes "weak_inf_pres X Y f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1233 | shows "meet_pres X Y f" | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1234 | using assms | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1235 | apply (simp add: meet_pres_def weak_inf_pres_def, safe) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1236 | apply (rename_tac x y) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1237 |   apply (drule_tac x="{x, y}" in spec)
 | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1238 | apply (auto simp add: meet_def) | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1239 | done | 
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1240 | |
| 
30d0b2f1df76
Knaster-Tarski fixed point theorem and Galois Connections.
 ballarin parents: diff
changeset | 1241 | end |