author | haftmann |
Thu, 19 Jun 2025 17:15:40 +0200 | |
changeset 82734 | 89347c0cc6a3 |
parent 82248 | e8c96013ea8a |
permissions | -rw-r--r-- |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
38991
diff
changeset
|
1 |
(* Title: HOL/Metis_Examples/Tarski.thy |
43197 | 2 |
Author: Lawrence C. Paulson, Cambridge University Computer Laboratory |
41144 | 3 |
Author: Jasmin Blanchette, TU Muenchen |
23449 | 4 |
|
43197 | 5 |
Metis example featuring the full theorem of Tarski. |
23449 | 6 |
*) |
7 |
||
63167 | 8 |
section \<open>Metis Example Featuring the Full Theorem of Tarski\<close> |
23449 | 9 |
|
27368 | 10 |
theory Tarski |
68188
2af1f142f855
move FuncSet back to HOL-Library (amending 493b818e8e10)
immler
parents:
68072
diff
changeset
|
11 |
imports Main "HOL-Library.FuncSet" |
27368 | 12 |
begin |
23449 | 13 |
|
50705
0e943b33d907
use new skolemizer for reconstructing skolemization steps in Isar proofs (because the old skolemizer messes up the order of the Skolem arguments)
blanchet
parents:
47040
diff
changeset
|
14 |
declare [[metis_new_skolem]] |
42103
6066a35f6678
Metis examples use the new Skolemizer to test it
blanchet
parents:
41413
diff
changeset
|
15 |
|
23449 | 16 |
(*Many of these higher-order problems appear to be impossible using the |
17 |
current linkup. They often seem to need either higher-order unification |
|
18 |
or explicit reasoning about connectives such as conjunction. The numerous |
|
19 |
set comprehensions are to blame.*) |
|
20 |
||
21 |
record 'a potype = |
|
22 |
pset :: "'a set" |
|
23 |
order :: "('a * 'a) set" |
|
24 |
||
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
25 |
definition monotone :: "['a => 'a, 'a set, ('a *'a)set] => bool" where |
67613 | 26 |
"monotone f A r == \<forall>x\<in>A. \<forall>y\<in>A. (x, y) \<in> r --> ((f x), (f y)) \<in> r" |
23449 | 27 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
28 |
definition least :: "['a => bool, 'a potype] => 'a" where |
67613 | 29 |
"least P po \<equiv> SOME x. x \<in> pset po \<and> P x \<and> |
30 |
(\<forall>y \<in> pset po. P y \<longrightarrow> (x,y) \<in> order po)" |
|
23449 | 31 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
32 |
definition greatest :: "['a => bool, 'a potype] => 'a" where |
67613 | 33 |
"greatest P po \<equiv> SOME x. x \<in> pset po \<and> P x \<and> |
34 |
(\<forall>y \<in> pset po. P y \<longrightarrow> (y,x) \<in> order po)" |
|
23449 | 35 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
36 |
definition lub :: "['a set, 'a potype] => 'a" where |
67613 | 37 |
"lub S po == least (\<lambda>x. \<forall>y\<in>S. (y,x) \<in> order po) po" |
23449 | 38 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
39 |
definition glb :: "['a set, 'a potype] => 'a" where |
67613 | 40 |
"glb S po \<equiv> greatest (\<lambda>x. \<forall>y\<in>S. (x,y) \<in> order po) po" |
23449 | 41 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
42 |
definition isLub :: "['a set, 'a potype, 'a] => bool" where |
67613 | 43 |
"isLub S po \<equiv> \<lambda>L. (L \<in> pset po \<and> (\<forall>y\<in>S. (y,L) \<in> order po) \<and> |
44 |
(\<forall>z\<in>pset po. (\<forall>y\<in>S. (y,z) \<in> order po) \<longrightarrow> (L,z) \<in> order po))" |
|
23449 | 45 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
46 |
definition isGlb :: "['a set, 'a potype, 'a] => bool" where |
67613 | 47 |
"isGlb S po \<equiv> \<lambda>G. (G \<in> pset po \<and> (\<forall>y\<in>S. (G,y) \<in> order po) \<and> |
48 |
(\<forall>z \<in> pset po. (\<forall>y\<in>S. (z,y) \<in> order po) \<longrightarrow> (z,G) \<in> order po))" |
|
23449 | 49 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
50 |
definition "fix" :: "[('a => 'a), 'a set] => 'a set" where |
67613 | 51 |
"fix f A \<equiv> {x. x \<in> A \<and> f x = x}" |
23449 | 52 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
53 |
definition interval :: "[('a*'a) set,'a, 'a ] => 'a set" where |
67613 | 54 |
"interval r a b == {x. (a,x) \<in> r & (x,b) \<in> r}" |
23449 | 55 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
56 |
definition Bot :: "'a potype => 'a" where |
64913 | 57 |
"Bot po == least (\<lambda>x. True) po" |
23449 | 58 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
59 |
definition Top :: "'a potype => 'a" where |
64913 | 60 |
"Top po == greatest (\<lambda>x. True) po" |
23449 | 61 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
62 |
definition PartialOrder :: "('a potype) set" where |
82248 | 63 |
"PartialOrder \<equiv> {P. order P \<subseteq> pset P \<times> pset P \<and> |
64 |
refl_on (pset P) (order P) \<and> antisym (order P) \<and> trans (order P)}" |
|
23449 | 65 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
66 |
definition CompleteLattice :: "('a potype) set" where |
67613 | 67 |
"CompleteLattice == {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))}" |
|
23449 | 70 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
71 |
definition induced :: "['a set, ('a * 'a) set] => ('a *'a)set" where |
67613 | 72 |
"induced A r \<equiv> {(a,b). a \<in> A \<and> b \<in> A \<and> (a,b) \<in> r}" |
23449 | 73 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
74 |
definition sublattice :: "('a potype * 'a set)set" where |
67613 | 75 |
"sublattice \<equiv> |
76 |
SIGMA cl : CompleteLattice. |
|
77 |
{S. S \<subseteq> pset cl \<and> |
|
78 |
\<lparr>pset = S, order = induced S (order cl)\<rparr> \<in> CompleteLattice}" |
|
23449 | 79 |
|
35054 | 80 |
abbreviation |
80914
d97fdabd9e2b
standardize mixfix annotations via "isabelle update -a -u mixfix_cartouches" --- to simplify systematic editing;
wenzelm
parents:
73346
diff
changeset
|
81 |
sublattice_syntax :: "['a set, 'a potype] => bool" (\<open>_ <<= _\<close> [51, 50] 50) |
67613 | 82 |
where "S <<= cl \<equiv> S \<in> sublattice `` {cl}" |
23449 | 83 |
|
35416
d8d7d1b785af
replaced a couple of constsdefs by definitions (also some old primrecs by modern ones)
haftmann
parents:
35054
diff
changeset
|
84 |
definition dual :: "'a potype => 'a potype" where |
23449 | 85 |
"dual po == (| pset = pset po, order = converse (order po) |)" |
86 |
||
27681 | 87 |
locale PO = |
23449 | 88 |
fixes cl :: "'a potype" |
89 |
and A :: "'a set" |
|
90 |
and r :: "('a * 'a) set" |
|
67613 | 91 |
assumes cl_po: "cl \<in> PartialOrder" |
23449 | 92 |
defines A_def: "A == pset cl" |
93 |
and r_def: "r == order cl" |
|
94 |
||
27681 | 95 |
locale CL = PO + |
67613 | 96 |
assumes cl_co: "cl \<in> CompleteLattice" |
23449 | 97 |
|
27681 | 98 |
definition CLF_set :: "('a potype * ('a => 'a)) set" where |
99 |
"CLF_set = (SIGMA cl: CompleteLattice. |
|
67613 | 100 |
{f. f \<in> pset cl \<rightarrow> pset cl \<and> monotone f (pset cl) (order cl)})" |
27681 | 101 |
|
102 |
locale CLF = CL + |
|
23449 | 103 |
fixes f :: "'a => 'a" |
104 |
and P :: "'a set" |
|
67613 | 105 |
assumes f_cl: "(cl,f) \<in> CLF_set" (*was the equivalent "f : CLF``{cl}"*) |
23449 | 106 |
defines P_def: "P == fix f A" |
107 |
||
27681 | 108 |
locale Tarski = CLF + |
23449 | 109 |
fixes Y :: "'a set" |
110 |
and intY1 :: "'a set" |
|
111 |
and v :: "'a" |
|
112 |
assumes |
|
113 |
Y_ss: "Y \<subseteq> P" |
|
114 |
defines |
|
115 |
intY1_def: "intY1 == interval r (lub Y cl) (Top cl)" |
|
67613 | 116 |
and v_def: "v == glb {x. ((\<lambda>x \<in> intY1. f x) x, x) \<in> induced intY1 r \<and> |
117 |
x \<in> intY1} |
|
118 |
\<lparr>pset=intY1, order=induced intY1 r\<rparr>" |
|
23449 | 119 |
|
63167 | 120 |
subsection \<open>Partial Order\<close> |
23449 | 121 |
|
30198 | 122 |
lemma (in PO) PO_imp_refl_on: "refl_on A r" |
23449 | 123 |
apply (insert cl_po) |
124 |
apply (simp add: PartialOrder_def A_def r_def) |
|
125 |
done |
|
126 |
||
127 |
lemma (in PO) PO_imp_sym: "antisym r" |
|
128 |
apply (insert cl_po) |
|
129 |
apply (simp add: PartialOrder_def r_def) |
|
130 |
done |
|
131 |
||
132 |
lemma (in PO) PO_imp_trans: "trans r" |
|
133 |
apply (insert cl_po) |
|
134 |
apply (simp add: PartialOrder_def r_def) |
|
135 |
done |
|
136 |
||
137 |
lemma (in PO) reflE: "x \<in> A ==> (x, x) \<in> r" |
|
138 |
apply (insert cl_po) |
|
30198 | 139 |
apply (simp add: PartialOrder_def refl_on_def A_def r_def) |
23449 | 140 |
done |
141 |
||
142 |
lemma (in PO) antisymE: "[| (a, b) \<in> r; (b, a) \<in> r |] ==> a = b" |
|
143 |
apply (insert cl_po) |
|
144 |
apply (simp add: PartialOrder_def antisym_def r_def) |
|
145 |
done |
|
146 |
||
147 |
lemma (in PO) transE: "[| (a, b) \<in> r; (b, c) \<in> r|] ==> (a,c) \<in> r" |
|
148 |
apply (insert cl_po) |
|
149 |
apply (simp add: PartialOrder_def r_def) |
|
150 |
apply (unfold trans_def, fast) |
|
151 |
done |
|
152 |
||
153 |
lemma (in PO) monotoneE: |
|
154 |
"[| monotone f A r; x \<in> A; y \<in> A; (x, y) \<in> r |] ==> (f x, f y) \<in> r" |
|
155 |
by (simp add: monotone_def) |
|
156 |
||
157 |
lemma (in PO) po_subset_po: |
|
82248 | 158 |
assumes "S \<subseteq> A" |
159 |
shows "(| pset = S, order = induced S r |) \<in> PartialOrder" |
|
160 |
unfolding PartialOrder_def mem_Collect_eq potype.simps |
|
161 |
proof (intro conjI) |
|
162 |
show "induced S r \<subseteq> S \<times> S" |
|
163 |
by (metis (no_types, lifting) case_prodD induced_def mem_Collect_eq |
|
164 |
mem_Sigma_iff subrelI) |
|
165 |
||
166 |
show "refl_on S (induced S r)" |
|
167 |
using \<open>S \<subseteq> A\<close> |
|
168 |
by (simp add: induced_def reflE refl_on_def subsetD) |
|
169 |
||
170 |
show "antisym (induced S r)" |
|
171 |
by (metis (lifting) BNF_Def.Collect_case_prodD PO_imp_sym antisym_subset induced_def |
|
172 |
prod.collapse subsetI) |
|
173 |
||
174 |
show "trans (induced S r)" |
|
175 |
by (metis (no_types, lifting) case_prodD case_prodI induced_def local.transE mem_Collect_eq |
|
176 |
trans_on_def) |
|
177 |
qed |
|
23449 | 178 |
|
179 |
lemma (in PO) indE: "[| (x, y) \<in> induced S r; S \<subseteq> A |] ==> (x, y) \<in> r" |
|
180 |
by (simp add: add: induced_def) |
|
181 |
||
182 |
lemma (in PO) indI: "[| (x, y) \<in> r; x \<in> S; y \<in> S |] ==> (x, y) \<in> induced S r" |
|
183 |
by (simp add: add: induced_def) |
|
184 |
||
185 |
lemma (in CL) CL_imp_ex_isLub: "S \<subseteq> A ==> \<exists>L. isLub S cl L" |
|
186 |
apply (insert cl_co) |
|
187 |
apply (simp add: CompleteLattice_def A_def) |
|
188 |
done |
|
189 |
||
190 |
declare (in CL) cl_co [simp] |
|
191 |
||
192 |
lemma isLub_lub: "(\<exists>L. isLub S cl L) = isLub S cl (lub S cl)" |
|
193 |
by (simp add: lub_def least_def isLub_def some_eq_ex [symmetric]) |
|
194 |
||
195 |
lemma isGlb_glb: "(\<exists>G. isGlb S cl G) = isGlb S cl (glb S cl)" |
|
196 |
by (simp add: glb_def greatest_def isGlb_def some_eq_ex [symmetric]) |
|
197 |
||
198 |
lemma isGlb_dual_isLub: "isGlb S cl = isLub S (dual cl)" |
|
46752
e9e7209eb375
more fundamental pred-to-set conversions, particularly by means of inductive_set; associated consolidation of some theorem names (c.f. NEWS)
haftmann
parents:
45970
diff
changeset
|
199 |
by (simp add: isLub_def isGlb_def dual_def converse_unfold) |
23449 | 200 |
|
201 |
lemma isLub_dual_isGlb: "isLub S cl = isGlb S (dual cl)" |
|
46752
e9e7209eb375
more fundamental pred-to-set conversions, particularly by means of inductive_set; associated consolidation of some theorem names (c.f. NEWS)
haftmann
parents:
45970
diff
changeset
|
202 |
by (simp add: isLub_def isGlb_def dual_def converse_unfold) |
23449 | 203 |
|
204 |
lemma (in PO) dualPO: "dual cl \<in> PartialOrder" |
|
205 |
apply (insert cl_po) |
|
82248 | 206 |
apply (simp add: PartialOrder_def dual_def converse_Times flip: converse_subset_swap) |
23449 | 207 |
done |
208 |
||
209 |
lemma Rdual: |
|
210 |
"\<forall>S. (S \<subseteq> A -->( \<exists>L. isLub S (| pset = A, order = r|) L)) |
|
211 |
==> \<forall>S. (S \<subseteq> A --> (\<exists>G. isGlb S (| pset = A, order = r|) G))" |
|
212 |
apply safe |
|
213 |
apply (rule_tac x = "lub {y. y \<in> A & (\<forall>k \<in> S. (y, k) \<in> r)} |
|
214 |
(|pset = A, order = r|) " in exI) |
|
215 |
apply (drule_tac x = "{y. y \<in> A & (\<forall>k \<in> S. (y,k) \<in> r) }" in spec) |
|
216 |
apply (drule mp, fast) |
|
217 |
apply (simp add: isLub_lub isGlb_def) |
|
218 |
apply (simp add: isLub_def, blast) |
|
219 |
done |
|
220 |
||
221 |
lemma lub_dual_glb: "lub S cl = glb S (dual cl)" |
|
46752
e9e7209eb375
more fundamental pred-to-set conversions, particularly by means of inductive_set; associated consolidation of some theorem names (c.f. NEWS)
haftmann
parents:
45970
diff
changeset
|
222 |
by (simp add: lub_def glb_def least_def greatest_def dual_def converse_unfold) |
23449 | 223 |
|
224 |
lemma glb_dual_lub: "glb S cl = lub S (dual cl)" |
|
46752
e9e7209eb375
more fundamental pred-to-set conversions, particularly by means of inductive_set; associated consolidation of some theorem names (c.f. NEWS)
haftmann
parents:
45970
diff
changeset
|
225 |
by (simp add: lub_def glb_def least_def greatest_def dual_def converse_unfold) |
23449 | 226 |
|
227 |
lemma CL_subset_PO: "CompleteLattice \<subseteq> PartialOrder" |
|
228 |
by (simp add: PartialOrder_def CompleteLattice_def, fast) |
|
229 |
||
230 |
lemmas CL_imp_PO = CL_subset_PO [THEN subsetD] |
|
231 |
||
30198 | 232 |
declare PO.PO_imp_refl_on [OF PO.intro [OF CL_imp_PO], simp] |
27681 | 233 |
declare PO.PO_imp_sym [OF PO.intro [OF CL_imp_PO], simp] |
234 |
declare PO.PO_imp_trans [OF PO.intro [OF CL_imp_PO], simp] |
|
23449 | 235 |
|
30198 | 236 |
lemma (in CL) CO_refl_on: "refl_on A r" |
237 |
by (rule PO_imp_refl_on) |
|
23449 | 238 |
|
239 |
lemma (in CL) CO_antisym: "antisym r" |
|
240 |
by (rule PO_imp_sym) |
|
241 |
||
242 |
lemma (in CL) CO_trans: "trans r" |
|
243 |
by (rule PO_imp_trans) |
|
244 |
||
245 |
lemma CompleteLatticeI: |
|
246 |
"[| po \<in> PartialOrder; (\<forall>S. S \<subseteq> pset po --> (\<exists>L. isLub S po L)); |
|
247 |
(\<forall>S. S \<subseteq> pset po --> (\<exists>G. isGlb S po G))|] |
|
248 |
==> po \<in> CompleteLattice" |
|
249 |
apply (unfold CompleteLattice_def, blast) |
|
250 |
done |
|
251 |
||
252 |
lemma (in CL) CL_dualCL: "dual cl \<in> CompleteLattice" |
|
253 |
apply (insert cl_co) |
|
254 |
apply (simp add: CompleteLattice_def dual_def) |
|
255 |
apply (fold dual_def) |
|
256 |
apply (simp add: isLub_dual_isGlb [symmetric] isGlb_dual_isLub [symmetric] |
|
257 |
dualPO) |
|
258 |
done |
|
259 |
||
260 |
lemma (in PO) dualA_iff: "pset (dual cl) = pset cl" |
|
261 |
by (simp add: dual_def) |
|
262 |
||
263 |
lemma (in PO) dualr_iff: "((x, y) \<in> (order(dual cl))) = ((y, x) \<in> order cl)" |
|
264 |
by (simp add: dual_def) |
|
265 |
||
266 |
lemma (in PO) monotone_dual: |
|
43197 | 267 |
"monotone f (pset cl) (order cl) |
23449 | 268 |
==> monotone f (pset (dual cl)) (order(dual cl))" |
269 |
by (simp add: monotone_def dualA_iff dualr_iff) |
|
270 |
||
271 |
lemma (in PO) interval_dual: |
|
272 |
"[| x \<in> A; y \<in> A|] ==> interval r x y = interval (order(dual cl)) y x" |
|
273 |
apply (simp add: interval_def dualr_iff) |
|
274 |
apply (fold r_def, fast) |
|
275 |
done |
|
276 |
||
277 |
lemma (in PO) interval_not_empty: |
|
278 |
"[| trans r; interval r a b \<noteq> {} |] ==> (a, b) \<in> r" |
|
279 |
apply (simp add: interval_def) |
|
280 |
apply (unfold trans_def, blast) |
|
281 |
done |
|
282 |
||
283 |
lemma (in PO) interval_imp_mem: "x \<in> interval r a b ==> (a, x) \<in> r" |
|
284 |
by (simp add: interval_def) |
|
285 |
||
286 |
lemma (in PO) left_in_interval: |
|
287 |
"[| a \<in> A; b \<in> A; interval r a b \<noteq> {} |] ==> a \<in> interval r a b" |
|
288 |
apply (simp (no_asm_simp) add: interval_def) |
|
289 |
apply (simp add: PO_imp_trans interval_not_empty) |
|
290 |
apply (simp add: reflE) |
|
291 |
done |
|
292 |
||
293 |
lemma (in PO) right_in_interval: |
|
294 |
"[| a \<in> A; b \<in> A; interval r a b \<noteq> {} |] ==> b \<in> interval r a b" |
|
295 |
apply (simp (no_asm_simp) add: interval_def) |
|
296 |
apply (simp add: PO_imp_trans interval_not_empty) |
|
297 |
apply (simp add: reflE) |
|
298 |
done |
|
299 |
||
63167 | 300 |
subsection \<open>sublattice\<close> |
23449 | 301 |
|
302 |
lemma (in PO) sublattice_imp_CL: |
|
303 |
"S <<= cl ==> (| pset = S, order = induced S r |) \<in> CompleteLattice" |
|
304 |
by (simp add: sublattice_def CompleteLattice_def A_def r_def) |
|
305 |
||
306 |
lemma (in CL) sublatticeI: |
|
307 |
"[| S \<subseteq> A; (| pset = S, order = induced S r |) \<in> CompleteLattice |] |
|
308 |
==> S <<= cl" |
|
309 |
by (simp add: sublattice_def A_def r_def) |
|
310 |
||
63167 | 311 |
subsection \<open>lub\<close> |
23449 | 312 |
|
313 |
lemma (in CL) lub_unique: "[| S \<subseteq> A; isLub S cl x; isLub S cl L|] ==> x = L" |
|
314 |
apply (rule antisymE) |
|
315 |
apply (auto simp add: isLub_def r_def) |
|
316 |
done |
|
317 |
||
318 |
lemma (in CL) lub_upper: "[|S \<subseteq> A; x \<in> S|] ==> (x, lub S cl) \<in> r" |
|
319 |
apply (rule CL_imp_ex_isLub [THEN exE], assumption) |
|
320 |
apply (unfold lub_def least_def) |
|
321 |
apply (rule some_equality [THEN ssubst]) |
|
322 |
apply (simp add: isLub_def) |
|
323 |
apply (simp add: lub_unique A_def isLub_def) |
|
324 |
apply (simp add: isLub_def r_def) |
|
325 |
done |
|
326 |
||
327 |
lemma (in CL) lub_least: |
|
328 |
"[| S \<subseteq> A; L \<in> A; \<forall>x \<in> S. (x,L) \<in> r |] ==> (lub S cl, L) \<in> r" |
|
329 |
apply (rule CL_imp_ex_isLub [THEN exE], assumption) |
|
330 |
apply (unfold lub_def least_def) |
|
331 |
apply (rule_tac s=x in some_equality [THEN ssubst]) |
|
332 |
apply (simp add: isLub_def) |
|
333 |
apply (simp add: lub_unique A_def isLub_def) |
|
334 |
apply (simp add: isLub_def r_def A_def) |
|
335 |
done |
|
336 |
||
337 |
lemma (in CL) lub_in_lattice: "S \<subseteq> A ==> lub S cl \<in> A" |
|
338 |
apply (rule CL_imp_ex_isLub [THEN exE], assumption) |
|
339 |
apply (unfold lub_def least_def) |
|
340 |
apply (subst some_equality) |
|
341 |
apply (simp add: isLub_def) |
|
342 |
prefer 2 apply (simp add: isLub_def A_def) |
|
343 |
apply (simp add: lub_unique A_def isLub_def) |
|
344 |
done |
|
345 |
||
346 |
lemma (in CL) lubI: |
|
347 |
"[| S \<subseteq> A; L \<in> A; \<forall>x \<in> S. (x,L) \<in> r; |
|
348 |
\<forall>z \<in> A. (\<forall>y \<in> S. (y,z) \<in> r) --> (L,z) \<in> r |] ==> L = lub S cl" |
|
349 |
apply (rule lub_unique, assumption) |
|
350 |
apply (simp add: isLub_def A_def r_def) |
|
351 |
apply (unfold isLub_def) |
|
352 |
apply (rule conjI) |
|
353 |
apply (fold A_def r_def) |
|
354 |
apply (rule lub_in_lattice, assumption) |
|
355 |
apply (simp add: lub_upper lub_least) |
|
356 |
done |
|
357 |
||
358 |
lemma (in CL) lubIa: "[| S \<subseteq> A; isLub S cl L |] ==> L = lub S cl" |
|
359 |
by (simp add: lubI isLub_def A_def r_def) |
|
360 |
||
361 |
lemma (in CL) isLub_in_lattice: "isLub S cl L ==> L \<in> A" |
|
362 |
by (simp add: isLub_def A_def) |
|
363 |
||
364 |
lemma (in CL) isLub_upper: "[|isLub S cl L; y \<in> S|] ==> (y, L) \<in> r" |
|
365 |
by (simp add: isLub_def r_def) |
|
366 |
||
367 |
lemma (in CL) isLub_least: |
|
368 |
"[| isLub S cl L; z \<in> A; \<forall>y \<in> S. (y, z) \<in> r|] ==> (L, z) \<in> r" |
|
369 |
by (simp add: isLub_def A_def r_def) |
|
370 |
||
371 |
lemma (in CL) isLubI: |
|
67613 | 372 |
"\<lbrakk>L \<in> A; \<forall>y \<in> S. (y, L) \<in> r; |
373 |
(\<forall>z \<in> A. (\<forall>y \<in> S. (y, z) \<in> r) \<longrightarrow> (L, z) \<in> r)\<rbrakk> \<Longrightarrow> isLub S cl L" |
|
23449 | 374 |
by (simp add: isLub_def A_def r_def) |
375 |
||
63167 | 376 |
subsection \<open>glb\<close> |
23449 | 377 |
|
378 |
lemma (in CL) glb_in_lattice: "S \<subseteq> A ==> glb S cl \<in> A" |
|
379 |
apply (subst glb_dual_lub) |
|
380 |
apply (simp add: A_def) |
|
381 |
apply (rule dualA_iff [THEN subst]) |
|
382 |
apply (rule CL.lub_in_lattice) |
|
27681 | 383 |
apply (rule CL.intro) |
384 |
apply (rule PO.intro) |
|
23449 | 385 |
apply (rule dualPO) |
27681 | 386 |
apply (rule CL_axioms.intro) |
23449 | 387 |
apply (rule CL_dualCL) |
388 |
apply (simp add: dualA_iff) |
|
389 |
done |
|
390 |
||
391 |
lemma (in CL) glb_lower: "[|S \<subseteq> A; x \<in> S|] ==> (glb S cl, x) \<in> r" |
|
392 |
apply (subst glb_dual_lub) |
|
393 |
apply (simp add: r_def) |
|
394 |
apply (rule dualr_iff [THEN subst]) |
|
395 |
apply (rule CL.lub_upper) |
|
27681 | 396 |
apply (rule CL.intro) |
397 |
apply (rule PO.intro) |
|
23449 | 398 |
apply (rule dualPO) |
27681 | 399 |
apply (rule CL_axioms.intro) |
23449 | 400 |
apply (rule CL_dualCL) |
401 |
apply (simp add: dualA_iff A_def, assumption) |
|
402 |
done |
|
403 |
||
63167 | 404 |
text \<open> |
23449 | 405 |
Reduce the sublattice property by using substructural properties; |
63167 | 406 |
abandoned see \<open>Tarski_4.ML\<close>. |
407 |
\<close> |
|
23449 | 408 |
|
409 |
declare (in CLF) f_cl [simp] |
|
410 |
||
411 |
lemma (in CLF) [simp]: |
|
67613 | 412 |
"f \<in> pset cl \<rightarrow> pset cl \<and> monotone f (pset cl) (order cl)" |
42762
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
413 |
proof - |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
414 |
have "\<forall>u v. (v, u) \<in> CLF_set \<longrightarrow> u \<in> {R \<in> pset v \<rightarrow> pset v. monotone R (pset v) (order v)}" |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
415 |
unfolding CLF_set_def using SigmaE2 by blast |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
416 |
hence F1: "\<forall>u v. (v, u) \<in> CLF_set \<longrightarrow> u \<in> pset v \<rightarrow> pset v \<and> monotone u (pset v) (order v)" |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
417 |
using CollectE by blast |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
418 |
hence "Tarski.monotone f (pset cl) (order cl)" by (metis f_cl) |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
419 |
hence "(cl, f) \<in> CLF_set \<and> Tarski.monotone f (pset cl) (order cl)" |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
420 |
by (metis f_cl) |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
421 |
thus "f \<in> pset cl \<rightarrow> pset cl \<and> Tarski.monotone f (pset cl) (order cl)" |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
422 |
using F1 by metis |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
423 |
qed |
23449 | 424 |
|
61384 | 425 |
lemma (in CLF) f_in_funcset: "f \<in> A \<rightarrow> A" |
23449 | 426 |
by (simp add: A_def) |
427 |
||
428 |
lemma (in CLF) monotone_f: "monotone f A r" |
|
429 |
by (simp add: A_def r_def) |
|
430 |
||
431 |
(*never proved, 2007-01-22*) |
|
45705 | 432 |
|
27681 | 433 |
declare (in CLF) CLF_set_def [simp] CL_dualCL [simp] monotone_dual [simp] dualA_iff [simp] |
434 |
||
42762
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
435 |
lemma (in CLF) CLF_dual: "(dual cl, f) \<in> CLF_set" |
23449 | 436 |
apply (simp del: dualA_iff) |
437 |
apply (simp) |
|
43197 | 438 |
done |
27681 | 439 |
|
440 |
declare (in CLF) CLF_set_def[simp del] CL_dualCL[simp del] monotone_dual[simp del] |
|
23449 | 441 |
dualA_iff[simp del] |
442 |
||
63167 | 443 |
subsection \<open>fixed points\<close> |
23449 | 444 |
|
445 |
lemma fix_subset: "fix f A \<subseteq> A" |
|
69144
f13b82281715
new theory Abstract_Topology with lots of stuff from HOL Light's metric.sml
paulson <lp15@cam.ac.uk>
parents:
68188
diff
changeset
|
446 |
by (auto simp add: fix_def) |
23449 | 447 |
|
448 |
lemma fix_imp_eq: "x \<in> fix f A ==> f x = x" |
|
449 |
by (simp add: fix_def) |
|
450 |
||
451 |
lemma fixf_subset: |
|
64913 | 452 |
"[| A \<subseteq> B; x \<in> fix (\<lambda>y \<in> A. f y) A |] ==> x \<in> fix f B" |
23449 | 453 |
by (simp add: fix_def, auto) |
454 |
||
63167 | 455 |
subsection \<open>lemmas for Tarski, lub\<close> |
23449 | 456 |
|
457 |
(*never proved, 2007-01-22*) |
|
45705 | 458 |
|
459 |
declare CL.lub_least[intro] CLF.f_in_funcset[intro] funcset_mem[intro] CL.lub_in_lattice[intro] PO.transE[intro] PO.monotoneE[intro] CLF.monotone_f[intro] CL.lub_upper[intro] |
|
460 |
||
23449 | 461 |
lemma (in CLF) lubH_le_flubH: |
462 |
"H = {x. (x, f x) \<in> r & x \<in> A} ==> (lub H cl, f (lub H cl)) \<in> r" |
|
463 |
apply (rule lub_least, fast) |
|
464 |
apply (rule f_in_funcset [THEN funcset_mem]) |
|
465 |
apply (rule lub_in_lattice, fast) |
|
63167 | 466 |
\<comment> \<open>\<open>\<forall>x:H. (x, f (lub H r)) \<in> r\<close>\<close> |
23449 | 467 |
apply (rule ballI) |
468 |
(*never proved, 2007-01-22*) |
|
469 |
apply (rule transE) |
|
63167 | 470 |
\<comment> \<open>instantiates \<open>(x, ?z) \<in> order cl to (x, f x)\<close>,\<close> |
471 |
\<comment> \<open>because of the definition of \<open>H\<close>\<close> |
|
23449 | 472 |
apply fast |
63167 | 473 |
\<comment> \<open>so it remains to show \<open>(f x, f (lub H cl)) \<in> r\<close>\<close> |
23449 | 474 |
apply (rule_tac f = "f" in monotoneE) |
475 |
apply (rule monotone_f, fast) |
|
476 |
apply (rule lub_in_lattice, fast) |
|
477 |
apply (rule lub_upper, fast) |
|
478 |
apply assumption |
|
479 |
done |
|
45705 | 480 |
|
481 |
declare CL.lub_least[rule del] CLF.f_in_funcset[rule del] |
|
482 |
funcset_mem[rule del] CL.lub_in_lattice[rule del] |
|
483 |
PO.transE[rule del] PO.monotoneE[rule del] |
|
484 |
CLF.monotone_f[rule del] CL.lub_upper[rule del] |
|
23449 | 485 |
|
486 |
(*never proved, 2007-01-22*) |
|
45705 | 487 |
|
488 |
declare CLF.f_in_funcset[intro] funcset_mem[intro] CL.lub_in_lattice[intro] |
|
489 |
PO.monotoneE[intro] CLF.monotone_f[intro] CL.lub_upper[intro] |
|
490 |
CLF.lubH_le_flubH[simp] |
|
491 |
||
23449 | 492 |
lemma (in CLF) flubH_le_lubH: |
493 |
"[| H = {x. (x, f x) \<in> r & x \<in> A} |] ==> (f (lub H cl), lub H cl) \<in> r" |
|
494 |
apply (rule lub_upper, fast) |
|
495 |
apply (rule_tac t = "H" in ssubst, assumption) |
|
82248 | 496 |
apply (rule CollectI) |
497 |
by (metis (lifting) Pi_iff f_in_funcset lubH_le_flubH lub_in_lattice |
|
498 |
mem_Collect_eq monotoneE monotone_f subsetI) |
|
23449 | 499 |
|
45705 | 500 |
declare CLF.f_in_funcset[rule del] funcset_mem[rule del] |
501 |
CL.lub_in_lattice[rule del] PO.monotoneE[rule del] |
|
502 |
CLF.monotone_f[rule del] CL.lub_upper[rule del] |
|
503 |
CLF.lubH_le_flubH[simp del] |
|
23449 | 504 |
|
505 |
(*never proved, 2007-01-22*) |
|
45705 | 506 |
|
37622 | 507 |
(* Single-step version fails. The conjecture clauses refer to local abstraction |
508 |
functions (Frees). *) |
|
23449 | 509 |
lemma (in CLF) lubH_is_fixp: |
510 |
"H = {x. (x, f x) \<in> r & x \<in> A} ==> lub H cl \<in> fix f A" |
|
511 |
apply (simp add: fix_def) |
|
512 |
apply (rule conjI) |
|
36554
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
513 |
proof - |
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
514 |
assume A1: "H = {x. (x, f x) \<in> r \<and> x \<in> A}" |
42762
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
515 |
have F1: "\<forall>u v. v \<inter> u \<subseteq> u" by (metis Int_commute Int_lower1) |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
516 |
have "{R. (R, f R) \<in> r} \<inter> {R. R \<in> A} = H" using A1 by (metis Collect_conj_eq) |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
517 |
hence "H \<subseteq> {R. R \<in> A}" using F1 by metis |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
518 |
hence "H \<subseteq> A" by (metis Collect_mem_eq) |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
519 |
hence "lub H cl \<in> A" by (metis lub_in_lattice) |
0b3c3cf28218
prove one more lemma using Sledgehammer, with some guidance, and replace clumsy old proof that relied on old extensionality behavior
blanchet
parents:
42103
diff
changeset
|
520 |
thus "lub {x. (x, f x) \<in> r \<and> x \<in> A} cl \<in> A" using A1 by metis |
36554
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
521 |
next |
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
522 |
assume A1: "H = {x. (x, f x) \<in> r \<and> x \<in> A}" |
45970
b6d0cff57d96
adjusted to set/pred distinction by means of type constructor `set`
haftmann
parents:
45705
diff
changeset
|
523 |
have F1: "\<forall>v. {R. R \<in> v} = v" by (metis Collect_mem_eq) |
b6d0cff57d96
adjusted to set/pred distinction by means of type constructor `set`
haftmann
parents:
45705
diff
changeset
|
524 |
have F2: "\<forall>w u. {R. R \<in> u \<and> R \<in> w} = u \<inter> w" |
b6d0cff57d96
adjusted to set/pred distinction by means of type constructor `set`
haftmann
parents:
45705
diff
changeset
|
525 |
by (metis Collect_conj_eq Collect_mem_eq) |
b6d0cff57d96
adjusted to set/pred distinction by means of type constructor `set`
haftmann
parents:
45705
diff
changeset
|
526 |
have F3: "\<forall>x v. {R. v R \<in> x} = v -` x" by (metis vimage_def) |
36554
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
527 |
hence F4: "A \<inter> (\<lambda>R. (R, f R)) -` r = H" using A1 by auto |
64913 | 528 |
hence F5: "(f (lub H cl), lub H cl) \<in> r" |
45970
b6d0cff57d96
adjusted to set/pred distinction by means of type constructor `set`
haftmann
parents:
45705
diff
changeset
|
529 |
by (metis A1 flubH_le_lubH) |
36554
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
530 |
have F6: "(lub H cl, f (lub H cl)) \<in> r" |
45970
b6d0cff57d96
adjusted to set/pred distinction by means of type constructor `set`
haftmann
parents:
45705
diff
changeset
|
531 |
by (metis A1 lubH_le_flubH) |
36554
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
532 |
have "(lub H cl, f (lub H cl)) \<in> r \<longrightarrow> f (lub H cl) = lub H cl" |
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
533 |
using F5 by (metis antisymE) |
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
534 |
hence "f (lub H cl) = lub H cl" using F6 by metis |
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
535 |
thus "H = {x. (x, f x) \<in> r \<and> x \<in> A} |
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
536 |
\<Longrightarrow> f (lub {x. (x, f x) \<in> r \<and> x \<in> A} cl) = |
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
537 |
lub {x. (x, f x) \<in> r \<and> x \<in> A} cl" |
45970
b6d0cff57d96
adjusted to set/pred distinction by means of type constructor `set`
haftmann
parents:
45705
diff
changeset
|
538 |
by metis |
24827 | 539 |
qed |
23449 | 540 |
|
25710
4cdf7de81e1b
Replaced refs by config params; finer critical section in mets method
paulson
parents:
24855
diff
changeset
|
541 |
lemma (in CLF) (*lubH_is_fixp:*) |
23449 | 542 |
"H = {x. (x, f x) \<in> r & x \<in> A} ==> lub H cl \<in> fix f A" |
543 |
apply (simp add: fix_def) |
|
82248 | 544 |
apply (rule conjI) |
545 |
subgoal |
|
546 |
by (metis (lifting) fix_def lubH_is_fixp mem_Collect_eq) |
|
547 |
subgoal |
|
548 |
by (metis antisymE flubH_le_lubH lubH_le_flubH) |
|
549 |
done |
|
23449 | 550 |
|
551 |
lemma (in CLF) fix_in_H: |
|
552 |
"[| H = {x. (x, f x) \<in> r & x \<in> A}; x \<in> P |] ==> x \<in> H" |
|
30198 | 553 |
by (simp add: P_def fix_imp_eq [of _ f A] reflE CO_refl_on |
23449 | 554 |
fix_subset [of f A, THEN subsetD]) |
555 |
||
556 |
lemma (in CLF) fixf_le_lubH: |
|
557 |
"H = {x. (x, f x) \<in> r & x \<in> A} ==> \<forall>x \<in> fix f A. (x, lub H cl) \<in> r" |
|
558 |
apply (rule ballI) |
|
559 |
apply (rule lub_upper, fast) |
|
560 |
apply (rule fix_in_H) |
|
561 |
apply (simp_all add: P_def) |
|
562 |
done |
|
563 |
||
564 |
lemma (in CLF) lubH_least_fixf: |
|
565 |
"H = {x. (x, f x) \<in> r & x \<in> A} |
|
566 |
==> \<forall>L. (\<forall>y \<in> fix f A. (y,L) \<in> r) --> (lub H cl, L) \<in> r" |
|
567 |
apply (metis P_def lubH_is_fixp) |
|
568 |
done |
|
569 |
||
63167 | 570 |
subsection \<open>Tarski fixpoint theorem 1, first part\<close> |
45705 | 571 |
|
572 |
declare CL.lubI[intro] fix_subset[intro] CL.lub_in_lattice[intro] |
|
573 |
CLF.fixf_le_lubH[simp] CLF.lubH_least_fixf[simp] |
|
574 |
||
23449 | 575 |
lemma (in CLF) T_thm_1_lub: "lub P cl = lub {x. (x, f x) \<in> r & x \<in> A} cl" |
576 |
(*sledgehammer;*) |
|
577 |
apply (rule sym) |
|
578 |
apply (simp add: P_def) |
|
579 |
apply (rule lubI) |
|
58944 | 580 |
apply (simp add: fix_subset) |
581 |
using fix_subset lubH_is_fixp apply fastforce |
|
582 |
apply (simp add: fixf_le_lubH) |
|
583 |
using lubH_is_fixp apply blast |
|
584 |
done |
|
23449 | 585 |
|
45705 | 586 |
declare CL.lubI[rule del] fix_subset[rule del] CL.lub_in_lattice[rule del] |
587 |
CLF.fixf_le_lubH[simp del] CLF.lubH_least_fixf[simp del] |
|
23449 | 588 |
|
589 |
(*never proved, 2007-01-22*) |
|
45705 | 590 |
|
591 |
declare glb_dual_lub[simp] PO.dualA_iff[intro] CLF.lubH_is_fixp[intro] |
|
592 |
PO.dualPO[intro] CL.CL_dualCL[intro] PO.dualr_iff[simp] |
|
593 |
||
23449 | 594 |
lemma (in CLF) glbH_is_fixp: "H = {x. (f x, x) \<in> r & x \<in> A} ==> glb H cl \<in> P" |
63167 | 595 |
\<comment> \<open>Tarski for glb\<close> |
23449 | 596 |
(*sledgehammer;*) |
597 |
apply (simp add: glb_dual_lub P_def A_def r_def) |
|
598 |
apply (rule dualA_iff [THEN subst]) |
|
599 |
apply (rule CLF.lubH_is_fixp) |
|
27681 | 600 |
apply (rule CLF.intro) |
601 |
apply (rule CL.intro) |
|
602 |
apply (rule PO.intro) |
|
23449 | 603 |
apply (rule dualPO) |
27681 | 604 |
apply (rule CL_axioms.intro) |
23449 | 605 |
apply (rule CL_dualCL) |
27681 | 606 |
apply (rule CLF_axioms.intro) |
23449 | 607 |
apply (rule CLF_dual) |
608 |
apply (simp add: dualr_iff dualA_iff) |
|
609 |
done |
|
610 |
||
45705 | 611 |
declare glb_dual_lub[simp del] PO.dualA_iff[rule del] CLF.lubH_is_fixp[rule del] |
612 |
PO.dualPO[rule del] CL.CL_dualCL[rule del] PO.dualr_iff[simp del] |
|
23449 | 613 |
|
614 |
(*never proved, 2007-01-22*) |
|
45705 | 615 |
|
23449 | 616 |
lemma (in CLF) T_thm_1_glb: "glb P cl = glb {x. (f x, x) \<in> r & x \<in> A} cl" |
617 |
(*sledgehammer;*) |
|
618 |
apply (simp add: glb_dual_lub P_def A_def r_def) |
|
619 |
apply (rule dualA_iff [THEN subst]) |
|
620 |
(*never proved, 2007-01-22*) |
|
621 |
(*sledgehammer;*) |
|
27681 | 622 |
apply (simp add: CLF.T_thm_1_lub [of _ f, OF CLF.intro, OF CL.intro CLF_axioms.intro, OF PO.intro CL_axioms.intro, |
623 |
OF dualPO CL_dualCL] dualPO CL_dualCL CLF_dual dualr_iff) |
|
23449 | 624 |
done |
625 |
||
63167 | 626 |
subsection \<open>interval\<close> |
23449 | 627 |
|
45705 | 628 |
declare (in CLF) CO_refl_on[simp] refl_on_def [simp] |
23449 | 629 |
|
630 |
lemma (in CLF) rel_imp_elem: "(x, y) \<in> r ==> x \<in> A" |
|
82248 | 631 |
by (metis (no_types, lifting) A_def PartialOrder_def cl_po mem_Collect_eq |
632 |
mem_Sigma_iff r_def subsetD) |
|
45705 | 633 |
|
634 |
declare (in CLF) CO_refl_on[simp del] refl_on_def [simp del] |
|
23449 | 635 |
|
45705 | 636 |
declare (in CLF) rel_imp_elem[intro] |
637 |
declare interval_def [simp] |
|
638 |
||
23449 | 639 |
lemma (in CLF) interval_subset: "[| a \<in> A; b \<in> A |] ==> interval r a b \<subseteq> A" |
82248 | 640 |
by (metis PO.interval_imp_mem PO.intro dualPO dualr_iff interval_dual r_def |
641 |
rel_imp_elem subsetI) |
|
23449 | 642 |
|
45705 | 643 |
declare (in CLF) rel_imp_elem[rule del] |
644 |
declare interval_def [simp del] |
|
23449 | 645 |
|
646 |
lemma (in CLF) intervalI: |
|
647 |
"[| (a, x) \<in> r; (x, b) \<in> r |] ==> x \<in> interval r a b" |
|
648 |
by (simp add: interval_def) |
|
649 |
||
650 |
lemma (in CLF) interval_lemma1: |
|
651 |
"[| S \<subseteq> interval r a b; x \<in> S |] ==> (a, x) \<in> r" |
|
652 |
by (unfold interval_def, fast) |
|
653 |
||
654 |
lemma (in CLF) interval_lemma2: |
|
655 |
"[| S \<subseteq> interval r a b; x \<in> S |] ==> (x, b) \<in> r" |
|
656 |
by (unfold interval_def, fast) |
|
657 |
||
658 |
lemma (in CLF) a_less_lub: |
|
659 |
"[| S \<subseteq> A; S \<noteq> {}; |
|
660 |
\<forall>x \<in> S. (a,x) \<in> r; \<forall>y \<in> S. (y, L) \<in> r |] ==> (a,L) \<in> r" |
|
661 |
by (blast intro: transE) |
|
662 |
||
663 |
lemma (in CLF) glb_less_b: |
|
664 |
"[| S \<subseteq> A; S \<noteq> {}; |
|
665 |
\<forall>x \<in> S. (x,b) \<in> r; \<forall>y \<in> S. (G, y) \<in> r |] ==> (G,b) \<in> r" |
|
666 |
by (blast intro: transE) |
|
667 |
||
668 |
lemma (in CLF) S_intv_cl: |
|
669 |
"[| a \<in> A; b \<in> A; S \<subseteq> interval r a b |]==> S \<subseteq> A" |
|
670 |
by (simp add: subset_trans [OF _ interval_subset]) |
|
671 |
||
45705 | 672 |
|
23449 | 673 |
lemma (in CLF) L_in_interval: |
674 |
"[| a \<in> A; b \<in> A; S \<subseteq> interval r a b; |
|
43197 | 675 |
S \<noteq> {}; isLub S cl L; interval r a b \<noteq> {} |] ==> L \<in> interval r a b" |
23449 | 676 |
(*WON'T TERMINATE |
677 |
apply (metis CO_trans intervalI interval_lemma1 interval_lemma2 isLub_least isLub_upper subset_empty subset_iff trans_def) |
|
678 |
*) |
|
679 |
apply (rule intervalI) |
|
680 |
apply (rule a_less_lub) |
|
681 |
prefer 2 apply assumption |
|
682 |
apply (simp add: S_intv_cl) |
|
683 |
apply (rule ballI) |
|
684 |
apply (simp add: interval_lemma1) |
|
685 |
apply (simp add: isLub_upper) |
|
63167 | 686 |
\<comment> \<open>\<open>(L, b) \<in> r\<close>\<close> |
23449 | 687 |
apply (simp add: isLub_least interval_lemma2) |
688 |
done |
|
689 |
||
690 |
(*never proved, 2007-01-22*) |
|
45705 | 691 |
|
23449 | 692 |
lemma (in CLF) G_in_interval: |
693 |
"[| a \<in> A; b \<in> A; interval r a b \<noteq> {}; S \<subseteq> interval r a b; isGlb S cl G; |
|
694 |
S \<noteq> {} |] ==> G \<in> interval r a b" |
|
695 |
apply (simp add: interval_dual) |
|
27681 | 696 |
apply (simp add: CLF.L_in_interval [of _ f, OF CLF.intro, OF CL.intro CLF_axioms.intro, OF PO.intro CL_axioms.intro] |
23449 | 697 |
dualA_iff A_def dualPO CL_dualCL CLF_dual isGlb_dual_isLub) |
698 |
done |
|
699 |
||
45705 | 700 |
|
23449 | 701 |
lemma (in CLF) intervalPO: |
702 |
"[| a \<in> A; b \<in> A; interval r a b \<noteq> {} |] |
|
703 |
==> (| pset = interval r a b, order = induced (interval r a b) r |) |
|
704 |
\<in> PartialOrder" |
|
36554
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
705 |
proof - |
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
706 |
assume A1: "a \<in> A" |
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
707 |
assume "b \<in> A" |
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
708 |
hence "\<forall>u. u \<in> A \<longrightarrow> interval r u b \<subseteq> A" by (metis interval_subset) |
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
709 |
hence "interval r a b \<subseteq> A" using A1 by metis |
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
710 |
hence "interval r a b \<subseteq> A" by metis |
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
711 |
thus ?thesis by (metis po_subset_po) |
23449 | 712 |
qed |
713 |
||
714 |
lemma (in CLF) intv_CL_lub: |
|
715 |
"[| a \<in> A; b \<in> A; interval r a b \<noteq> {} |] |
|
716 |
==> \<forall>S. S \<subseteq> interval r a b --> |
|
717 |
(\<exists>L. isLub S (| pset = interval r a b, |
|
718 |
order = induced (interval r a b) r |) L)" |
|
719 |
apply (intro strip) |
|
720 |
apply (frule S_intv_cl [THEN CL_imp_ex_isLub]) |
|
721 |
prefer 2 apply assumption |
|
722 |
apply assumption |
|
723 |
apply (erule exE) |
|
63167 | 724 |
\<comment> \<open>define the lub for the interval as\<close> |
23449 | 725 |
apply (rule_tac x = "if S = {} then a else L" in exI) |
62390 | 726 |
apply (simp (no_asm_simp) add: isLub_def split del: if_split) |
23449 | 727 |
apply (intro impI conjI) |
63167 | 728 |
\<comment> \<open>\<open>(if S = {} then a else L) \<in> interval r a b\<close>\<close> |
23449 | 729 |
apply (simp add: CL_imp_PO L_in_interval) |
730 |
apply (simp add: left_in_interval) |
|
63167 | 731 |
\<comment> \<open>lub prop 1\<close> |
23449 | 732 |
apply (case_tac "S = {}") |
63167 | 733 |
\<comment> \<open>\<open>S = {}, y \<in> S = False => everything\<close>\<close> |
23449 | 734 |
apply fast |
63167 | 735 |
\<comment> \<open>\<open>S \<noteq> {}\<close>\<close> |
23449 | 736 |
apply simp |
63167 | 737 |
\<comment> \<open>\<open>\<forall>y:S. (y, L) \<in> induced (interval r a b) r\<close>\<close> |
23449 | 738 |
apply (rule ballI) |
739 |
apply (simp add: induced_def L_in_interval) |
|
740 |
apply (rule conjI) |
|
741 |
apply (rule subsetD) |
|
742 |
apply (simp add: S_intv_cl, assumption) |
|
743 |
apply (simp add: isLub_upper) |
|
63167 | 744 |
\<comment> \<open>\<open>\<forall>z:interval r a b. (\<forall>y:S. (y, z) \<in> induced (interval r a b) r \<longrightarrow> (if S = {} then a else L, z) \<in> induced (interval r a b) r\<close>\<close> |
23449 | 745 |
apply (rule ballI) |
746 |
apply (rule impI) |
|
747 |
apply (case_tac "S = {}") |
|
63167 | 748 |
\<comment> \<open>\<open>S = {}\<close>\<close> |
23449 | 749 |
apply simp |
750 |
apply (simp add: induced_def interval_def) |
|
751 |
apply (rule conjI) |
|
752 |
apply (rule reflE, assumption) |
|
753 |
apply (rule interval_not_empty) |
|
754 |
apply (rule CO_trans) |
|
755 |
apply (simp add: interval_def) |
|
63167 | 756 |
\<comment> \<open>\<open>S \<noteq> {}\<close>\<close> |
23449 | 757 |
apply simp |
758 |
apply (simp add: induced_def L_in_interval) |
|
759 |
apply (rule isLub_least, assumption) |
|
760 |
apply (rule subsetD) |
|
761 |
prefer 2 apply assumption |
|
762 |
apply (simp add: S_intv_cl, fast) |
|
763 |
done |
|
764 |
||
765 |
lemmas (in CLF) intv_CL_glb = intv_CL_lub [THEN Rdual] |
|
766 |
||
767 |
(*never proved, 2007-01-22*) |
|
45705 | 768 |
|
23449 | 769 |
lemma (in CLF) interval_is_sublattice: |
770 |
"[| a \<in> A; b \<in> A; interval r a b \<noteq> {} |] |
|
771 |
==> interval r a b <<= cl" |
|
772 |
(*sledgehammer *) |
|
773 |
apply (rule sublatticeI) |
|
774 |
apply (simp add: interval_subset) |
|
775 |
(*never proved, 2007-01-22*) |
|
776 |
(*sledgehammer *) |
|
777 |
apply (rule CompleteLatticeI) |
|
778 |
apply (simp add: intervalPO) |
|
779 |
apply (simp add: intv_CL_lub) |
|
780 |
apply (simp add: intv_CL_glb) |
|
781 |
done |
|
782 |
||
783 |
lemmas (in CLF) interv_is_compl_latt = |
|
784 |
interval_is_sublattice [THEN sublattice_imp_CL] |
|
785 |
||
63167 | 786 |
subsection \<open>Top and Bottom\<close> |
23449 | 787 |
lemma (in CLF) Top_dual_Bot: "Top cl = Bot (dual cl)" |
788 |
by (simp add: Top_def Bot_def least_def greatest_def dualA_iff dualr_iff) |
|
789 |
||
790 |
lemma (in CLF) Bot_dual_Top: "Bot cl = Top (dual cl)" |
|
791 |
by (simp add: Top_def Bot_def least_def greatest_def dualA_iff dualr_iff) |
|
792 |
||
45705 | 793 |
|
23449 | 794 |
lemma (in CLF) Bot_in_lattice: "Bot cl \<in> A" |
795 |
(*sledgehammer; *) |
|
796 |
apply (simp add: Bot_def least_def) |
|
797 |
apply (rule_tac a="glb A cl" in someI2) |
|
43197 | 798 |
apply (simp_all add: glb_in_lattice glb_lower |
23449 | 799 |
r_def [symmetric] A_def [symmetric]) |
800 |
done |
|
801 |
||
802 |
(*first proved 2007-01-25 after relaxing relevance*) |
|
45705 | 803 |
|
23449 | 804 |
lemma (in CLF) Top_in_lattice: "Top cl \<in> A" |
805 |
(*sledgehammer;*) |
|
806 |
apply (simp add: Top_dual_Bot A_def) |
|
807 |
(*first proved 2007-01-25 after relaxing relevance*) |
|
808 |
(*sledgehammer*) |
|
809 |
apply (rule dualA_iff [THEN subst]) |
|
27681 | 810 |
apply (blast intro!: CLF.Bot_in_lattice [OF CLF.intro, OF CL.intro CLF_axioms.intro, OF PO.intro CL_axioms.intro] dualPO CL_dualCL CLF_dual) |
23449 | 811 |
done |
812 |
||
813 |
lemma (in CLF) Top_prop: "x \<in> A ==> (x, Top cl) \<in> r" |
|
814 |
apply (simp add: Top_def greatest_def) |
|
815 |
apply (rule_tac a="lub A cl" in someI2) |
|
816 |
apply (rule someI2) |
|
43197 | 817 |
apply (simp_all add: lub_in_lattice lub_upper |
23449 | 818 |
r_def [symmetric] A_def [symmetric]) |
819 |
done |
|
820 |
||
821 |
(*never proved, 2007-01-22*) |
|
45705 | 822 |
|
23449 | 823 |
lemma (in CLF) Bot_prop: "x \<in> A ==> (Bot cl, x) \<in> r" |
43197 | 824 |
(*sledgehammer*) |
23449 | 825 |
apply (simp add: Bot_dual_Top r_def) |
826 |
apply (rule dualr_iff [THEN subst]) |
|
27681 | 827 |
apply (simp add: CLF.Top_prop [of _ f, OF CLF.intro, OF CL.intro CLF_axioms.intro, OF PO.intro CL_axioms.intro] |
23449 | 828 |
dualA_iff A_def dualPO CL_dualCL CLF_dual) |
829 |
done |
|
830 |
||
45705 | 831 |
|
43197 | 832 |
lemma (in CLF) Top_intv_not_empty: "x \<in> A ==> interval r x (Top cl) \<noteq> {}" |
23449 | 833 |
apply (metis Top_in_lattice Top_prop empty_iff intervalI reflE) |
834 |
done |
|
835 |
||
45705 | 836 |
|
43197 | 837 |
lemma (in CLF) Bot_intv_not_empty: "x \<in> A ==> interval r (Bot cl) x \<noteq> {}" |
23449 | 838 |
apply (metis Bot_prop ex_in_conv intervalI reflE rel_imp_elem) |
839 |
done |
|
840 |
||
63167 | 841 |
subsection \<open>fixed points form a partial order\<close> |
23449 | 842 |
|
843 |
lemma (in CLF) fixf_po: "(| pset = P, order = induced P r|) \<in> PartialOrder" |
|
844 |
by (simp add: P_def fix_subset po_subset_po) |
|
845 |
||
846 |
(*first proved 2007-01-25 after relaxing relevance*) |
|
45705 | 847 |
|
848 |
declare (in Tarski) P_def[simp] Y_ss [simp] |
|
849 |
declare fix_subset [intro] subset_trans [intro] |
|
850 |
||
23449 | 851 |
lemma (in Tarski) Y_subset_A: "Y \<subseteq> A" |
43197 | 852 |
(*sledgehammer*) |
23449 | 853 |
apply (rule subset_trans [OF _ fix_subset]) |
854 |
apply (rule Y_ss [simplified P_def]) |
|
855 |
done |
|
856 |
||
45705 | 857 |
declare (in Tarski) P_def[simp del] Y_ss [simp del] |
858 |
declare fix_subset [rule del] subset_trans [rule del] |
|
23449 | 859 |
|
860 |
lemma (in Tarski) lubY_in_A: "lub Y cl \<in> A" |
|
861 |
by (rule Y_subset_A [THEN lub_in_lattice]) |
|
862 |
||
863 |
(*never proved, 2007-01-22*) |
|
45705 | 864 |
|
23449 | 865 |
lemma (in Tarski) lubY_le_flubY: "(lub Y cl, f (lub Y cl)) \<in> r" |
43197 | 866 |
(*sledgehammer*) |
23449 | 867 |
apply (rule lub_least) |
868 |
apply (rule Y_subset_A) |
|
869 |
apply (rule f_in_funcset [THEN funcset_mem]) |
|
870 |
apply (rule lubY_in_A) |
|
63167 | 871 |
\<comment> \<open>\<open>Y \<subseteq> P ==> f x = x\<close>\<close> |
23449 | 872 |
apply (rule ballI) |
873 |
(*sledgehammer *) |
|
874 |
apply (rule_tac t = "x" in fix_imp_eq [THEN subst]) |
|
875 |
apply (erule Y_ss [simplified P_def, THEN subsetD]) |
|
63167 | 876 |
\<comment> \<open>\<open>reduce (f x, f (lub Y cl)) \<in> r to (x, lub Y cl) \<in> r\<close> by monotonicity\<close> |
23449 | 877 |
(*sledgehammer*) |
878 |
apply (rule_tac f = "f" in monotoneE) |
|
879 |
apply (rule monotone_f) |
|
880 |
apply (simp add: Y_subset_A [THEN subsetD]) |
|
881 |
apply (rule lubY_in_A) |
|
882 |
apply (simp add: lub_upper Y_subset_A) |
|
883 |
done |
|
884 |
||
885 |
(*first proved 2007-01-25 after relaxing relevance*) |
|
45705 | 886 |
|
23449 | 887 |
lemma (in Tarski) intY1_subset: "intY1 \<subseteq> A" |
43197 | 888 |
(*sledgehammer*) |
23449 | 889 |
apply (unfold intY1_def) |
890 |
apply (rule interval_subset) |
|
891 |
apply (rule lubY_in_A) |
|
892 |
apply (rule Top_in_lattice) |
|
893 |
done |
|
894 |
||
895 |
lemmas (in Tarski) intY1_elem = intY1_subset [THEN subsetD] |
|
896 |
||
897 |
(*never proved, 2007-01-22*) |
|
45705 | 898 |
|
23449 | 899 |
lemma (in Tarski) intY1_f_closed: "x \<in> intY1 \<Longrightarrow> f x \<in> intY1" |
43197 | 900 |
(*sledgehammer*) |
23449 | 901 |
apply (simp add: intY1_def interval_def) |
902 |
apply (rule conjI) |
|
903 |
apply (rule transE) |
|
904 |
apply (rule lubY_le_flubY) |
|
63167 | 905 |
\<comment> \<open>\<open>(f (lub Y cl), f x) \<in> r\<close>\<close> |
23449 | 906 |
(*sledgehammer [has been proved before now...]*) |
907 |
apply (rule_tac f=f in monotoneE) |
|
908 |
apply (rule monotone_f) |
|
909 |
apply (rule lubY_in_A) |
|
910 |
apply (simp add: intY1_def interval_def intY1_elem) |
|
911 |
apply (simp add: intY1_def interval_def) |
|
63167 | 912 |
\<comment> \<open>\<open>(f x, Top cl) \<in> r\<close>\<close> |
23449 | 913 |
apply (rule Top_prop) |
914 |
apply (rule f_in_funcset [THEN funcset_mem]) |
|
915 |
apply (simp add: intY1_def interval_def intY1_elem) |
|
916 |
done |
|
917 |
||
45705 | 918 |
|
64913 | 919 |
lemma (in Tarski) intY1_func: "(\<lambda>x \<in> intY1. f x) \<in> intY1 \<rightarrow> intY1" |
73346 | 920 |
apply (rule restrictI) |
921 |
apply (metis intY1_f_closed) |
|
27368 | 922 |
done |
23449 | 923 |
|
45705 | 924 |
|
24855 | 925 |
lemma (in Tarski) intY1_mono: |
64913 | 926 |
"monotone (\<lambda>x \<in> intY1. f x) intY1 (induced intY1 r)" |
23449 | 927 |
(*sledgehammer *) |
928 |
apply (auto simp add: monotone_def induced_def intY1_f_closed) |
|
929 |
apply (blast intro: intY1_elem monotone_f [THEN monotoneE]) |
|
930 |
done |
|
931 |
||
932 |
(*proof requires relaxing relevance: 2007-01-25*) |
|
45705 | 933 |
|
23449 | 934 |
lemma (in Tarski) intY1_is_cl: |
935 |
"(| pset = intY1, order = induced intY1 r |) \<in> CompleteLattice" |
|
43197 | 936 |
(*sledgehammer*) |
23449 | 937 |
apply (unfold intY1_def) |
938 |
apply (rule interv_is_compl_latt) |
|
939 |
apply (rule lubY_in_A) |
|
940 |
apply (rule Top_in_lattice) |
|
941 |
apply (rule Top_intv_not_empty) |
|
942 |
apply (rule lubY_in_A) |
|
943 |
done |
|
944 |
||
945 |
(*never proved, 2007-01-22*) |
|
45705 | 946 |
|
23449 | 947 |
lemma (in Tarski) v_in_P: "v \<in> P" |
43197 | 948 |
(*sledgehammer*) |
23449 | 949 |
apply (unfold P_def) |
950 |
apply (rule_tac A = "intY1" in fixf_subset) |
|
951 |
apply (rule intY1_subset) |
|
27681 | 952 |
apply (simp add: CLF.glbH_is_fixp [OF CLF.intro, OF CL.intro CLF_axioms.intro, OF PO.intro CL_axioms.intro, OF _ intY1_is_cl, simplified] |
953 |
v_def CL_imp_PO intY1_is_cl CLF_set_def intY1_func intY1_mono) |
|
23449 | 954 |
done |
955 |
||
45705 | 956 |
|
23449 | 957 |
lemma (in Tarski) z_in_interval: |
958 |
"[| z \<in> P; \<forall>y\<in>Y. (y, z) \<in> induced P r |] ==> z \<in> intY1" |
|
959 |
(*sledgehammer *) |
|
960 |
apply (unfold intY1_def P_def) |
|
961 |
apply (rule intervalI) |
|
962 |
prefer 2 |
|
963 |
apply (erule fix_subset [THEN subsetD, THEN Top_prop]) |
|
964 |
apply (rule lub_least) |
|
965 |
apply (rule Y_subset_A) |
|
966 |
apply (fast elim!: fix_subset [THEN subsetD]) |
|
967 |
apply (simp add: induced_def) |
|
968 |
done |
|
969 |
||
45705 | 970 |
|
23449 | 971 |
lemma (in Tarski) f'z_in_int_rel: "[| z \<in> P; \<forall>y\<in>Y. (y, z) \<in> induced P r |] |
64913 | 972 |
==> ((\<lambda>x \<in> intY1. f x) z, z) \<in> induced intY1 r" |
58943
a1df119fad45
updated sledgehammer proof after breakdown of metis (exception Type.TUNIFY);
wenzelm
parents:
58889
diff
changeset
|
973 |
using P_def fix_imp_eq indI intY1_elem reflE z_in_interval by fastforce |
23449 | 974 |
|
975 |
(*never proved, 2007-01-22*) |
|
45705 | 976 |
|
23449 | 977 |
lemma (in Tarski) tarski_full_lemma: |
978 |
"\<exists>L. isLub Y (| pset = P, order = induced P r |) L" |
|
979 |
apply (rule_tac x = "v" in exI) |
|
980 |
apply (simp add: isLub_def) |
|
63167 | 981 |
\<comment> \<open>\<open>v \<in> P\<close>\<close> |
23449 | 982 |
apply (simp add: v_in_P) |
983 |
apply (rule conjI) |
|
43197 | 984 |
(*sledgehammer*) |
63167 | 985 |
\<comment> \<open>\<open>v\<close> is lub\<close> |
986 |
\<comment> \<open>\<open>1. \<forall>y:Y. (y, v) \<in> induced P r\<close>\<close> |
|
23449 | 987 |
apply (rule ballI) |
988 |
apply (simp add: induced_def subsetD v_in_P) |
|
989 |
apply (rule conjI) |
|
990 |
apply (erule Y_ss [THEN subsetD]) |
|
991 |
apply (rule_tac b = "lub Y cl" in transE) |
|
992 |
apply (rule lub_upper) |
|
993 |
apply (rule Y_subset_A, assumption) |
|
994 |
apply (rule_tac b = "Top cl" in interval_imp_mem) |
|
995 |
apply (simp add: v_def) |
|
996 |
apply (fold intY1_def) |
|
27681 | 997 |
apply (rule CL.glb_in_lattice [OF CL.intro, OF PO.intro CL_axioms.intro, OF _ intY1_is_cl, simplified]) |
23449 | 998 |
apply (simp add: CL_imp_PO intY1_is_cl, force) |
63167 | 999 |
\<comment> \<open>\<open>v\<close> is LEAST ub\<close> |
23449 | 1000 |
apply clarify |
1001 |
apply (rule indI) |
|
1002 |
prefer 3 apply assumption |
|
1003 |
prefer 2 apply (simp add: v_in_P) |
|
1004 |
apply (unfold v_def) |
|
1005 |
(*never proved, 2007-01-22*) |
|
43197 | 1006 |
(*sledgehammer*) |
23449 | 1007 |
apply (rule indE) |
1008 |
apply (rule_tac [2] intY1_subset) |
|
1009 |
(*never proved, 2007-01-22*) |
|
43197 | 1010 |
(*sledgehammer*) |
27681 | 1011 |
apply (rule CL.glb_lower [OF CL.intro, OF PO.intro CL_axioms.intro, OF _ intY1_is_cl, simplified]) |
23449 | 1012 |
apply (simp add: CL_imp_PO intY1_is_cl) |
1013 |
apply force |
|
1014 |
apply (simp add: induced_def intY1_f_closed z_in_interval) |
|
1015 |
apply (simp add: P_def fix_imp_eq [of _ f A] reflE |
|
1016 |
fix_subset [of f A, THEN subsetD]) |
|
1017 |
done |
|
1018 |
||
1019 |
lemma CompleteLatticeI_simp: |
|
1020 |
"[| (| pset = A, order = r |) \<in> PartialOrder; |
|
1021 |
\<forall>S. S \<subseteq> A --> (\<exists>L. isLub S (| pset = A, order = r |) L) |] |
|
1022 |
==> (| pset = A, order = r |) \<in> CompleteLattice" |
|
1023 |
by (simp add: CompleteLatticeI Rdual) |
|
1024 |
||
45705 | 1025 |
(*never proved, 2007-01-22*) |
23449 | 1026 |
|
45705 | 1027 |
declare (in CLF) fixf_po[intro] P_def [simp] A_def [simp] r_def [simp] |
1028 |
Tarski.tarski_full_lemma [intro] cl_po [intro] cl_co [intro] |
|
1029 |
CompleteLatticeI_simp [intro] |
|
1030 |
||
23449 | 1031 |
theorem (in CLF) Tarski_full: |
1032 |
"(| pset = P, order = induced P r|) \<in> CompleteLattice" |
|
73346 | 1033 |
using A_def CLF_axioms P_def Tarski.intro Tarski_axioms.intro fixf_po r_def by blast |
43197 | 1034 |
(*sledgehammer*) |
36554
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
1035 |
|
2673979cb54d
more neg_clausify proofs that get replaced by direct proofs
blanchet
parents:
35416
diff
changeset
|
1036 |
declare (in CLF) fixf_po [rule del] P_def [simp del] A_def [simp del] r_def [simp del] |
23449 | 1037 |
Tarski.tarski_full_lemma [rule del] cl_po [rule del] cl_co [rule del] |
1038 |
CompleteLatticeI_simp [rule del] |
|
1039 |
||
1040 |
end |