author | haftmann |
Thu, 19 Jun 2025 17:15:40 +0200 | |
changeset 82734 | 89347c0cc6a3 |
parent 82248 | e8c96013ea8a |
permissions | -rw-r--r-- |
13383 | 1 |
(* Title: HOL/ex/Tarski.thy |
40945 | 2 |
Author: Florian Kammüller, Cambridge University Computer Laboratory |
13383 | 3 |
*) |
7112 | 4 |
|
61343 | 5 |
section \<open>The Full Theorem of Tarski\<close> |
7112 | 6 |
|
27681 | 7 |
theory Tarski |
68188
2af1f142f855
move FuncSet back to HOL-Library (amending 493b818e8e10)
immler
parents:
68072
diff
changeset
|
8 |
imports Main "HOL-Library.FuncSet" |
27681 | 9 |
begin |
7112 | 10 |
|
61343 | 11 |
text \<open> |
13383 | 12 |
Minimal version of lattice theory plus the full theorem of Tarski: |
13 |
The fixedpoints of a complete lattice themselves form a complete |
|
14 |
lattice. |
|
15 |
||
16 |
Illustrates first-class theories, using the Sigma representation of |
|
17 |
structures. Tidied and converted to Isar by lcp. |
|
61343 | 18 |
\<close> |
13383 | 19 |
|
20 |
record 'a potype = |
|
7112 | 21 |
pset :: "'a set" |
64915 | 22 |
order :: "('a \<times> 'a) set" |
7112 | 23 |
|
64915 | 24 |
definition monotone :: "['a \<Rightarrow> 'a, 'a set, ('a \<times> 'a) set] \<Rightarrow> bool" |
25 |
where "monotone f A r \<longleftrightarrow> (\<forall>x\<in>A. \<forall>y\<in>A. (x, y) \<in> r \<longrightarrow> (f x, f y) \<in> r)" |
|
7112 | 26 |
|
64915 | 27 |
definition least :: "['a \<Rightarrow> bool, 'a potype] \<Rightarrow> 'a" |
28 |
where "least P po = (SOME x. x \<in> pset po \<and> P x \<and> (\<forall>y \<in> pset po. P y \<longrightarrow> (x, y) \<in> order po))" |
|
7112 | 29 |
|
64915 | 30 |
definition greatest :: "['a \<Rightarrow> bool, 'a potype] \<Rightarrow> 'a" |
31 |
where "greatest P po = (SOME x. x \<in> pset po \<and> P x \<and> (\<forall>y \<in> pset po. P y \<longrightarrow> (y, x) \<in> order po))" |
|
7112 | 32 |
|
64915 | 33 |
definition lub :: "['a set, 'a potype] \<Rightarrow> 'a" |
34 |
where "lub S po = least (\<lambda>x. \<forall>y\<in>S. (y, x) \<in> order po) po" |
|
7112 | 35 |
|
64915 | 36 |
definition glb :: "['a set, 'a potype] \<Rightarrow> 'a" |
37 |
where "glb S po = greatest (\<lambda>x. \<forall>y\<in>S. (x, y) \<in> order po) po" |
|
7112 | 38 |
|
64915 | 39 |
definition isLub :: "['a set, 'a potype, 'a] \<Rightarrow> bool" |
40 |
where "isLub S po = |
|
41 |
(\<lambda>L. L \<in> pset po \<and> (\<forall>y\<in>S. (y, L) \<in> order po) \<and> |
|
42 |
(\<forall>z\<in>pset po. (\<forall>y\<in>S. (y, z) \<in> order po) \<longrightarrow> (L, z) \<in> order po))" |
|
7112 | 43 |
|
64915 | 44 |
definition isGlb :: "['a set, 'a potype, 'a] \<Rightarrow> bool" |
45 |
where "isGlb S po = |
|
46 |
(\<lambda>G. (G \<in> pset po \<and> (\<forall>y\<in>S. (G, y) \<in> order po) \<and> |
|
47 |
(\<forall>z \<in> pset po. (\<forall>y\<in>S. (z, y) \<in> order po) \<longrightarrow> (z, G) \<in> order po)))" |
|
7112 | 48 |
|
64915 | 49 |
definition "fix" :: "['a \<Rightarrow> 'a, 'a set] \<Rightarrow> 'a set" |
50 |
where "fix f A = {x. x \<in> A \<and> f x = x}" |
|
7112 | 51 |
|
64915 | 52 |
definition interval :: "[('a \<times> 'a) set, 'a, 'a] \<Rightarrow> 'a set" |
53 |
where "interval r a b = {x. (a, x) \<in> r \<and> (x, b) \<in> r}" |
|
7112 | 54 |
|
64915 | 55 |
definition Bot :: "'a potype \<Rightarrow> 'a" |
56 |
where "Bot po = least (\<lambda>x. True) po" |
|
7112 | 57 |
|
64915 | 58 |
definition Top :: "'a potype \<Rightarrow> 'a" |
59 |
where "Top po = greatest (\<lambda>x. True) po" |
|
7112 | 60 |
|
64915 | 61 |
definition PartialOrder :: "'a potype set" |
82248 | 62 |
where "PartialOrder = {P. order P \<subseteq> pset P \<times> pset P \<and> |
63 |
refl_on (pset P) (order P) \<and> antisym (order P) \<and> trans (order P)}" |
|
7112 | 64 |
|
64915 | 65 |
definition CompleteLattice :: "'a potype set" |
66 |
where "CompleteLattice = |
|
67 |
{cl. cl \<in> PartialOrder \<and> |
|
68 |
(\<forall>S. S \<subseteq> pset cl \<longrightarrow> (\<exists>L. isLub S cl L)) \<and> |
|
69 |
(\<forall>S. S \<subseteq> pset cl \<longrightarrow> (\<exists>G. isGlb S cl G))}" |
|
7112 | 70 |
|
64915 | 71 |
definition CLF_set :: "('a potype \<times> ('a \<Rightarrow> 'a)) set" |
72 |
where "CLF_set = |
|
73 |
(SIGMA cl : CompleteLattice. |
|
74 |
{f. f \<in> pset cl \<rightarrow> pset cl \<and> monotone f (pset cl) (order cl)})" |
|
13383 | 75 |
|
64915 | 76 |
definition induced :: "['a set, ('a \<times> 'a) set] \<Rightarrow> ('a \<times> 'a) set" |
77 |
where "induced A r = {(a, b). a \<in> A \<and> b \<in> A \<and> (a, b) \<in> r}" |
|
7112 | 78 |
|
64915 | 79 |
definition sublattice :: "('a potype \<times> 'a set) set" |
80 |
where "sublattice = |
|
81 |
(SIGMA cl : CompleteLattice. |
|
82 |
{S. S \<subseteq> pset cl \<and> \<lparr>pset = S, order = induced S (order cl)\<rparr> \<in> CompleteLattice})" |
|
7112 | 83 |
|
80914
d97fdabd9e2b
standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents:
70202
diff
changeset
|
84 |
abbreviation sublat :: "['a set, 'a potype] \<Rightarrow> bool" (\<open>_ <<= _\<close> [51, 50] 50) |
64915 | 85 |
where "S <<= cl \<equiv> S \<in> sublattice `` {cl}" |
7112 | 86 |
|
64915 | 87 |
definition dual :: "'a potype \<Rightarrow> 'a potype" |
88 |
where "dual po = \<lparr>pset = pset po, order = converse (order po)\<rparr>" |
|
7112 | 89 |
|
27681 | 90 |
locale S = |
13115 | 91 |
fixes cl :: "'a potype" |
64915 | 92 |
and A :: "'a set" |
93 |
and r :: "('a \<times> 'a) set" |
|
94 |
defines A_def: "A \<equiv> pset cl" |
|
95 |
and r_def: "r \<equiv> order cl" |
|
7112 | 96 |
|
27681 | 97 |
locale PO = S + |
64915 | 98 |
assumes cl_po: "cl \<in> PartialOrder" |
27681 | 99 |
|
100 |
locale CL = S + |
|
64915 | 101 |
assumes cl_co: "cl \<in> CompleteLattice" |
7112 | 102 |
|
61565
352c73a689da
Qualifiers in locale expressions default to mandatory regardless of the command.
ballarin
parents:
61384
diff
changeset
|
103 |
sublocale CL < po?: PO |
70194 | 104 |
unfolding A_def r_def |
105 |
using CompleteLattice_def PO.intro cl_co by fastforce |
|
27681 | 106 |
|
107 |
locale CLF = S + |
|
64915 | 108 |
fixes f :: "'a \<Rightarrow> 'a" |
13115 | 109 |
and P :: "'a set" |
70194 | 110 |
assumes f_cl: "(cl, f) \<in> CLF_set" |
64915 | 111 |
defines P_def: "P \<equiv> fix f A" |
7112 | 112 |
|
61565
352c73a689da
Qualifiers in locale expressions default to mandatory regardless of the command.
ballarin
parents:
61384
diff
changeset
|
113 |
sublocale CLF < cl?: CL |
70194 | 114 |
unfolding A_def r_def CL_def |
115 |
using CLF_set_def f_cl by blast |
|
7112 | 116 |
|
27681 | 117 |
locale Tarski = CLF + |
64915 | 118 |
fixes Y :: "'a set" |
13115 | 119 |
and intY1 :: "'a set" |
64915 | 120 |
and v :: "'a" |
121 |
assumes Y_ss: "Y \<subseteq> P" |
|
122 |
defines intY1_def: "intY1 \<equiv> interval r (lub Y cl) (Top cl)" |
|
123 |
and v_def: "v \<equiv> |
|
124 |
glb {x. ((\<lambda>x \<in> intY1. f x) x, x) \<in> induced intY1 r \<and> x \<in> intY1} |
|
125 |
\<lparr>pset = intY1, order = induced intY1 r\<rparr>" |
|
13115 | 126 |
|
127 |
||
61343 | 128 |
subsection \<open>Partial Order\<close> |
13115 | 129 |
|
64916 | 130 |
context PO |
131 |
begin |
|
132 |
||
133 |
lemma dual: "PO (dual cl)" |
|
70194 | 134 |
proof |
135 |
show "dual cl \<in> PartialOrder" |
|
136 |
using cl_po unfolding PartialOrder_def dual_def by auto |
|
137 |
qed |
|
27681 | 138 |
|
64916 | 139 |
lemma PO_imp_refl_on [simp]: "refl_on A r" |
64915 | 140 |
using cl_po by (simp add: PartialOrder_def A_def r_def) |
13115 | 141 |
|
64916 | 142 |
lemma PO_imp_sym [simp]: "antisym r" |
64915 | 143 |
using cl_po by (simp add: PartialOrder_def r_def) |
13115 | 144 |
|
64916 | 145 |
lemma PO_imp_trans [simp]: "trans r" |
64915 | 146 |
using cl_po by (simp add: PartialOrder_def r_def) |
13115 | 147 |
|
64916 | 148 |
lemma reflE: "x \<in> A \<Longrightarrow> (x, x) \<in> r" |
64915 | 149 |
using cl_po by (simp add: PartialOrder_def refl_on_def A_def r_def) |
13115 | 150 |
|
64916 | 151 |
lemma antisymE: "\<lbrakk>(a, b) \<in> r; (b, a) \<in> r\<rbrakk> \<Longrightarrow> a = b" |
64915 | 152 |
using cl_po by (simp add: PartialOrder_def antisym_def r_def) |
13115 | 153 |
|
64916 | 154 |
lemma transE: "\<lbrakk>(a, b) \<in> r; (b, c) \<in> r\<rbrakk> \<Longrightarrow> (a, c) \<in> r" |
64915 | 155 |
using cl_po by (simp add: PartialOrder_def r_def) (unfold trans_def, fast) |
13115 | 156 |
|
64916 | 157 |
lemma monotoneE: "\<lbrakk>monotone f A r; x \<in> A; y \<in> A; (x, y) \<in> r\<rbrakk> \<Longrightarrow> (f x, f y) \<in> r" |
64915 | 158 |
by (simp add: monotone_def) |
13115 | 159 |
|
70194 | 160 |
lemma po_subset_po: |
161 |
assumes "S \<subseteq> A" shows "\<lparr>pset = S, order = induced S r\<rparr> \<in> PartialOrder" |
|
162 |
proof - |
|
82248 | 163 |
have "induced S r \<subseteq> S \<times> S" |
164 |
by (metis (lifting) BNF_Def.Collect_case_prodD induced_def mem_Sigma_iff |
|
165 |
prod.sel subrelI) |
|
166 |
moreover |
|
70194 | 167 |
have "refl_on S (induced S r)" |
168 |
using \<open>S \<subseteq> A\<close> by (auto simp: refl_on_def induced_def intro: reflE) |
|
169 |
moreover |
|
170 |
have "antisym (induced S r)" |
|
171 |
by (auto simp add: antisym_def induced_def intro: antisymE) |
|
172 |
moreover |
|
173 |
have "trans (induced S r)" |
|
174 |
by (auto simp add: trans_def induced_def intro: transE) |
|
175 |
ultimately show ?thesis |
|
176 |
by (simp add: PartialOrder_def) |
|
177 |
qed |
|
13115 | 178 |
|
64916 | 179 |
lemma indE: "\<lbrakk>(x, y) \<in> induced S r; S \<subseteq> A\<rbrakk> \<Longrightarrow> (x, y) \<in> r" |
64915 | 180 |
by (simp add: induced_def) |
13115 | 181 |
|
64916 | 182 |
lemma indI: "\<lbrakk>(x, y) \<in> r; x \<in> S; y \<in> S\<rbrakk> \<Longrightarrow> (x, y) \<in> induced S r" |
64915 | 183 |
by (simp add: induced_def) |
13115 | 184 |
|
64916 | 185 |
end |
186 |
||
64915 | 187 |
lemma (in CL) CL_imp_ex_isLub: "S \<subseteq> A \<Longrightarrow> \<exists>L. isLub S cl L" |
188 |
using cl_co by (simp add: CompleteLattice_def A_def) |
|
13115 | 189 |
|
190 |
declare (in CL) cl_co [simp] |
|
191 |
||
64915 | 192 |
lemma isLub_lub: "(\<exists>L. isLub S cl L) \<longleftrightarrow> isLub S cl (lub S cl)" |
193 |
by (simp add: lub_def least_def isLub_def some_eq_ex [symmetric]) |
|
13115 | 194 |
|
64915 | 195 |
lemma isGlb_glb: "(\<exists>G. isGlb S cl G) \<longleftrightarrow> isGlb S cl (glb S cl)" |
196 |
by (simp add: glb_def greatest_def isGlb_def some_eq_ex [symmetric]) |
|
13115 | 197 |
|
198 |
lemma isGlb_dual_isLub: "isGlb S cl = isLub S (dual cl)" |
|
64915 | 199 |
by (simp add: isLub_def isGlb_def dual_def converse_unfold) |
13115 | 200 |
|
201 |
lemma isLub_dual_isGlb: "isLub S cl = isGlb S (dual cl)" |
|
64915 | 202 |
by (simp add: isLub_def isGlb_def dual_def converse_unfold) |
13115 | 203 |
|
204 |
lemma (in PO) dualPO: "dual cl \<in> PartialOrder" |
|
82248 | 205 |
using cl_po by (simp add: PartialOrder_def dual_def converse_Times flip: converse_subset_swap) |
13115 | 206 |
|
207 |
lemma Rdual: |
|
70194 | 208 |
assumes major: "\<And>S. S \<subseteq> A \<Longrightarrow> \<exists>L. isLub S po L" and "S \<subseteq> A" and "A = pset po" |
209 |
shows "\<exists>G. isGlb S po G" |
|
210 |
proof |
|
211 |
show "isGlb S po (lub {y \<in> A. \<forall>k\<in>S. (y, k) \<in> order po} po)" |
|
212 |
using major [of "{y. y \<in> A \<and> (\<forall>k \<in> S. (y, k) \<in> order po)}"] \<open>S \<subseteq> A\<close> \<open>A = pset po\<close> |
|
213 |
apply (simp add: isLub_lub isGlb_def) |
|
214 |
apply (auto simp add: isLub_def) |
|
215 |
done |
|
216 |
qed |
|
13115 | 217 |
|
218 |
lemma lub_dual_glb: "lub S cl = glb S (dual cl)" |
|
64915 | 219 |
by (simp add: lub_def glb_def least_def greatest_def dual_def converse_unfold) |
13115 | 220 |
|
221 |
lemma glb_dual_lub: "glb S cl = lub S (dual cl)" |
|
64915 | 222 |
by (simp add: lub_def glb_def least_def greatest_def dual_def converse_unfold) |
13115 | 223 |
|
17841 | 224 |
lemma CL_subset_PO: "CompleteLattice \<subseteq> PartialOrder" |
64915 | 225 |
by (auto simp: PartialOrder_def CompleteLattice_def) |
13115 | 226 |
|
227 |
lemmas CL_imp_PO = CL_subset_PO [THEN subsetD] |
|
228 |
||
64916 | 229 |
context CL |
230 |
begin |
|
231 |
||
232 |
lemma CO_refl_on: "refl_on A r" |
|
64915 | 233 |
by (rule PO_imp_refl_on) |
13115 | 234 |
|
64916 | 235 |
lemma CO_antisym: "antisym r" |
64915 | 236 |
by (rule PO_imp_sym) |
13115 | 237 |
|
64916 | 238 |
lemma CO_trans: "trans r" |
64915 | 239 |
by (rule PO_imp_trans) |
13115 | 240 |
|
64916 | 241 |
end |
242 |
||
13115 | 243 |
lemma CompleteLatticeI: |
64915 | 244 |
"\<lbrakk>po \<in> PartialOrder; \<forall>S. S \<subseteq> pset po \<longrightarrow> (\<exists>L. isLub S po L); |
64916 | 245 |
\<forall>S. S \<subseteq> pset po \<longrightarrow> (\<exists>G. isGlb S po G)\<rbrakk> |
64915 | 246 |
\<Longrightarrow> po \<in> CompleteLattice" |
247 |
unfolding CompleteLattice_def by blast |
|
13115 | 248 |
|
249 |
lemma (in CL) CL_dualCL: "dual cl \<in> CompleteLattice" |
|
64915 | 250 |
using cl_co |
251 |
apply (simp add: CompleteLattice_def dual_def) |
|
70194 | 252 |
apply (simp add: dualPO flip: dual_def isLub_dual_isGlb isGlb_dual_isLub) |
64915 | 253 |
done |
13115 | 254 |
|
64916 | 255 |
context PO |
256 |
begin |
|
257 |
||
70194 | 258 |
lemma dualA_iff [simp]: "pset (dual cl) = pset cl" |
64915 | 259 |
by (simp add: dual_def) |
13115 | 260 |
|
70194 | 261 |
lemma dualr_iff [simp]: "(x, y) \<in> (order (dual cl)) \<longleftrightarrow> (y, x) \<in> order cl" |
64915 | 262 |
by (simp add: dual_def) |
13115 | 263 |
|
64916 | 264 |
lemma monotone_dual: |
64915 | 265 |
"monotone f (pset cl) (order cl) \<Longrightarrow> monotone f (pset (dual cl)) (order(dual cl))" |
70194 | 266 |
by (simp add: monotone_def) |
13115 | 267 |
|
64916 | 268 |
lemma interval_dual: "\<lbrakk>x \<in> A; y \<in> A\<rbrakk> \<Longrightarrow> interval r x y = interval (order(dual cl)) y x" |
70194 | 269 |
unfolding interval_def dualr_iff by (auto simp flip: r_def) |
13115 | 270 |
|
64916 | 271 |
lemma interval_not_empty: "interval r a b \<noteq> {} \<Longrightarrow> (a, b) \<in> r" |
70194 | 272 |
by (simp add: interval_def) (use transE in blast) |
64915 | 273 |
|
64916 | 274 |
lemma interval_imp_mem: "x \<in> interval r a b \<Longrightarrow> (a, x) \<in> r" |
64915 | 275 |
by (simp add: interval_def) |
13115 | 276 |
|
64916 | 277 |
lemma left_in_interval: "\<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> a \<in> interval r a b" |
70194 | 278 |
using interval_def interval_not_empty reflE by fastforce |
13115 | 279 |
|
64916 | 280 |
lemma right_in_interval: "\<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> b \<in> interval r a b" |
70194 | 281 |
by (simp add: A_def PO.dual PO.left_in_interval PO_axioms interval_dual) |
13115 | 282 |
|
64916 | 283 |
end |
284 |
||
13383 | 285 |
|
61343 | 286 |
subsection \<open>sublattice\<close> |
13383 | 287 |
|
13115 | 288 |
lemma (in PO) sublattice_imp_CL: |
64915 | 289 |
"S <<= cl \<Longrightarrow> \<lparr>pset = S, order = induced S r\<rparr> \<in> CompleteLattice" |
290 |
by (simp add: sublattice_def CompleteLattice_def r_def) |
|
13115 | 291 |
|
292 |
lemma (in CL) sublatticeI: |
|
64915 | 293 |
"\<lbrakk>S \<subseteq> A; \<lparr>pset = S, order = induced S r\<rparr> \<in> CompleteLattice\<rbrakk> \<Longrightarrow> S <<= cl" |
294 |
by (simp add: sublattice_def A_def r_def) |
|
13115 | 295 |
|
64915 | 296 |
lemma (in CL) dual: "CL (dual cl)" |
70194 | 297 |
proof |
298 |
show "dual cl \<in> CompleteLattice" |
|
64915 | 299 |
using cl_co |
70194 | 300 |
by (simp add: CompleteLattice_def dualPO flip: isGlb_dual_isLub isLub_dual_isGlb) |
301 |
qed |
|
13383 | 302 |
|
61343 | 303 |
subsection \<open>lub\<close> |
13383 | 304 |
|
64916 | 305 |
context CL |
306 |
begin |
|
307 |
||
308 |
lemma lub_unique: "\<lbrakk>S \<subseteq> A; isLub S cl x; isLub S cl L\<rbrakk> \<Longrightarrow> x = L" |
|
64915 | 309 |
by (rule antisymE) (auto simp add: isLub_def r_def) |
13115 | 310 |
|
70194 | 311 |
lemma lub_upper: |
312 |
assumes "S \<subseteq> A" "x \<in> S" shows "(x, lub S cl) \<in> r" |
|
313 |
proof - |
|
314 |
obtain L where "isLub S cl L" |
|
315 |
using CL_imp_ex_isLub \<open>S \<subseteq> A\<close> by auto |
|
316 |
then show ?thesis |
|
317 |
by (metis assms(2) isLub_def isLub_lub r_def) |
|
318 |
qed |
|
13115 | 319 |
|
70194 | 320 |
lemma lub_least: |
321 |
assumes "S \<subseteq> A" and L: "L \<in> A" "\<forall>x \<in> S. (x, L) \<in> r" shows "(lub S cl, L) \<in> r" |
|
322 |
proof - |
|
323 |
obtain L' where "isLub S cl L'" |
|
324 |
using CL_imp_ex_isLub \<open>S \<subseteq> A\<close> by auto |
|
325 |
then show ?thesis |
|
326 |
by (metis A_def L isLub_def isLub_lub r_def) |
|
327 |
qed |
|
13115 | 328 |
|
70194 | 329 |
lemma lub_in_lattice: |
330 |
assumes "S \<subseteq> A" shows "lub S cl \<in> A" |
|
331 |
proof - |
|
332 |
obtain L where "isLub S cl L" |
|
333 |
using CL_imp_ex_isLub \<open>S \<subseteq> A\<close> by auto |
|
334 |
then show ?thesis |
|
335 |
by (metis A_def isLub_def isLub_lub) |
|
336 |
qed |
|
13115 | 337 |
|
64916 | 338 |
lemma lubI: |
70194 | 339 |
assumes A: "S \<subseteq> A" "L \<in> A" and r: "\<forall>x \<in> S. (x, L) \<in> r" |
340 |
and clo: "\<And>z. \<lbrakk>z \<in> A; (\<forall>y \<in> S. (y, z) \<in> r)\<rbrakk> \<Longrightarrow> (L, z) \<in> r" |
|
341 |
shows "L = lub S cl" |
|
342 |
proof - |
|
343 |
obtain L where "isLub S cl L" |
|
344 |
using CL_imp_ex_isLub assms(1) by auto |
|
345 |
then show ?thesis |
|
346 |
by (simp add: antisymE A clo lub_in_lattice lub_least lub_upper r) |
|
347 |
qed |
|
13115 | 348 |
|
64916 | 349 |
lemma lubIa: "\<lbrakk>S \<subseteq> A; isLub S cl L\<rbrakk> \<Longrightarrow> L = lub S cl" |
70194 | 350 |
by (meson isLub_lub lub_unique) |
13115 | 351 |
|
64916 | 352 |
lemma isLub_in_lattice: "isLub S cl L \<Longrightarrow> L \<in> A" |
64915 | 353 |
by (simp add: isLub_def A_def) |
13115 | 354 |
|
64916 | 355 |
lemma isLub_upper: "\<lbrakk>isLub S cl L; y \<in> S\<rbrakk> \<Longrightarrow> (y, L) \<in> r" |
64915 | 356 |
by (simp add: isLub_def r_def) |
13115 | 357 |
|
64916 | 358 |
lemma isLub_least: "\<lbrakk>isLub S cl L; z \<in> A; \<forall>y \<in> S. (y, z) \<in> r\<rbrakk> \<Longrightarrow> (L, z) \<in> r" |
64915 | 359 |
by (simp add: isLub_def A_def r_def) |
13115 | 360 |
|
64916 | 361 |
lemma isLubI: |
67613 | 362 |
"\<lbrakk>L \<in> A; \<forall>y \<in> S. (y, L) \<in> r; (\<forall>z \<in> A. (\<forall>y \<in> S. (y, z)\<in>r) \<longrightarrow> (L, z) \<in> r)\<rbrakk> \<Longrightarrow> isLub S cl L" |
64915 | 363 |
by (simp add: isLub_def A_def r_def) |
13115 | 364 |
|
64916 | 365 |
end |
366 |
||
13383 | 367 |
|
61343 | 368 |
subsection \<open>glb\<close> |
13383 | 369 |
|
64916 | 370 |
context CL |
371 |
begin |
|
372 |
||
373 |
lemma glb_in_lattice: "S \<subseteq> A \<Longrightarrow> glb S cl \<in> A" |
|
70194 | 374 |
by (metis A_def CL.lub_in_lattice dualA_iff glb_dual_lub local.dual) |
13115 | 375 |
|
64916 | 376 |
lemma glb_lower: "\<lbrakk>S \<subseteq> A; x \<in> S\<rbrakk> \<Longrightarrow> (glb S cl, x) \<in> r" |
70194 | 377 |
by (metis A_def CL.lub_upper dualA_iff dualr_iff glb_dual_lub local.dual r_def) |
13115 | 378 |
|
64916 | 379 |
end |
380 |
||
61343 | 381 |
text \<open> |
13383 | 382 |
Reduce the sublattice property by using substructural properties; |
61933 | 383 |
abandoned see \<open>Tarski_4.ML\<close>. |
61343 | 384 |
\<close> |
13115 | 385 |
|
64916 | 386 |
context CLF |
387 |
begin |
|
388 |
||
389 |
lemma [simp]: "f \<in> pset cl \<rightarrow> pset cl \<and> monotone f (pset cl) (order cl)" |
|
64915 | 390 |
using f_cl by (simp add: CLF_set_def) |
13115 | 391 |
|
64916 | 392 |
declare f_cl [simp] |
13115 | 393 |
|
394 |
||
64916 | 395 |
lemma f_in_funcset: "f \<in> A \<rightarrow> A" |
64915 | 396 |
by (simp add: A_def) |
13115 | 397 |
|
64916 | 398 |
lemma monotone_f: "monotone f A r" |
64915 | 399 |
by (simp add: A_def r_def) |
13115 | 400 |
|
64916 | 401 |
lemma CLF_dual: "(dual cl, f) \<in> CLF_set" |
70194 | 402 |
proof - |
403 |
have "Tarski.monotone f A (order (dual cl))" |
|
404 |
by (metis (no_types) A_def PO.monotone_dual PO_axioms dualA_iff monotone_f r_def) |
|
405 |
then show ?thesis |
|
406 |
by (simp add: A_def CLF_set_def CL_dualCL) |
|
407 |
qed |
|
13115 | 408 |
|
64916 | 409 |
lemma dual: "CLF (dual cl) f" |
64915 | 410 |
by (rule CLF.intro) (rule CLF_dual) |
27681 | 411 |
|
64916 | 412 |
end |
413 |
||
13383 | 414 |
|
61343 | 415 |
subsection \<open>fixed points\<close> |
13383 | 416 |
|
17841 | 417 |
lemma fix_subset: "fix f A \<subseteq> A" |
64915 | 418 |
by (auto simp: fix_def) |
13115 | 419 |
|
64915 | 420 |
lemma fix_imp_eq: "x \<in> fix f A \<Longrightarrow> f x = x" |
421 |
by (simp add: fix_def) |
|
13115 | 422 |
|
64915 | 423 |
lemma fixf_subset: "\<lbrakk>A \<subseteq> B; x \<in> fix (\<lambda>y \<in> A. f y) A\<rbrakk> \<Longrightarrow> x \<in> fix f B" |
424 |
by (auto simp: fix_def) |
|
13115 | 425 |
|
13383 | 426 |
|
61343 | 427 |
subsection \<open>lemmas for Tarski, lub\<close> |
64915 | 428 |
|
64916 | 429 |
context CLF |
430 |
begin |
|
431 |
||
70194 | 432 |
lemma lubH_le_flubH: |
433 |
assumes "H = {x \<in> A. (x, f x) \<in> r}" |
|
434 |
shows "(lub H cl, f (lub H cl)) \<in> r" |
|
435 |
proof (intro lub_least ballI) |
|
436 |
show "H \<subseteq> A" |
|
437 |
using assms |
|
438 |
by auto |
|
439 |
show "f (lub H cl) \<in> A" |
|
440 |
using \<open>H \<subseteq> A\<close> f_in_funcset lub_in_lattice by auto |
|
441 |
show "(x, f (lub H cl)) \<in> r" if "x \<in> H" for x |
|
442 |
proof - |
|
443 |
have "(f x, f (lub H cl)) \<in> r" |
|
444 |
by (meson \<open>H \<subseteq> A\<close> in_mono lub_in_lattice lub_upper monotoneE monotone_f that) |
|
445 |
moreover have "(x, f x) \<in> r" |
|
446 |
using assms that by blast |
|
447 |
ultimately show ?thesis |
|
448 |
using po.transE by blast |
|
449 |
qed |
|
450 |
qed |
|
13115 | 451 |
|
70202 | 452 |
lemma lubH_is_fixp: |
70194 | 453 |
assumes "H = {x \<in> A. (x, f x) \<in> r}" |
70202 | 454 |
shows "lub H cl \<in> fix f A" |
70194 | 455 |
proof - |
70202 | 456 |
have "(f (lub H cl), lub H cl) \<in> r" |
457 |
proof - |
|
458 |
have "(lub H cl, f (lub H cl)) \<in> r" |
|
459 |
using assms lubH_le_flubH by blast |
|
460 |
then have "(f (lub H cl), f (f (lub H cl))) \<in> r" |
|
82248 | 461 |
by (metis (lifting) PiE assms f_in_funcset lub_in_lattice mem_Collect_eq |
462 |
monotoneE monotone_f subsetI) |
|
70202 | 463 |
then have "f (lub H cl) \<in> H" |
82248 | 464 |
using assms f_in_funcset lub_in_lattice by auto |
70202 | 465 |
then show ?thesis |
466 |
by (simp add: assms lub_upper) |
|
467 |
qed |
|
468 |
with assms show ?thesis |
|
469 |
by (simp add: fix_def antisymE lubH_le_flubH lub_in_lattice) |
|
70194 | 470 |
qed |
13115 | 471 |
|
70202 | 472 |
lemma fixf_le_lubH: |
473 |
assumes "H = {x \<in> A. (x, f x) \<in> r}" "x \<in> fix f A" |
|
474 |
shows "(x, lub H cl) \<in> r" |
|
475 |
proof - |
|
476 |
have "x \<in> P \<Longrightarrow> x \<in> H" |
|
477 |
by (simp add: assms P_def fix_imp_eq [of _ f A] reflE fix_subset [of f A, THEN subsetD]) |
|
478 |
with assms show ?thesis |
|
479 |
by (metis (no_types, lifting) P_def lub_upper mem_Collect_eq subset_eq) |
|
480 |
qed |
|
13115 | 481 |
|
64916 | 482 |
|
61343 | 483 |
subsection \<open>Tarski fixpoint theorem 1, first part\<close> |
64916 | 484 |
|
70194 | 485 |
lemma T_thm_1_lub: "lub P cl = lub {x \<in> A. (x, f x) \<in> r} cl" |
486 |
proof - |
|
487 |
have "lub {x \<in> A. (x, f x) \<in> r} cl = lub (fix f A) cl" |
|
488 |
proof (rule antisymE) |
|
489 |
show "(lub {x \<in> A. (x, f x) \<in> r} cl, lub (fix f A) cl) \<in> r" |
|
490 |
by (simp add: fix_subset lubH_is_fixp lub_upper) |
|
491 |
have "\<And>a. a \<in> fix f A \<Longrightarrow> a \<in> A" |
|
492 |
by (meson fix_subset subset_iff) |
|
493 |
then show "(lub (fix f A) cl, lub {x \<in> A. (x, f x) \<in> r} cl) \<in> r" |
|
494 |
by (simp add: fix_subset fixf_le_lubH lubH_is_fixp lub_least) |
|
495 |
qed |
|
496 |
then show ?thesis |
|
497 |
using P_def by auto |
|
498 |
qed |
|
13115 | 499 |
|
70194 | 500 |
lemma glbH_is_fixp: |
501 |
assumes "H = {x \<in> A. (f x, x) \<in> r}" shows "glb H cl \<in> P" |
|
61933 | 502 |
\<comment> \<open>Tarski for glb\<close> |
70194 | 503 |
proof - |
504 |
have "glb H cl \<in> fix f (pset (dual cl))" |
|
505 |
using assms CLF.lubH_is_fixp [OF dual] PO.dualr_iff PO_axioms |
|
506 |
by (fastforce simp add: A_def r_def glb_dual_lub) |
|
507 |
then show ?thesis |
|
508 |
by (simp add: A_def P_def) |
|
509 |
qed |
|
13115 | 510 |
|
70194 | 511 |
lemma T_thm_1_glb: "glb P cl = glb {x \<in> A. (f x, x) \<in> r} cl" |
512 |
unfolding glb_dual_lub P_def A_def r_def |
|
513 |
using CLF.T_thm_1_lub dualA_iff dualr_iff local.dual by force |
|
64915 | 514 |
|
13115 | 515 |
|
61343 | 516 |
subsection \<open>interval\<close> |
13383 | 517 |
|
64916 | 518 |
lemma rel_imp_elem: "(x, y) \<in> r \<Longrightarrow> x \<in> A" |
82248 | 519 |
using A_def PartialOrder_def cl_po r_def by blast |
64915 | 520 |
|
64916 | 521 |
lemma interval_subset: "\<lbrakk>a \<in> A; b \<in> A\<rbrakk> \<Longrightarrow> interval r a b \<subseteq> A" |
64915 | 522 |
by (simp add: interval_def) (blast intro: rel_imp_elem) |
13115 | 523 |
|
64916 | 524 |
lemma intervalI: "\<lbrakk>(a, x) \<in> r; (x, b) \<in> r\<rbrakk> \<Longrightarrow> x \<in> interval r a b" |
64915 | 525 |
by (simp add: interval_def) |
13115 | 526 |
|
64916 | 527 |
lemma interval_lemma1: "\<lbrakk>S \<subseteq> interval r a b; x \<in> S\<rbrakk> \<Longrightarrow> (a, x) \<in> r" |
64915 | 528 |
unfolding interval_def by fast |
13115 | 529 |
|
64916 | 530 |
lemma interval_lemma2: "\<lbrakk>S \<subseteq> interval r a b; x \<in> S\<rbrakk> \<Longrightarrow> (x, b) \<in> r" |
64915 | 531 |
unfolding interval_def by fast |
13115 | 532 |
|
64916 | 533 |
lemma a_less_lub: "\<lbrakk>S \<subseteq> A; S \<noteq> {}; \<forall>x \<in> S. (a,x) \<in> r; \<forall>y \<in> S. (y, L) \<in> r\<rbrakk> \<Longrightarrow> (a, L) \<in> r" |
64915 | 534 |
by (blast intro: transE) |
13115 | 535 |
|
64916 | 536 |
lemma S_intv_cl: "\<lbrakk>a \<in> A; b \<in> A; S \<subseteq> interval r a b\<rbrakk> \<Longrightarrow> S \<subseteq> A" |
64915 | 537 |
by (simp add: subset_trans [OF _ interval_subset]) |
13115 | 538 |
|
64916 | 539 |
lemma L_in_interval: |
70194 | 540 |
assumes "b \<in> A" and S: "S \<subseteq> interval r a b" "isLub S cl L" "S \<noteq> {}" |
541 |
shows "L \<in> interval r a b" |
|
542 |
proof (rule intervalI) |
|
543 |
show "(a, L) \<in> r" |
|
544 |
by (meson PO_imp_trans all_not_in_conv S interval_lemma1 isLub_upper transD) |
|
545 |
show "(L, b) \<in> r" |
|
546 |
using \<open>b \<in> A\<close> assms interval_lemma2 isLub_least by auto |
|
547 |
qed |
|
13115 | 548 |
|
64916 | 549 |
lemma G_in_interval: |
70194 | 550 |
assumes "b \<in> A" and S: "S \<subseteq> interval r a b" "isGlb S cl G" "S \<noteq> {}" |
551 |
shows "G \<in> interval r a b" |
|
552 |
proof - |
|
553 |
have "a \<in> A" |
|
554 |
using S(1) \<open>S \<noteq> {}\<close> interval_lemma1 rel_imp_elem by blast |
|
555 |
with assms show ?thesis |
|
556 |
by (metis (no_types) A_def CLF.L_in_interval dualA_iff interval_dual isGlb_dual_isLub local.dual) |
|
557 |
qed |
|
13115 | 558 |
|
64916 | 559 |
lemma intervalPO: |
64915 | 560 |
"\<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> |
561 |
\<Longrightarrow> \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr> \<in> PartialOrder" |
|
562 |
by (rule po_subset_po) (simp add: interval_subset) |
|
13115 | 563 |
|
64916 | 564 |
lemma intv_CL_lub: |
70194 | 565 |
assumes "a \<in> A" "b \<in> A" "interval r a b \<noteq> {}" and S: "S \<subseteq> interval r a b" |
566 |
shows "\<exists>L. isLub S \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr> L" |
|
567 |
proof - |
|
568 |
obtain L where L: "isLub S cl L" |
|
569 |
by (meson CL_imp_ex_isLub S_intv_cl assms(1) assms(2) assms(4)) |
|
570 |
show ?thesis |
|
571 |
unfolding isLub_def potype.simps |
|
572 |
proof (intro exI impI conjI ballI) |
|
573 |
let ?L = "(if S = {} then a else L)" |
|
574 |
show Lin: "?L \<in> interval r a b" |
|
575 |
using L L_in_interval assms left_in_interval by auto |
|
576 |
show "(y, ?L) \<in> induced (interval r a b) r" if "y \<in> S" for y |
|
577 |
proof - |
|
578 |
have "S \<noteq> {}" |
|
579 |
using that by blast |
|
580 |
then show ?thesis |
|
581 |
using L Lin S indI isLub_upper that by auto |
|
582 |
qed |
|
583 |
show "(?L, z) \<in> induced (interval r a b) r" |
|
584 |
if "z \<in> interval r a b" and "\<forall>y\<in>S. (y, z) \<in> induced (interval r a b) r" for z |
|
585 |
using that L |
|
586 |
apply (simp add: isLub_def induced_def interval_imp_mem) |
|
587 |
by (metis (full_types) A_def Lin \<open>a \<in> A\<close> \<open>b \<in> A\<close> interval_subset r_def subset_eq) |
|
588 |
qed |
|
589 |
qed |
|
13115 | 590 |
|
64916 | 591 |
lemmas intv_CL_glb = intv_CL_lub [THEN Rdual] |
13115 | 592 |
|
64916 | 593 |
lemma interval_is_sublattice: "\<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> interval r a b <<= cl" |
64915 | 594 |
apply (rule sublatticeI) |
595 |
apply (simp add: interval_subset) |
|
70194 | 596 |
by (simp add: CompleteLatticeI intervalPO intv_CL_glb intv_CL_lub) |
13115 | 597 |
|
64916 | 598 |
lemmas interv_is_compl_latt = interval_is_sublattice [THEN sublattice_imp_CL] |
13115 | 599 |
|
13383 | 600 |
|
61343 | 601 |
subsection \<open>Top and Bottom\<close> |
64915 | 602 |
|
64916 | 603 |
lemma Top_dual_Bot: "Top cl = Bot (dual cl)" |
70194 | 604 |
by (simp add: Top_def Bot_def least_def greatest_def) |
13115 | 605 |
|
64916 | 606 |
lemma Bot_dual_Top: "Bot cl = Top (dual cl)" |
70194 | 607 |
by (simp add: Top_def Bot_def least_def greatest_def) |
13115 | 608 |
|
64916 | 609 |
lemma Bot_in_lattice: "Bot cl \<in> A" |
70194 | 610 |
unfolding Bot_def least_def |
64915 | 611 |
apply (rule_tac a = "glb A cl" in someI2) |
70194 | 612 |
using glb_in_lattice glb_lower by (auto simp: A_def r_def) |
13115 | 613 |
|
64916 | 614 |
lemma Top_in_lattice: "Top cl \<in> A" |
70194 | 615 |
using A_def CLF.Bot_in_lattice Top_dual_Bot local.dual by force |
13115 | 616 |
|
64916 | 617 |
lemma Top_prop: "x \<in> A \<Longrightarrow> (x, Top cl) \<in> r" |
70194 | 618 |
unfolding Top_def greatest_def |
64915 | 619 |
apply (rule_tac a = "lub A cl" in someI2) |
70194 | 620 |
using lub_in_lattice lub_upper by (auto simp: A_def r_def) |
13115 | 621 |
|
64916 | 622 |
lemma Bot_prop: "x \<in> A \<Longrightarrow> (Bot cl, x) \<in> r" |
70194 | 623 |
using A_def Bot_dual_Top CLF.Top_prop dualA_iff dualr_iff local.dual r_def by fastforce |
13115 | 624 |
|
64916 | 625 |
lemma Top_intv_not_empty: "x \<in> A \<Longrightarrow> interval r x (Top cl) \<noteq> {}" |
70194 | 626 |
using Top_prop intervalI reflE by force |
13115 | 627 |
|
64916 | 628 |
lemma Bot_intv_not_empty: "x \<in> A \<Longrightarrow> interval r (Bot cl) x \<noteq> {}" |
70194 | 629 |
using Bot_dual_Top Bot_prop intervalI reflE by fastforce |
64915 | 630 |
|
13115 | 631 |
|
70202 | 632 |
text \<open>the set of fixed points form a partial order\<close> |
633 |
proposition fixf_po: "\<lparr>pset = P, order = induced P r\<rparr> \<in> PartialOrder" |
|
64915 | 634 |
by (simp add: P_def fix_subset po_subset_po) |
13115 | 635 |
|
64916 | 636 |
end |
637 |
||
638 |
context Tarski |
|
639 |
begin |
|
640 |
||
641 |
lemma Y_subset_A: "Y \<subseteq> A" |
|
64915 | 642 |
by (rule subset_trans [OF _ fix_subset]) (rule Y_ss [simplified P_def]) |
13115 | 643 |
|
64916 | 644 |
lemma lubY_in_A: "lub Y cl \<in> A" |
18750 | 645 |
by (rule Y_subset_A [THEN lub_in_lattice]) |
13115 | 646 |
|
64916 | 647 |
lemma lubY_le_flubY: "(lub Y cl, f (lub Y cl)) \<in> r" |
70194 | 648 |
proof (intro lub_least Y_subset_A ballI) |
649 |
show "f (lub Y cl) \<in> A" |
|
650 |
by (meson Tarski.monotone_def lubY_in_A monotone_f reflE rel_imp_elem) |
|
651 |
show "(x, f (lub Y cl)) \<in> r" if "x \<in> Y" for x |
|
652 |
proof |
|
653 |
have "\<And>A. Y \<subseteq> A \<Longrightarrow> x \<in> A" |
|
654 |
using that by blast |
|
655 |
moreover have "(x, lub Y cl) \<in> r" |
|
656 |
using that by (simp add: Y_subset_A lub_upper) |
|
657 |
ultimately show "(x, f (lub Y cl)) \<in> r" |
|
658 |
by (metis (no_types) Tarski.Y_ss Tarski_axioms Y_subset_A fix_imp_eq lubY_in_A monotoneE monotone_f) |
|
659 |
qed auto |
|
660 |
qed |
|
13115 | 661 |
|
64916 | 662 |
lemma intY1_subset: "intY1 \<subseteq> A" |
70194 | 663 |
unfolding intY1_def using Top_in_lattice interval_subset lubY_in_A by auto |
13115 | 664 |
|
64916 | 665 |
lemmas intY1_elem = intY1_subset [THEN subsetD] |
13115 | 666 |
|
70194 | 667 |
lemma intY1_f_closed: |
668 |
assumes "x \<in> intY1" shows "f x \<in> intY1" |
|
669 |
proof (simp add: intY1_def interval_def, rule conjI) |
|
670 |
show "(lub Y cl, f x) \<in> r" |
|
671 |
using assms intY1_elem interval_imp_mem lubY_in_A unfolding intY1_def |
|
672 |
using lubY_le_flubY monotoneE monotone_f po.transE by blast |
|
673 |
then show "(f x, Top cl) \<in> r" |
|
82248 | 674 |
by (metis assms f_in_funcset intY1_elem[of x] Top_prop[of "f x"] PiE[of f A "\<lambda>_. A" x]) |
70194 | 675 |
qed |
13115 | 676 |
|
64916 | 677 |
lemma intY1_mono: "monotone (\<lambda> x \<in> intY1. f x) intY1 (induced intY1 r)" |
64915 | 678 |
apply (auto simp add: monotone_def induced_def intY1_f_closed) |
679 |
apply (blast intro: intY1_elem monotone_f [THEN monotoneE]) |
|
680 |
done |
|
13115 | 681 |
|
64916 | 682 |
lemma intY1_is_cl: "\<lparr>pset = intY1, order = induced intY1 r\<rparr> \<in> CompleteLattice" |
70194 | 683 |
unfolding intY1_def |
684 |
by (simp add: Top_in_lattice Top_intv_not_empty interv_is_compl_latt lubY_in_A) |
|
13115 | 685 |
|
64916 | 686 |
lemma v_in_P: "v \<in> P" |
70194 | 687 |
proof - |
688 |
have "v \<in> fix (restrict f intY1) intY1" |
|
689 |
unfolding v_def |
|
690 |
apply (rule CLF.glbH_is_fixp |
|
691 |
[OF CLF.intro, unfolded CLF_set_def, of "\<lparr>pset = intY1, order = induced intY1 r\<rparr>", simplified]) |
|
692 |
using intY1_f_closed intY1_is_cl intY1_mono apply blast+ |
|
693 |
done |
|
694 |
then show ?thesis |
|
695 |
unfolding P_def |
|
696 |
by (meson fixf_subset intY1_subset) |
|
697 |
qed |
|
13115 | 698 |
|
64916 | 699 |
lemma z_in_interval: "\<lbrakk>z \<in> P; \<forall>y\<in>Y. (y, z) \<in> induced P r\<rbrakk> \<Longrightarrow> z \<in> intY1" |
70194 | 700 |
unfolding intY1_def P_def |
701 |
by (meson Top_prop Y_subset_A fix_subset in_mono indE intervalI lub_least) |
|
13115 | 702 |
|
64916 | 703 |
lemma tarski_full_lemma: "\<exists>L. isLub Y \<lparr>pset = P, order = induced P r\<rparr> L" |
70194 | 704 |
proof |
705 |
have "(y, v) \<in> induced P r" if "y \<in> Y" for y |
|
706 |
proof - |
|
707 |
have "(y, lub Y cl) \<in> r" |
|
708 |
by (simp add: Y_subset_A lub_upper that) |
|
709 |
moreover have "(lub Y cl, v) \<in> r" |
|
710 |
by (metis (no_types, lifting) CL.glb_in_lattice CL.intro intY1_def intY1_is_cl interval_imp_mem lub_dual_glb mem_Collect_eq select_convs(1) subsetI v_def) |
|
711 |
ultimately have "(y, v) \<in> r" |
|
712 |
using po.transE by blast |
|
713 |
then show ?thesis |
|
714 |
using Y_ss indI that v_in_P by auto |
|
715 |
qed |
|
716 |
moreover have "(v, z) \<in> induced P r" if "z \<in> P" "\<forall>y\<in>Y. (y, z) \<in> induced P r" for z |
|
717 |
proof (rule indI) |
|
718 |
have "((\<lambda>x \<in> intY1. f x) z, z) \<in> induced intY1 r" |
|
719 |
by (metis P_def fix_imp_eq in_mono indI intY1_subset reflE restrict_apply' that z_in_interval) |
|
720 |
then show "(v, z) \<in> r" |
|
721 |
by (metis (no_types, lifting) CL.glb_lower CL_def indE intY1_is_cl intY1_subset mem_Collect_eq select_convs(1,2) subsetI that v_def z_in_interval) |
|
722 |
qed (auto simp: that v_in_P) |
|
723 |
ultimately |
|
724 |
show "isLub Y \<lparr>pset = P, order = induced P r\<rparr> v" |
|
725 |
by (simp add: isLub_def v_in_P) |
|
726 |
qed |
|
13115 | 727 |
|
64916 | 728 |
end |
729 |
||
13115 | 730 |
lemma CompleteLatticeI_simp: |
70202 | 731 |
"\<lbrakk>po \<in> PartialOrder; \<And>S. S \<subseteq> A \<Longrightarrow> \<exists>L. isLub S po L; A = pset po\<rbrakk> \<Longrightarrow> po \<in> CompleteLattice" |
70194 | 732 |
by (metis CompleteLatticeI Rdual) |
733 |
||
64915 | 734 |
theorem (in CLF) Tarski_full: "\<lparr>pset = P, order = induced P r\<rparr> \<in> CompleteLattice" |
70194 | 735 |
proof (intro CompleteLatticeI_simp allI impI) |
736 |
show "\<lparr>pset = P, order = induced P r\<rparr> \<in> PartialOrder" |
|
737 |
by (simp add: fixf_po) |
|
738 |
show "\<And>S. S \<subseteq> P \<Longrightarrow> \<exists>L. isLub S \<lparr>pset = P, order = induced P r\<rparr> L" |
|
739 |
unfolding P_def A_def r_def |
|
740 |
proof (rule Tarski.tarski_full_lemma [OF Tarski.intro [OF _ Tarski_axioms.intro]]) |
|
741 |
show "CLF cl f" .. |
|
742 |
qed |
|
743 |
qed auto |
|
7112 | 744 |
|
745 |
end |