author | wenzelm |
Tue, 20 Oct 2009 19:52:04 +0200 | |
changeset 33027 | 9cf389429f6d |
parent 32960 | src/HOL/MetisExamples/Tarski.thy@69916a850301 |
child 35054 | a5db9779b026 |
permissions | -rw-r--r-- |
23449 | 1 |
(* Title: HOL/MetisTest/Tarski.thy |
2 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
3 |
||
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32864
diff
changeset
|
4 |
Testing the metis method. |
23449 | 5 |
*) |
6 |
||
7 |
header {* The Full Theorem of Tarski *} |
|
8 |
||
27368 | 9 |
theory Tarski |
10 |
imports Main FuncSet |
|
11 |
begin |
|
23449 | 12 |
|
13 |
(*Many of these higher-order problems appear to be impossible using the |
|
14 |
current linkup. They often seem to need either higher-order unification |
|
15 |
or explicit reasoning about connectives such as conjunction. The numerous |
|
16 |
set comprehensions are to blame.*) |
|
17 |
||
18 |
||
19 |
record 'a potype = |
|
20 |
pset :: "'a set" |
|
21 |
order :: "('a * 'a) set" |
|
22 |
||
23 |
constdefs |
|
24 |
monotone :: "['a => 'a, 'a set, ('a *'a)set] => bool" |
|
25 |
"monotone f A r == \<forall>x\<in>A. \<forall>y\<in>A. (x, y): r --> ((f x), (f y)) : r" |
|
26 |
||
27 |
least :: "['a => bool, 'a potype] => 'a" |
|
28 |
"least P po == @ x. x: pset po & P x & |
|
29 |
(\<forall>y \<in> pset po. P y --> (x,y): order po)" |
|
30 |
||
31 |
greatest :: "['a => bool, 'a potype] => 'a" |
|
32 |
"greatest P po == @ x. x: pset po & P x & |
|
33 |
(\<forall>y \<in> pset po. P y --> (y,x): order po)" |
|
34 |
||
35 |
lub :: "['a set, 'a potype] => 'a" |
|
36 |
"lub S po == least (%x. \<forall>y\<in>S. (y,x): order po) po" |
|
37 |
||
38 |
glb :: "['a set, 'a potype] => 'a" |
|
39 |
"glb S po == greatest (%x. \<forall>y\<in>S. (x,y): order po) po" |
|
40 |
||
41 |
isLub :: "['a set, 'a potype, 'a] => bool" |
|
42 |
"isLub S po == %L. (L: pset po & (\<forall>y\<in>S. (y,L): order po) & |
|
43 |
(\<forall>z\<in>pset po. (\<forall>y\<in>S. (y,z): order po) --> (L,z): order po))" |
|
44 |
||
45 |
isGlb :: "['a set, 'a potype, 'a] => bool" |
|
46 |
"isGlb S po == %G. (G: pset po & (\<forall>y\<in>S. (G,y): order po) & |
|
47 |
(\<forall>z \<in> pset po. (\<forall>y\<in>S. (z,y): order po) --> (z,G): order po))" |
|
48 |
||
49 |
"fix" :: "[('a => 'a), 'a set] => 'a set" |
|
50 |
"fix f A == {x. x: A & f x = x}" |
|
51 |
||
52 |
interval :: "[('a*'a) set,'a, 'a ] => 'a set" |
|
53 |
"interval r a b == {x. (a,x): r & (x,b): r}" |
|
54 |
||
55 |
constdefs |
|
56 |
Bot :: "'a potype => 'a" |
|
57 |
"Bot po == least (%x. True) po" |
|
58 |
||
59 |
Top :: "'a potype => 'a" |
|
60 |
"Top po == greatest (%x. True) po" |
|
61 |
||
62 |
PartialOrder :: "('a potype) set" |
|
30198 | 63 |
"PartialOrder == {P. refl_on (pset P) (order P) & antisym (order P) & |
23449 | 64 |
trans (order P)}" |
65 |
||
66 |
CompleteLattice :: "('a potype) set" |
|
67 |
"CompleteLattice == {cl. cl: PartialOrder & |
|
68 |
(\<forall>S. S \<subseteq> pset cl --> (\<exists>L. isLub S cl L)) & |
|
69 |
(\<forall>S. S \<subseteq> pset cl --> (\<exists>G. isGlb S cl G))}" |
|
70 |
||
71 |
induced :: "['a set, ('a * 'a) set] => ('a *'a)set" |
|
72 |
"induced A r == {(a,b). a : A & b: A & (a,b): r}" |
|
73 |
||
74 |
constdefs |
|
75 |
sublattice :: "('a potype * 'a set)set" |
|
76 |
"sublattice == |
|
77 |
SIGMA cl: CompleteLattice. |
|
78 |
{S. S \<subseteq> pset cl & |
|
79 |
(| pset = S, order = induced S (order cl) |): CompleteLattice }" |
|
80 |
||
81 |
syntax |
|
82 |
"@SL" :: "['a set, 'a potype] => bool" ("_ <<= _" [51,50]50) |
|
83 |
||
84 |
translations |
|
85 |
"S <<= cl" == "S : sublattice `` {cl}" |
|
86 |
||
87 |
constdefs |
|
88 |
dual :: "'a potype => 'a potype" |
|
89 |
"dual po == (| pset = pset po, order = converse (order po) |)" |
|
90 |
||
27681 | 91 |
locale PO = |
23449 | 92 |
fixes cl :: "'a potype" |
93 |
and A :: "'a set" |
|
94 |
and r :: "('a * 'a) set" |
|
95 |
assumes cl_po: "cl : PartialOrder" |
|
96 |
defines A_def: "A == pset cl" |
|
97 |
and r_def: "r == order cl" |
|
98 |
||
27681 | 99 |
locale CL = PO + |
23449 | 100 |
assumes cl_co: "cl : CompleteLattice" |
101 |
||
27681 | 102 |
definition CLF_set :: "('a potype * ('a => 'a)) set" where |
103 |
"CLF_set = (SIGMA cl: CompleteLattice. |
|
104 |
{f. f: pset cl -> pset cl & monotone f (pset cl) (order cl)})" |
|
105 |
||
106 |
locale CLF = CL + |
|
23449 | 107 |
fixes f :: "'a => 'a" |
108 |
and P :: "'a set" |
|
27681 | 109 |
assumes f_cl: "(cl,f) : CLF_set" (*was the equivalent "f : CLF``{cl}"*) |
23449 | 110 |
defines P_def: "P == fix f A" |
111 |
||
112 |
||
27681 | 113 |
locale Tarski = CLF + |
23449 | 114 |
fixes Y :: "'a set" |
115 |
and intY1 :: "'a set" |
|
116 |
and v :: "'a" |
|
117 |
assumes |
|
118 |
Y_ss: "Y \<subseteq> P" |
|
119 |
defines |
|
120 |
intY1_def: "intY1 == interval r (lub Y cl) (Top cl)" |
|
121 |
and v_def: "v == glb {x. ((%x: intY1. f x) x, x): induced intY1 r & |
|
122 |
x: intY1} |
|
123 |
(| pset=intY1, order=induced intY1 r|)" |
|
124 |
||
125 |
||
126 |
subsection {* Partial Order *} |
|
127 |
||
30198 | 128 |
lemma (in PO) PO_imp_refl_on: "refl_on A r" |
23449 | 129 |
apply (insert cl_po) |
130 |
apply (simp add: PartialOrder_def A_def r_def) |
|
131 |
done |
|
132 |
||
133 |
lemma (in PO) PO_imp_sym: "antisym r" |
|
134 |
apply (insert cl_po) |
|
135 |
apply (simp add: PartialOrder_def r_def) |
|
136 |
done |
|
137 |
||
138 |
lemma (in PO) PO_imp_trans: "trans r" |
|
139 |
apply (insert cl_po) |
|
140 |
apply (simp add: PartialOrder_def r_def) |
|
141 |
done |
|
142 |
||
143 |
lemma (in PO) reflE: "x \<in> A ==> (x, x) \<in> r" |
|
144 |
apply (insert cl_po) |
|
30198 | 145 |
apply (simp add: PartialOrder_def refl_on_def A_def r_def) |
23449 | 146 |
done |
147 |
||
148 |
lemma (in PO) antisymE: "[| (a, b) \<in> r; (b, a) \<in> r |] ==> a = b" |
|
149 |
apply (insert cl_po) |
|
150 |
apply (simp add: PartialOrder_def antisym_def r_def) |
|
151 |
done |
|
152 |
||
153 |
lemma (in PO) transE: "[| (a, b) \<in> r; (b, c) \<in> r|] ==> (a,c) \<in> r" |
|
154 |
apply (insert cl_po) |
|
155 |
apply (simp add: PartialOrder_def r_def) |
|
156 |
apply (unfold trans_def, fast) |
|
157 |
done |
|
158 |
||
159 |
lemma (in PO) monotoneE: |
|
160 |
"[| monotone f A r; x \<in> A; y \<in> A; (x, y) \<in> r |] ==> (f x, f y) \<in> r" |
|
161 |
by (simp add: monotone_def) |
|
162 |
||
163 |
lemma (in PO) po_subset_po: |
|
164 |
"S \<subseteq> A ==> (| pset = S, order = induced S r |) \<in> PartialOrder" |
|
165 |
apply (simp (no_asm) add: PartialOrder_def) |
|
166 |
apply auto |
|
167 |
-- {* refl *} |
|
30198 | 168 |
apply (simp add: refl_on_def induced_def) |
23449 | 169 |
apply (blast intro: reflE) |
170 |
-- {* antisym *} |
|
171 |
apply (simp add: antisym_def induced_def) |
|
172 |
apply (blast intro: antisymE) |
|
173 |
-- {* trans *} |
|
174 |
apply (simp add: trans_def induced_def) |
|
175 |
apply (blast intro: transE) |
|
176 |
done |
|
177 |
||
178 |
lemma (in PO) indE: "[| (x, y) \<in> induced S r; S \<subseteq> A |] ==> (x, y) \<in> r" |
|
179 |
by (simp add: add: induced_def) |
|
180 |
||
181 |
lemma (in PO) indI: "[| (x, y) \<in> r; x \<in> S; y \<in> S |] ==> (x, y) \<in> induced S r" |
|
182 |
by (simp add: add: induced_def) |
|
183 |
||
184 |
lemma (in CL) CL_imp_ex_isLub: "S \<subseteq> A ==> \<exists>L. isLub S cl L" |
|
185 |
apply (insert cl_co) |
|
186 |
apply (simp add: CompleteLattice_def A_def) |
|
187 |
done |
|
188 |
||
189 |
declare (in CL) cl_co [simp] |
|
190 |
||
191 |
lemma isLub_lub: "(\<exists>L. isLub S cl L) = isLub S cl (lub S cl)" |
|
192 |
by (simp add: lub_def least_def isLub_def some_eq_ex [symmetric]) |
|
193 |
||
194 |
lemma isGlb_glb: "(\<exists>G. isGlb S cl G) = isGlb S cl (glb S cl)" |
|
195 |
by (simp add: glb_def greatest_def isGlb_def some_eq_ex [symmetric]) |
|
196 |
||
197 |
lemma isGlb_dual_isLub: "isGlb S cl = isLub S (dual cl)" |
|
198 |
by (simp add: isLub_def isGlb_def dual_def converse_def) |
|
199 |
||
200 |
lemma isLub_dual_isGlb: "isLub S cl = isGlb S (dual cl)" |
|
201 |
by (simp add: isLub_def isGlb_def dual_def converse_def) |
|
202 |
||
203 |
lemma (in PO) dualPO: "dual cl \<in> PartialOrder" |
|
204 |
apply (insert cl_po) |
|
30198 | 205 |
apply (simp add: PartialOrder_def dual_def refl_on_converse |
23449 | 206 |
trans_converse antisym_converse) |
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)" |
|
222 |
by (simp add: lub_def glb_def least_def greatest_def dual_def converse_def) |
|
223 |
||
224 |
lemma glb_dual_lub: "glb S cl = lub S (dual cl)" |
|
225 |
by (simp add: lub_def glb_def least_def greatest_def dual_def converse_def) |
|
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: |
|
267 |
"monotone f (pset cl) (order cl) |
|
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 |
||
300 |
||
301 |
subsection {* sublattice *} |
|
302 |
||
303 |
lemma (in PO) sublattice_imp_CL: |
|
304 |
"S <<= cl ==> (| pset = S, order = induced S r |) \<in> CompleteLattice" |
|
305 |
by (simp add: sublattice_def CompleteLattice_def A_def r_def) |
|
306 |
||
307 |
lemma (in CL) sublatticeI: |
|
308 |
"[| S \<subseteq> A; (| pset = S, order = induced S r |) \<in> CompleteLattice |] |
|
309 |
==> S <<= cl" |
|
310 |
by (simp add: sublattice_def A_def r_def) |
|
311 |
||
312 |
||
313 |
subsection {* lub *} |
|
314 |
||
315 |
lemma (in CL) lub_unique: "[| S \<subseteq> A; isLub S cl x; isLub S cl L|] ==> x = L" |
|
316 |
apply (rule antisymE) |
|
317 |
apply (auto simp add: isLub_def r_def) |
|
318 |
done |
|
319 |
||
320 |
lemma (in CL) lub_upper: "[|S \<subseteq> A; x \<in> S|] ==> (x, lub S cl) \<in> r" |
|
321 |
apply (rule CL_imp_ex_isLub [THEN exE], assumption) |
|
322 |
apply (unfold lub_def least_def) |
|
323 |
apply (rule some_equality [THEN ssubst]) |
|
324 |
apply (simp add: isLub_def) |
|
325 |
apply (simp add: lub_unique A_def isLub_def) |
|
326 |
apply (simp add: isLub_def r_def) |
|
327 |
done |
|
328 |
||
329 |
lemma (in CL) lub_least: |
|
330 |
"[| S \<subseteq> A; L \<in> A; \<forall>x \<in> S. (x,L) \<in> r |] ==> (lub S cl, L) \<in> r" |
|
331 |
apply (rule CL_imp_ex_isLub [THEN exE], assumption) |
|
332 |
apply (unfold lub_def least_def) |
|
333 |
apply (rule_tac s=x in some_equality [THEN ssubst]) |
|
334 |
apply (simp add: isLub_def) |
|
335 |
apply (simp add: lub_unique A_def isLub_def) |
|
336 |
apply (simp add: isLub_def r_def A_def) |
|
337 |
done |
|
338 |
||
339 |
lemma (in CL) lub_in_lattice: "S \<subseteq> A ==> lub S cl \<in> A" |
|
340 |
apply (rule CL_imp_ex_isLub [THEN exE], assumption) |
|
341 |
apply (unfold lub_def least_def) |
|
342 |
apply (subst some_equality) |
|
343 |
apply (simp add: isLub_def) |
|
344 |
prefer 2 apply (simp add: isLub_def A_def) |
|
345 |
apply (simp add: lub_unique A_def isLub_def) |
|
346 |
done |
|
347 |
||
348 |
lemma (in CL) lubI: |
|
349 |
"[| S \<subseteq> A; L \<in> A; \<forall>x \<in> S. (x,L) \<in> r; |
|
350 |
\<forall>z \<in> A. (\<forall>y \<in> S. (y,z) \<in> r) --> (L,z) \<in> r |] ==> L = lub S cl" |
|
351 |
apply (rule lub_unique, assumption) |
|
352 |
apply (simp add: isLub_def A_def r_def) |
|
353 |
apply (unfold isLub_def) |
|
354 |
apply (rule conjI) |
|
355 |
apply (fold A_def r_def) |
|
356 |
apply (rule lub_in_lattice, assumption) |
|
357 |
apply (simp add: lub_upper lub_least) |
|
358 |
done |
|
359 |
||
360 |
lemma (in CL) lubIa: "[| S \<subseteq> A; isLub S cl L |] ==> L = lub S cl" |
|
361 |
by (simp add: lubI isLub_def A_def r_def) |
|
362 |
||
363 |
lemma (in CL) isLub_in_lattice: "isLub S cl L ==> L \<in> A" |
|
364 |
by (simp add: isLub_def A_def) |
|
365 |
||
366 |
lemma (in CL) isLub_upper: "[|isLub S cl L; y \<in> S|] ==> (y, L) \<in> r" |
|
367 |
by (simp add: isLub_def r_def) |
|
368 |
||
369 |
lemma (in CL) isLub_least: |
|
370 |
"[| isLub S cl L; z \<in> A; \<forall>y \<in> S. (y, z) \<in> r|] ==> (L, z) \<in> r" |
|
371 |
by (simp add: isLub_def A_def r_def) |
|
372 |
||
373 |
lemma (in CL) isLubI: |
|
374 |
"[| L \<in> A; \<forall>y \<in> S. (y, L) \<in> r; |
|
375 |
(\<forall>z \<in> A. (\<forall>y \<in> S. (y, z):r) --> (L, z) \<in> r)|] ==> isLub S cl L" |
|
376 |
by (simp add: isLub_def A_def r_def) |
|
377 |
||
378 |
||
379 |
||
380 |
subsection {* glb *} |
|
381 |
||
382 |
lemma (in CL) glb_in_lattice: "S \<subseteq> A ==> glb S cl \<in> A" |
|
383 |
apply (subst glb_dual_lub) |
|
384 |
apply (simp add: A_def) |
|
385 |
apply (rule dualA_iff [THEN subst]) |
|
386 |
apply (rule CL.lub_in_lattice) |
|
27681 | 387 |
apply (rule CL.intro) |
388 |
apply (rule PO.intro) |
|
23449 | 389 |
apply (rule dualPO) |
27681 | 390 |
apply (rule CL_axioms.intro) |
23449 | 391 |
apply (rule CL_dualCL) |
392 |
apply (simp add: dualA_iff) |
|
393 |
done |
|
394 |
||
395 |
lemma (in CL) glb_lower: "[|S \<subseteq> A; x \<in> S|] ==> (glb S cl, x) \<in> r" |
|
396 |
apply (subst glb_dual_lub) |
|
397 |
apply (simp add: r_def) |
|
398 |
apply (rule dualr_iff [THEN subst]) |
|
399 |
apply (rule CL.lub_upper) |
|
27681 | 400 |
apply (rule CL.intro) |
401 |
apply (rule PO.intro) |
|
23449 | 402 |
apply (rule dualPO) |
27681 | 403 |
apply (rule CL_axioms.intro) |
23449 | 404 |
apply (rule CL_dualCL) |
405 |
apply (simp add: dualA_iff A_def, assumption) |
|
406 |
done |
|
407 |
||
408 |
text {* |
|
409 |
Reduce the sublattice property by using substructural properties; |
|
410 |
abandoned see @{text "Tarski_4.ML"}. |
|
411 |
*} |
|
412 |
||
413 |
declare (in CLF) f_cl [simp] |
|
414 |
||
415 |
(*never proved, 2007-01-22: Tarski__CLF_unnamed_lemma |
|
416 |
NOT PROVABLE because of the conjunction used in the definition: we don't |
|
417 |
allow reasoning with rules like conjE, which is essential here.*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
418 |
declare [[ atp_problem_prefix = "Tarski__CLF_unnamed_lemma" ]] |
23449 | 419 |
lemma (in CLF) [simp]: |
420 |
"f: pset cl -> pset cl & monotone f (pset cl) (order cl)" |
|
421 |
apply (insert f_cl) |
|
27681 | 422 |
apply (unfold CLF_set_def) |
23449 | 423 |
apply (erule SigmaE2) |
424 |
apply (erule CollectE) |
|
27681 | 425 |
apply assumption |
23449 | 426 |
done |
427 |
||
428 |
lemma (in CLF) f_in_funcset: "f \<in> A -> A" |
|
429 |
by (simp add: A_def) |
|
430 |
||
431 |
lemma (in CLF) monotone_f: "monotone f A r" |
|
432 |
by (simp add: A_def r_def) |
|
433 |
||
434 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
435 |
declare [[ atp_problem_prefix = "Tarski__CLF_CLF_dual" ]] |
27681 | 436 |
declare (in CLF) CLF_set_def [simp] CL_dualCL [simp] monotone_dual [simp] dualA_iff [simp] |
437 |
||
438 |
lemma (in CLF) CLF_dual: "(dual cl, f) \<in> CLF_set" |
|
23449 | 439 |
apply (simp del: dualA_iff) |
440 |
apply (simp) |
|
441 |
done |
|
27681 | 442 |
|
443 |
declare (in CLF) CLF_set_def[simp del] CL_dualCL[simp del] monotone_dual[simp del] |
|
23449 | 444 |
dualA_iff[simp del] |
445 |
||
446 |
||
447 |
subsection {* fixed points *} |
|
448 |
||
449 |
lemma fix_subset: "fix f A \<subseteq> A" |
|
450 |
by (simp add: fix_def, fast) |
|
451 |
||
452 |
lemma fix_imp_eq: "x \<in> fix f A ==> f x = x" |
|
453 |
by (simp add: fix_def) |
|
454 |
||
455 |
lemma fixf_subset: |
|
456 |
"[| A \<subseteq> B; x \<in> fix (%y: A. f y) A |] ==> x \<in> fix f B" |
|
457 |
by (simp add: fix_def, auto) |
|
458 |
||
459 |
||
460 |
subsection {* lemmas for Tarski, lub *} |
|
461 |
||
462 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
463 |
declare [[ atp_problem_prefix = "Tarski__CLF_lubH_le_flubH" ]] |
23449 | 464 |
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] |
465 |
lemma (in CLF) lubH_le_flubH: |
|
466 |
"H = {x. (x, f x) \<in> r & x \<in> A} ==> (lub H cl, f (lub H cl)) \<in> r" |
|
467 |
apply (rule lub_least, fast) |
|
468 |
apply (rule f_in_funcset [THEN funcset_mem]) |
|
469 |
apply (rule lub_in_lattice, fast) |
|
470 |
-- {* @{text "\<forall>x:H. (x, f (lub H r)) \<in> r"} *} |
|
471 |
apply (rule ballI) |
|
472 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
473 |
using [[ atp_problem_prefix = "Tarski__CLF_lubH_le_flubH_simpler" ]] |
23449 | 474 |
apply (rule transE) |
475 |
-- {* instantiates @{text "(x, ?z) \<in> order cl to (x, f x)"}, *} |
|
476 |
-- {* because of the def of @{text H} *} |
|
477 |
apply fast |
|
478 |
-- {* so it remains to show @{text "(f x, f (lub H cl)) \<in> r"} *} |
|
479 |
apply (rule_tac f = "f" in monotoneE) |
|
480 |
apply (rule monotone_f, fast) |
|
481 |
apply (rule lub_in_lattice, fast) |
|
482 |
apply (rule lub_upper, fast) |
|
483 |
apply assumption |
|
484 |
done |
|
485 |
declare CL.lub_least[rule del] CLF.f_in_funcset[rule del] |
|
486 |
funcset_mem[rule del] CL.lub_in_lattice[rule del] |
|
487 |
PO.transE[rule del] PO.monotoneE[rule del] |
|
488 |
CLF.monotone_f[rule del] CL.lub_upper[rule del] |
|
489 |
||
490 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
491 |
declare [[ atp_problem_prefix = "Tarski__CLF_flubH_le_lubH" ]] |
23449 | 492 |
declare CLF.f_in_funcset[intro] funcset_mem[intro] CL.lub_in_lattice[intro] |
493 |
PO.monotoneE[intro] CLF.monotone_f[intro] CL.lub_upper[intro] |
|
494 |
CLF.lubH_le_flubH[simp] |
|
495 |
lemma (in CLF) flubH_le_lubH: |
|
496 |
"[| H = {x. (x, f x) \<in> r & x \<in> A} |] ==> (f (lub H cl), lub H cl) \<in> r" |
|
497 |
apply (rule lub_upper, fast) |
|
498 |
apply (rule_tac t = "H" in ssubst, assumption) |
|
499 |
apply (rule CollectI) |
|
500 |
apply (rule conjI) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
501 |
using [[ atp_problem_prefix = "Tarski__CLF_flubH_le_lubH_simpler" ]] |
24827 | 502 |
(*??no longer terminates, with combinators |
30198 | 503 |
apply (metis CO_refl_on lubH_le_flubH monotone_def monotone_f reflD1 reflD2) |
24827 | 504 |
*) |
30198 | 505 |
apply (metis CO_refl_on lubH_le_flubH monotoneE [OF monotone_f] refl_onD1 refl_onD2) |
506 |
apply (metis CO_refl_on lubH_le_flubH refl_onD2) |
|
23449 | 507 |
done |
508 |
declare CLF.f_in_funcset[rule del] funcset_mem[rule del] |
|
509 |
CL.lub_in_lattice[rule del] PO.monotoneE[rule del] |
|
510 |
CLF.monotone_f[rule del] CL.lub_upper[rule del] |
|
511 |
CLF.lubH_le_flubH[simp del] |
|
512 |
||
513 |
||
514 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
515 |
declare [[ atp_problem_prefix = "Tarski__CLF_lubH_is_fixp" ]] |
23449 | 516 |
(*Single-step version fails. The conjecture clauses refer to local abstraction |
517 |
functions (Frees), which prevents expand_defs_tac from removing those |
|
24827 | 518 |
"definitions" at the end of the proof. *) |
23449 | 519 |
lemma (in CLF) lubH_is_fixp: |
520 |
"H = {x. (x, f x) \<in> r & x \<in> A} ==> lub H cl \<in> fix f A" |
|
521 |
apply (simp add: fix_def) |
|
522 |
apply (rule conjI) |
|
24827 | 523 |
proof (neg_clausify) |
524 |
assume 0: "H = |
|
525 |
Collect |
|
526 |
(COMBS (COMBB op \<and> (COMBC (COMBB op \<in> (COMBS Pair f)) r)) (COMBC op \<in> A))" |
|
527 |
assume 1: "lub (Collect |
|
528 |
(COMBS (COMBB op \<and> (COMBC (COMBB op \<in> (COMBS Pair f)) r)) |
|
529 |
(COMBC op \<in> A))) |
|
530 |
cl |
|
531 |
\<notin> A" |
|
532 |
have 2: "lub H cl \<notin> A" |
|
533 |
by (metis 1 0) |
|
534 |
have 3: "(lub H cl, f (lub H cl)) \<in> r" |
|
535 |
by (metis lubH_le_flubH 0) |
|
536 |
have 4: "(f (lub H cl), lub H cl) \<in> r" |
|
537 |
by (metis flubH_le_lubH 0) |
|
538 |
have 5: "lub H cl = f (lub H cl) \<or> (lub H cl, f (lub H cl)) \<notin> r" |
|
539 |
by (metis antisymE 4) |
|
540 |
have 6: "lub H cl = f (lub H cl)" |
|
541 |
by (metis 5 3) |
|
542 |
have 7: "(lub H cl, lub H cl) \<in> r" |
|
543 |
by (metis 6 4) |
|
30198 | 544 |
have 8: "\<And>X1. lub H cl \<in> X1 \<or> \<not> refl_on X1 r" |
545 |
by (metis 7 refl_onD2) |
|
546 |
have 9: "\<not> refl_on A r" |
|
24827 | 547 |
by (metis 8 2) |
23449 | 548 |
show "False" |
30198 | 549 |
by (metis CO_refl_on 9); |
24827 | 550 |
next --{*apparently the way to insert a second structured proof*} |
551 |
show "H = {x. (x, f x) \<in> r \<and> x \<in> A} \<Longrightarrow> |
|
552 |
f (lub {x. (x, f x) \<in> r \<and> x \<in> A} cl) = lub {x. (x, f x) \<in> r \<and> x \<in> A} cl" |
|
553 |
proof (neg_clausify) |
|
554 |
assume 0: "H = |
|
555 |
Collect |
|
556 |
(COMBS (COMBB op \<and> (COMBC (COMBB op \<in> (COMBS Pair f)) r)) (COMBC op \<in> A))" |
|
557 |
assume 1: "f (lub (Collect |
|
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32864
diff
changeset
|
558 |
(COMBS (COMBB op \<and> (COMBC (COMBB op \<in> (COMBS Pair f)) r)) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32864
diff
changeset
|
559 |
(COMBC op \<in> A))) |
24827 | 560 |
cl) \<noteq> |
561 |
lub (Collect |
|
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32864
diff
changeset
|
562 |
(COMBS (COMBB op \<and> (COMBC (COMBB op \<in> (COMBS Pair f)) r)) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32864
diff
changeset
|
563 |
(COMBC op \<in> A))) |
24827 | 564 |
cl" |
565 |
have 2: "f (lub H cl) \<noteq> |
|
566 |
lub (Collect |
|
32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32864
diff
changeset
|
567 |
(COMBS (COMBB op \<and> (COMBC (COMBB op \<in> (COMBS Pair f)) r)) |
69916a850301
eliminated hard tabulators, guessing at each author's individual tab-width;
wenzelm
parents:
32864
diff
changeset
|
568 |
(COMBC op \<in> A))) |
24827 | 569 |
cl" |
570 |
by (metis 1 0) |
|
571 |
have 3: "f (lub H cl) \<noteq> lub H cl" |
|
572 |
by (metis 2 0) |
|
573 |
have 4: "(lub H cl, f (lub H cl)) \<in> r" |
|
574 |
by (metis lubH_le_flubH 0) |
|
575 |
have 5: "(f (lub H cl), lub H cl) \<in> r" |
|
576 |
by (metis flubH_le_lubH 0) |
|
577 |
have 6: "lub H cl = f (lub H cl) \<or> (lub H cl, f (lub H cl)) \<notin> r" |
|
578 |
by (metis antisymE 5) |
|
579 |
have 7: "lub H cl = f (lub H cl)" |
|
580 |
by (metis 6 4) |
|
581 |
show "False" |
|
582 |
by (metis 3 7) |
|
583 |
qed |
|
584 |
qed |
|
23449 | 585 |
|
25710
4cdf7de81e1b
Replaced refs by config params; finer critical section in mets method
paulson
parents:
24855
diff
changeset
|
586 |
lemma (in CLF) (*lubH_is_fixp:*) |
23449 | 587 |
"H = {x. (x, f x) \<in> r & x \<in> A} ==> lub H cl \<in> fix f A" |
588 |
apply (simp add: fix_def) |
|
589 |
apply (rule conjI) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
590 |
using [[ atp_problem_prefix = "Tarski__CLF_lubH_is_fixp_simpler" ]] |
30198 | 591 |
apply (metis CO_refl_on lubH_le_flubH refl_onD1) |
23449 | 592 |
apply (metis antisymE flubH_le_lubH lubH_le_flubH) |
593 |
done |
|
594 |
||
595 |
lemma (in CLF) fix_in_H: |
|
596 |
"[| H = {x. (x, f x) \<in> r & x \<in> A}; x \<in> P |] ==> x \<in> H" |
|
30198 | 597 |
by (simp add: P_def fix_imp_eq [of _ f A] reflE CO_refl_on |
23449 | 598 |
fix_subset [of f A, THEN subsetD]) |
599 |
||
600 |
||
601 |
lemma (in CLF) fixf_le_lubH: |
|
602 |
"H = {x. (x, f x) \<in> r & x \<in> A} ==> \<forall>x \<in> fix f A. (x, lub H cl) \<in> r" |
|
603 |
apply (rule ballI) |
|
604 |
apply (rule lub_upper, fast) |
|
605 |
apply (rule fix_in_H) |
|
606 |
apply (simp_all add: P_def) |
|
607 |
done |
|
608 |
||
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
609 |
declare [[ atp_problem_prefix = "Tarski__CLF_lubH_least_fixf" ]] |
23449 | 610 |
lemma (in CLF) lubH_least_fixf: |
611 |
"H = {x. (x, f x) \<in> r & x \<in> A} |
|
612 |
==> \<forall>L. (\<forall>y \<in> fix f A. (y,L) \<in> r) --> (lub H cl, L) \<in> r" |
|
613 |
apply (metis P_def lubH_is_fixp) |
|
614 |
done |
|
615 |
||
616 |
subsection {* Tarski fixpoint theorem 1, first part *} |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
617 |
declare [[ atp_problem_prefix = "Tarski__CLF_T_thm_1_lub" ]] |
23449 | 618 |
declare CL.lubI[intro] fix_subset[intro] CL.lub_in_lattice[intro] |
619 |
CLF.fixf_le_lubH[simp] CLF.lubH_least_fixf[simp] |
|
620 |
lemma (in CLF) T_thm_1_lub: "lub P cl = lub {x. (x, f x) \<in> r & x \<in> A} cl" |
|
621 |
(*sledgehammer;*) |
|
622 |
apply (rule sym) |
|
623 |
apply (simp add: P_def) |
|
624 |
apply (rule lubI) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
625 |
using [[ atp_problem_prefix = "Tarski__CLF_T_thm_1_lub_simpler" ]] |
24855 | 626 |
apply (metis P_def fix_subset) |
24827 | 627 |
apply (metis Collect_conj_eq Collect_mem_eq Int_commute Int_lower1 lub_in_lattice vimage_def) |
628 |
(*??no longer terminates, with combinators |
|
629 |
apply (metis P_def fix_def fixf_le_lubH) |
|
630 |
apply (metis P_def fix_def lubH_least_fixf) |
|
631 |
*) |
|
632 |
apply (simp add: fixf_le_lubH) |
|
633 |
apply (simp add: lubH_least_fixf) |
|
23449 | 634 |
done |
635 |
declare CL.lubI[rule del] fix_subset[rule del] CL.lub_in_lattice[rule del] |
|
636 |
CLF.fixf_le_lubH[simp del] CLF.lubH_least_fixf[simp del] |
|
637 |
||
638 |
||
639 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
640 |
declare [[ atp_problem_prefix = "Tarski__CLF_glbH_is_fixp" ]] |
23449 | 641 |
declare glb_dual_lub[simp] PO.dualA_iff[intro] CLF.lubH_is_fixp[intro] |
642 |
PO.dualPO[intro] CL.CL_dualCL[intro] PO.dualr_iff[simp] |
|
643 |
lemma (in CLF) glbH_is_fixp: "H = {x. (f x, x) \<in> r & x \<in> A} ==> glb H cl \<in> P" |
|
644 |
-- {* Tarski for glb *} |
|
645 |
(*sledgehammer;*) |
|
646 |
apply (simp add: glb_dual_lub P_def A_def r_def) |
|
647 |
apply (rule dualA_iff [THEN subst]) |
|
648 |
apply (rule CLF.lubH_is_fixp) |
|
27681 | 649 |
apply (rule CLF.intro) |
650 |
apply (rule CL.intro) |
|
651 |
apply (rule PO.intro) |
|
23449 | 652 |
apply (rule dualPO) |
27681 | 653 |
apply (rule CL_axioms.intro) |
23449 | 654 |
apply (rule CL_dualCL) |
27681 | 655 |
apply (rule CLF_axioms.intro) |
23449 | 656 |
apply (rule CLF_dual) |
657 |
apply (simp add: dualr_iff dualA_iff) |
|
658 |
done |
|
659 |
declare glb_dual_lub[simp del] PO.dualA_iff[rule del] CLF.lubH_is_fixp[rule del] |
|
660 |
PO.dualPO[rule del] CL.CL_dualCL[rule del] PO.dualr_iff[simp del] |
|
661 |
||
662 |
||
663 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
664 |
declare [[ atp_problem_prefix = "Tarski__T_thm_1_glb" ]] (*ALL THEOREMS*) |
23449 | 665 |
lemma (in CLF) T_thm_1_glb: "glb P cl = glb {x. (f x, x) \<in> r & x \<in> A} cl" |
666 |
(*sledgehammer;*) |
|
667 |
apply (simp add: glb_dual_lub P_def A_def r_def) |
|
668 |
apply (rule dualA_iff [THEN subst]) |
|
669 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
670 |
using [[ atp_problem_prefix = "Tarski__T_thm_1_glb_simpler" ]] (*ALL THEOREMS*) |
23449 | 671 |
(*sledgehammer;*) |
27681 | 672 |
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, |
673 |
OF dualPO CL_dualCL] dualPO CL_dualCL CLF_dual dualr_iff) |
|
23449 | 674 |
done |
675 |
||
676 |
subsection {* interval *} |
|
677 |
||
678 |
||
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
679 |
declare [[ atp_problem_prefix = "Tarski__rel_imp_elem" ]] |
30198 | 680 |
declare (in CLF) CO_refl_on[simp] refl_on_def [simp] |
23449 | 681 |
lemma (in CLF) rel_imp_elem: "(x, y) \<in> r ==> x \<in> A" |
30198 | 682 |
by (metis CO_refl_on refl_onD1) |
683 |
declare (in CLF) CO_refl_on[simp del] refl_on_def [simp del] |
|
23449 | 684 |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
685 |
declare [[ atp_problem_prefix = "Tarski__interval_subset" ]] |
23449 | 686 |
declare (in CLF) rel_imp_elem[intro] |
687 |
declare interval_def [simp] |
|
688 |
lemma (in CLF) interval_subset: "[| a \<in> A; b \<in> A |] ==> interval r a b \<subseteq> A" |
|
30198 | 689 |
by (metis CO_refl_on interval_imp_mem refl_onD refl_onD2 rel_imp_elem subset_eq) |
23449 | 690 |
declare (in CLF) rel_imp_elem[rule del] |
691 |
declare interval_def [simp del] |
|
692 |
||
693 |
||
694 |
lemma (in CLF) intervalI: |
|
695 |
"[| (a, x) \<in> r; (x, b) \<in> r |] ==> x \<in> interval r a b" |
|
696 |
by (simp add: interval_def) |
|
697 |
||
698 |
lemma (in CLF) interval_lemma1: |
|
699 |
"[| S \<subseteq> interval r a b; x \<in> S |] ==> (a, x) \<in> r" |
|
700 |
by (unfold interval_def, fast) |
|
701 |
||
702 |
lemma (in CLF) interval_lemma2: |
|
703 |
"[| S \<subseteq> interval r a b; x \<in> S |] ==> (x, b) \<in> r" |
|
704 |
by (unfold interval_def, fast) |
|
705 |
||
706 |
lemma (in CLF) a_less_lub: |
|
707 |
"[| S \<subseteq> A; S \<noteq> {}; |
|
708 |
\<forall>x \<in> S. (a,x) \<in> r; \<forall>y \<in> S. (y, L) \<in> r |] ==> (a,L) \<in> r" |
|
709 |
by (blast intro: transE) |
|
710 |
||
711 |
lemma (in CLF) glb_less_b: |
|
712 |
"[| S \<subseteq> A; S \<noteq> {}; |
|
713 |
\<forall>x \<in> S. (x,b) \<in> r; \<forall>y \<in> S. (G, y) \<in> r |] ==> (G,b) \<in> r" |
|
714 |
by (blast intro: transE) |
|
715 |
||
716 |
lemma (in CLF) S_intv_cl: |
|
717 |
"[| a \<in> A; b \<in> A; S \<subseteq> interval r a b |]==> S \<subseteq> A" |
|
718 |
by (simp add: subset_trans [OF _ interval_subset]) |
|
719 |
||
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
720 |
declare [[ atp_problem_prefix = "Tarski__L_in_interval" ]] (*ALL THEOREMS*) |
23449 | 721 |
lemma (in CLF) L_in_interval: |
722 |
"[| a \<in> A; b \<in> A; S \<subseteq> interval r a b; |
|
723 |
S \<noteq> {}; isLub S cl L; interval r a b \<noteq> {} |] ==> L \<in> interval r a b" |
|
724 |
(*WON'T TERMINATE |
|
725 |
apply (metis CO_trans intervalI interval_lemma1 interval_lemma2 isLub_least isLub_upper subset_empty subset_iff trans_def) |
|
726 |
*) |
|
727 |
apply (rule intervalI) |
|
728 |
apply (rule a_less_lub) |
|
729 |
prefer 2 apply assumption |
|
730 |
apply (simp add: S_intv_cl) |
|
731 |
apply (rule ballI) |
|
732 |
apply (simp add: interval_lemma1) |
|
733 |
apply (simp add: isLub_upper) |
|
734 |
-- {* @{text "(L, b) \<in> r"} *} |
|
735 |
apply (simp add: isLub_least interval_lemma2) |
|
736 |
done |
|
737 |
||
738 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
739 |
declare [[ atp_problem_prefix = "Tarski__G_in_interval" ]] (*ALL THEOREMS*) |
23449 | 740 |
lemma (in CLF) G_in_interval: |
741 |
"[| a \<in> A; b \<in> A; interval r a b \<noteq> {}; S \<subseteq> interval r a b; isGlb S cl G; |
|
742 |
S \<noteq> {} |] ==> G \<in> interval r a b" |
|
743 |
apply (simp add: interval_dual) |
|
27681 | 744 |
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 | 745 |
dualA_iff A_def dualPO CL_dualCL CLF_dual isGlb_dual_isLub) |
746 |
done |
|
747 |
||
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
748 |
declare [[ atp_problem_prefix = "Tarski__intervalPO" ]] (*ALL THEOREMS*) |
23449 | 749 |
lemma (in CLF) intervalPO: |
750 |
"[| a \<in> A; b \<in> A; interval r a b \<noteq> {} |] |
|
751 |
==> (| pset = interval r a b, order = induced (interval r a b) r |) |
|
752 |
\<in> PartialOrder" |
|
753 |
proof (neg_clausify) |
|
754 |
assume 0: "a \<in> A" |
|
755 |
assume 1: "b \<in> A" |
|
756 |
assume 2: "\<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr> \<notin> PartialOrder" |
|
757 |
have 3: "\<not> interval r a b \<subseteq> A" |
|
758 |
by (metis 2 po_subset_po) |
|
759 |
have 4: "b \<notin> A \<or> a \<notin> A" |
|
760 |
by (metis 3 interval_subset) |
|
761 |
have 5: "a \<notin> A" |
|
762 |
by (metis 4 1) |
|
763 |
show "False" |
|
764 |
by (metis 5 0) |
|
765 |
qed |
|
766 |
||
767 |
lemma (in CLF) intv_CL_lub: |
|
768 |
"[| a \<in> A; b \<in> A; interval r a b \<noteq> {} |] |
|
769 |
==> \<forall>S. S \<subseteq> interval r a b --> |
|
770 |
(\<exists>L. isLub S (| pset = interval r a b, |
|
771 |
order = induced (interval r a b) r |) L)" |
|
772 |
apply (intro strip) |
|
773 |
apply (frule S_intv_cl [THEN CL_imp_ex_isLub]) |
|
774 |
prefer 2 apply assumption |
|
775 |
apply assumption |
|
776 |
apply (erule exE) |
|
777 |
-- {* define the lub for the interval as *} |
|
778 |
apply (rule_tac x = "if S = {} then a else L" in exI) |
|
779 |
apply (simp (no_asm_simp) add: isLub_def split del: split_if) |
|
780 |
apply (intro impI conjI) |
|
781 |
-- {* @{text "(if S = {} then a else L) \<in> interval r a b"} *} |
|
782 |
apply (simp add: CL_imp_PO L_in_interval) |
|
783 |
apply (simp add: left_in_interval) |
|
784 |
-- {* lub prop 1 *} |
|
785 |
apply (case_tac "S = {}") |
|
786 |
-- {* @{text "S = {}, y \<in> S = False => everything"} *} |
|
787 |
apply fast |
|
788 |
-- {* @{text "S \<noteq> {}"} *} |
|
789 |
apply simp |
|
790 |
-- {* @{text "\<forall>y:S. (y, L) \<in> induced (interval r a b) r"} *} |
|
791 |
apply (rule ballI) |
|
792 |
apply (simp add: induced_def L_in_interval) |
|
793 |
apply (rule conjI) |
|
794 |
apply (rule subsetD) |
|
795 |
apply (simp add: S_intv_cl, assumption) |
|
796 |
apply (simp add: isLub_upper) |
|
797 |
-- {* @{text "\<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"} *} |
|
798 |
apply (rule ballI) |
|
799 |
apply (rule impI) |
|
800 |
apply (case_tac "S = {}") |
|
801 |
-- {* @{text "S = {}"} *} |
|
802 |
apply simp |
|
803 |
apply (simp add: induced_def interval_def) |
|
804 |
apply (rule conjI) |
|
805 |
apply (rule reflE, assumption) |
|
806 |
apply (rule interval_not_empty) |
|
807 |
apply (rule CO_trans) |
|
808 |
apply (simp add: interval_def) |
|
809 |
-- {* @{text "S \<noteq> {}"} *} |
|
810 |
apply simp |
|
811 |
apply (simp add: induced_def L_in_interval) |
|
812 |
apply (rule isLub_least, assumption) |
|
813 |
apply (rule subsetD) |
|
814 |
prefer 2 apply assumption |
|
815 |
apply (simp add: S_intv_cl, fast) |
|
816 |
done |
|
817 |
||
818 |
lemmas (in CLF) intv_CL_glb = intv_CL_lub [THEN Rdual] |
|
819 |
||
820 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
821 |
declare [[ atp_problem_prefix = "Tarski__interval_is_sublattice" ]] (*ALL THEOREMS*) |
23449 | 822 |
lemma (in CLF) interval_is_sublattice: |
823 |
"[| a \<in> A; b \<in> A; interval r a b \<noteq> {} |] |
|
824 |
==> interval r a b <<= cl" |
|
825 |
(*sledgehammer *) |
|
826 |
apply (rule sublatticeI) |
|
827 |
apply (simp add: interval_subset) |
|
828 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
829 |
using [[ atp_problem_prefix = "Tarski__interval_is_sublattice_simpler" ]] |
23449 | 830 |
(*sledgehammer *) |
831 |
apply (rule CompleteLatticeI) |
|
832 |
apply (simp add: intervalPO) |
|
833 |
apply (simp add: intv_CL_lub) |
|
834 |
apply (simp add: intv_CL_glb) |
|
835 |
done |
|
836 |
||
837 |
lemmas (in CLF) interv_is_compl_latt = |
|
838 |
interval_is_sublattice [THEN sublattice_imp_CL] |
|
839 |
||
840 |
||
841 |
subsection {* Top and Bottom *} |
|
842 |
lemma (in CLF) Top_dual_Bot: "Top cl = Bot (dual cl)" |
|
843 |
by (simp add: Top_def Bot_def least_def greatest_def dualA_iff dualr_iff) |
|
844 |
||
845 |
lemma (in CLF) Bot_dual_Top: "Bot cl = Top (dual cl)" |
|
846 |
by (simp add: Top_def Bot_def least_def greatest_def dualA_iff dualr_iff) |
|
847 |
||
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
848 |
declare [[ atp_problem_prefix = "Tarski__Bot_in_lattice" ]] (*ALL THEOREMS*) |
23449 | 849 |
lemma (in CLF) Bot_in_lattice: "Bot cl \<in> A" |
850 |
(*sledgehammer; *) |
|
851 |
apply (simp add: Bot_def least_def) |
|
852 |
apply (rule_tac a="glb A cl" in someI2) |
|
853 |
apply (simp_all add: glb_in_lattice glb_lower |
|
854 |
r_def [symmetric] A_def [symmetric]) |
|
855 |
done |
|
856 |
||
857 |
(*first proved 2007-01-25 after relaxing relevance*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
858 |
declare [[ atp_problem_prefix = "Tarski__Top_in_lattice" ]] (*ALL THEOREMS*) |
23449 | 859 |
lemma (in CLF) Top_in_lattice: "Top cl \<in> A" |
860 |
(*sledgehammer;*) |
|
861 |
apply (simp add: Top_dual_Bot A_def) |
|
862 |
(*first proved 2007-01-25 after relaxing relevance*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
863 |
using [[ atp_problem_prefix = "Tarski__Top_in_lattice_simpler" ]] (*ALL THEOREMS*) |
23449 | 864 |
(*sledgehammer*) |
865 |
apply (rule dualA_iff [THEN subst]) |
|
27681 | 866 |
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 | 867 |
done |
868 |
||
869 |
lemma (in CLF) Top_prop: "x \<in> A ==> (x, Top cl) \<in> r" |
|
870 |
apply (simp add: Top_def greatest_def) |
|
871 |
apply (rule_tac a="lub A cl" in someI2) |
|
872 |
apply (rule someI2) |
|
873 |
apply (simp_all add: lub_in_lattice lub_upper |
|
874 |
r_def [symmetric] A_def [symmetric]) |
|
875 |
done |
|
876 |
||
877 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
878 |
declare [[ atp_problem_prefix = "Tarski__Bot_prop" ]] (*ALL THEOREMS*) |
23449 | 879 |
lemma (in CLF) Bot_prop: "x \<in> A ==> (Bot cl, x) \<in> r" |
880 |
(*sledgehammer*) |
|
881 |
apply (simp add: Bot_dual_Top r_def) |
|
882 |
apply (rule dualr_iff [THEN subst]) |
|
27681 | 883 |
apply (simp add: CLF.Top_prop [of _ f, OF CLF.intro, OF CL.intro CLF_axioms.intro, OF PO.intro CL_axioms.intro] |
23449 | 884 |
dualA_iff A_def dualPO CL_dualCL CLF_dual) |
885 |
done |
|
886 |
||
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
887 |
declare [[ atp_problem_prefix = "Tarski__Bot_in_lattice" ]] (*ALL THEOREMS*) |
23449 | 888 |
lemma (in CLF) Top_intv_not_empty: "x \<in> A ==> interval r x (Top cl) \<noteq> {}" |
889 |
apply (metis Top_in_lattice Top_prop empty_iff intervalI reflE) |
|
890 |
done |
|
891 |
||
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
892 |
declare [[ atp_problem_prefix = "Tarski__Bot_intv_not_empty" ]] (*ALL THEOREMS*) |
23449 | 893 |
lemma (in CLF) Bot_intv_not_empty: "x \<in> A ==> interval r (Bot cl) x \<noteq> {}" |
894 |
apply (metis Bot_prop ex_in_conv intervalI reflE rel_imp_elem) |
|
895 |
done |
|
896 |
||
897 |
||
898 |
subsection {* fixed points form a partial order *} |
|
899 |
||
900 |
lemma (in CLF) fixf_po: "(| pset = P, order = induced P r|) \<in> PartialOrder" |
|
901 |
by (simp add: P_def fix_subset po_subset_po) |
|
902 |
||
903 |
(*first proved 2007-01-25 after relaxing relevance*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
904 |
declare [[ atp_problem_prefix = "Tarski__Y_subset_A" ]] |
23449 | 905 |
declare (in Tarski) P_def[simp] Y_ss [simp] |
906 |
declare fix_subset [intro] subset_trans [intro] |
|
907 |
lemma (in Tarski) Y_subset_A: "Y \<subseteq> A" |
|
908 |
(*sledgehammer*) |
|
909 |
apply (rule subset_trans [OF _ fix_subset]) |
|
910 |
apply (rule Y_ss [simplified P_def]) |
|
911 |
done |
|
912 |
declare (in Tarski) P_def[simp del] Y_ss [simp del] |
|
913 |
declare fix_subset [rule del] subset_trans [rule del] |
|
914 |
||
915 |
||
916 |
lemma (in Tarski) lubY_in_A: "lub Y cl \<in> A" |
|
917 |
by (rule Y_subset_A [THEN lub_in_lattice]) |
|
918 |
||
919 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
920 |
declare [[ atp_problem_prefix = "Tarski__lubY_le_flubY" ]] (*ALL THEOREMS*) |
23449 | 921 |
lemma (in Tarski) lubY_le_flubY: "(lub Y cl, f (lub Y cl)) \<in> r" |
922 |
(*sledgehammer*) |
|
923 |
apply (rule lub_least) |
|
924 |
apply (rule Y_subset_A) |
|
925 |
apply (rule f_in_funcset [THEN funcset_mem]) |
|
926 |
apply (rule lubY_in_A) |
|
927 |
-- {* @{text "Y \<subseteq> P ==> f x = x"} *} |
|
928 |
apply (rule ballI) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
929 |
using [[ atp_problem_prefix = "Tarski__lubY_le_flubY_simpler" ]] (*ALL THEOREMS*) |
23449 | 930 |
(*sledgehammer *) |
931 |
apply (rule_tac t = "x" in fix_imp_eq [THEN subst]) |
|
932 |
apply (erule Y_ss [simplified P_def, THEN subsetD]) |
|
933 |
-- {* @{text "reduce (f x, f (lub Y cl)) \<in> r to (x, lub Y cl) \<in> r"} by monotonicity *} |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
934 |
using [[ atp_problem_prefix = "Tarski__lubY_le_flubY_simplest" ]] (*ALL THEOREMS*) |
23449 | 935 |
(*sledgehammer*) |
936 |
apply (rule_tac f = "f" in monotoneE) |
|
937 |
apply (rule monotone_f) |
|
938 |
apply (simp add: Y_subset_A [THEN subsetD]) |
|
939 |
apply (rule lubY_in_A) |
|
940 |
apply (simp add: lub_upper Y_subset_A) |
|
941 |
done |
|
942 |
||
943 |
(*first proved 2007-01-25 after relaxing relevance*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
944 |
declare [[ atp_problem_prefix = "Tarski__intY1_subset" ]] (*ALL THEOREMS*) |
23449 | 945 |
lemma (in Tarski) intY1_subset: "intY1 \<subseteq> A" |
946 |
(*sledgehammer*) |
|
947 |
apply (unfold intY1_def) |
|
948 |
apply (rule interval_subset) |
|
949 |
apply (rule lubY_in_A) |
|
950 |
apply (rule Top_in_lattice) |
|
951 |
done |
|
952 |
||
953 |
lemmas (in Tarski) intY1_elem = intY1_subset [THEN subsetD] |
|
954 |
||
955 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
956 |
declare [[ atp_problem_prefix = "Tarski__intY1_f_closed" ]] (*ALL THEOREMS*) |
23449 | 957 |
lemma (in Tarski) intY1_f_closed: "x \<in> intY1 \<Longrightarrow> f x \<in> intY1" |
958 |
(*sledgehammer*) |
|
959 |
apply (simp add: intY1_def interval_def) |
|
960 |
apply (rule conjI) |
|
961 |
apply (rule transE) |
|
962 |
apply (rule lubY_le_flubY) |
|
963 |
-- {* @{text "(f (lub Y cl), f x) \<in> r"} *} |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
964 |
using [[ atp_problem_prefix = "Tarski__intY1_f_closed_simpler" ]] (*ALL THEOREMS*) |
23449 | 965 |
(*sledgehammer [has been proved before now...]*) |
966 |
apply (rule_tac f=f in monotoneE) |
|
967 |
apply (rule monotone_f) |
|
968 |
apply (rule lubY_in_A) |
|
969 |
apply (simp add: intY1_def interval_def intY1_elem) |
|
970 |
apply (simp add: intY1_def interval_def) |
|
971 |
-- {* @{text "(f x, Top cl) \<in> r"} *} |
|
972 |
apply (rule Top_prop) |
|
973 |
apply (rule f_in_funcset [THEN funcset_mem]) |
|
974 |
apply (simp add: intY1_def interval_def intY1_elem) |
|
975 |
done |
|
976 |
||
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
977 |
declare [[ atp_problem_prefix = "Tarski__intY1_func" ]] (*ALL THEOREMS*) |
27368 | 978 |
lemma (in Tarski) intY1_func: "(%x: intY1. f x) \<in> intY1 -> intY1" |
979 |
apply (rule restrict_in_funcset) |
|
980 |
apply (metis intY1_f_closed restrict_in_funcset) |
|
981 |
done |
|
23449 | 982 |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
983 |
declare [[ atp_problem_prefix = "Tarski__intY1_mono" ]] (*ALL THEOREMS*) |
24855 | 984 |
lemma (in Tarski) intY1_mono: |
23449 | 985 |
"monotone (%x: intY1. f x) intY1 (induced intY1 r)" |
986 |
(*sledgehammer *) |
|
987 |
apply (auto simp add: monotone_def induced_def intY1_f_closed) |
|
988 |
apply (blast intro: intY1_elem monotone_f [THEN monotoneE]) |
|
989 |
done |
|
990 |
||
991 |
(*proof requires relaxing relevance: 2007-01-25*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
992 |
declare [[ atp_problem_prefix = "Tarski__intY1_is_cl" ]] (*ALL THEOREMS*) |
23449 | 993 |
lemma (in Tarski) intY1_is_cl: |
994 |
"(| pset = intY1, order = induced intY1 r |) \<in> CompleteLattice" |
|
995 |
(*sledgehammer*) |
|
996 |
apply (unfold intY1_def) |
|
997 |
apply (rule interv_is_compl_latt) |
|
998 |
apply (rule lubY_in_A) |
|
999 |
apply (rule Top_in_lattice) |
|
1000 |
apply (rule Top_intv_not_empty) |
|
1001 |
apply (rule lubY_in_A) |
|
1002 |
done |
|
1003 |
||
1004 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
1005 |
declare [[ atp_problem_prefix = "Tarski__v_in_P" ]] (*ALL THEOREMS*) |
23449 | 1006 |
lemma (in Tarski) v_in_P: "v \<in> P" |
1007 |
(*sledgehammer*) |
|
1008 |
apply (unfold P_def) |
|
1009 |
apply (rule_tac A = "intY1" in fixf_subset) |
|
1010 |
apply (rule intY1_subset) |
|
27681 | 1011 |
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] |
1012 |
v_def CL_imp_PO intY1_is_cl CLF_set_def intY1_func intY1_mono) |
|
23449 | 1013 |
done |
1014 |
||
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
1015 |
declare [[ atp_problem_prefix = "Tarski__z_in_interval" ]] (*ALL THEOREMS*) |
23449 | 1016 |
lemma (in Tarski) z_in_interval: |
1017 |
"[| z \<in> P; \<forall>y\<in>Y. (y, z) \<in> induced P r |] ==> z \<in> intY1" |
|
1018 |
(*sledgehammer *) |
|
1019 |
apply (unfold intY1_def P_def) |
|
1020 |
apply (rule intervalI) |
|
1021 |
prefer 2 |
|
1022 |
apply (erule fix_subset [THEN subsetD, THEN Top_prop]) |
|
1023 |
apply (rule lub_least) |
|
1024 |
apply (rule Y_subset_A) |
|
1025 |
apply (fast elim!: fix_subset [THEN subsetD]) |
|
1026 |
apply (simp add: induced_def) |
|
1027 |
done |
|
1028 |
||
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
1029 |
declare [[ atp_problem_prefix = "Tarski__fz_in_int_rel" ]] (*ALL THEOREMS*) |
23449 | 1030 |
lemma (in Tarski) f'z_in_int_rel: "[| z \<in> P; \<forall>y\<in>Y. (y, z) \<in> induced P r |] |
1031 |
==> ((%x: intY1. f x) z, z) \<in> induced intY1 r" |
|
26806 | 1032 |
apply (metis P_def acc_def fix_imp_eq fix_subset indI reflE restrict_apply subset_eq z_in_interval) |
23449 | 1033 |
done |
1034 |
||
1035 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
1036 |
declare [[ atp_problem_prefix = "Tarski__tarski_full_lemma" ]] (*ALL THEOREMS*) |
23449 | 1037 |
lemma (in Tarski) tarski_full_lemma: |
1038 |
"\<exists>L. isLub Y (| pset = P, order = induced P r |) L" |
|
1039 |
apply (rule_tac x = "v" in exI) |
|
1040 |
apply (simp add: isLub_def) |
|
1041 |
-- {* @{text "v \<in> P"} *} |
|
1042 |
apply (simp add: v_in_P) |
|
1043 |
apply (rule conjI) |
|
1044 |
(*sledgehammer*) |
|
1045 |
-- {* @{text v} is lub *} |
|
1046 |
-- {* @{text "1. \<forall>y:Y. (y, v) \<in> induced P r"} *} |
|
1047 |
apply (rule ballI) |
|
1048 |
apply (simp add: induced_def subsetD v_in_P) |
|
1049 |
apply (rule conjI) |
|
1050 |
apply (erule Y_ss [THEN subsetD]) |
|
1051 |
apply (rule_tac b = "lub Y cl" in transE) |
|
1052 |
apply (rule lub_upper) |
|
1053 |
apply (rule Y_subset_A, assumption) |
|
1054 |
apply (rule_tac b = "Top cl" in interval_imp_mem) |
|
1055 |
apply (simp add: v_def) |
|
1056 |
apply (fold intY1_def) |
|
27681 | 1057 |
apply (rule CL.glb_in_lattice [OF CL.intro, OF PO.intro CL_axioms.intro, OF _ intY1_is_cl, simplified]) |
23449 | 1058 |
apply (simp add: CL_imp_PO intY1_is_cl, force) |
1059 |
-- {* @{text v} is LEAST ub *} |
|
1060 |
apply clarify |
|
1061 |
apply (rule indI) |
|
1062 |
prefer 3 apply assumption |
|
1063 |
prefer 2 apply (simp add: v_in_P) |
|
1064 |
apply (unfold v_def) |
|
1065 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
1066 |
using [[ atp_problem_prefix = "Tarski__tarski_full_lemma_simpler" ]] |
23449 | 1067 |
(*sledgehammer*) |
1068 |
apply (rule indE) |
|
1069 |
apply (rule_tac [2] intY1_subset) |
|
1070 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
1071 |
using [[ atp_problem_prefix = "Tarski__tarski_full_lemma_simplest" ]] |
23449 | 1072 |
(*sledgehammer*) |
27681 | 1073 |
apply (rule CL.glb_lower [OF CL.intro, OF PO.intro CL_axioms.intro, OF _ intY1_is_cl, simplified]) |
23449 | 1074 |
apply (simp add: CL_imp_PO intY1_is_cl) |
1075 |
apply force |
|
1076 |
apply (simp add: induced_def intY1_f_closed z_in_interval) |
|
1077 |
apply (simp add: P_def fix_imp_eq [of _ f A] reflE |
|
1078 |
fix_subset [of f A, THEN subsetD]) |
|
1079 |
done |
|
1080 |
||
1081 |
lemma CompleteLatticeI_simp: |
|
1082 |
"[| (| pset = A, order = r |) \<in> PartialOrder; |
|
1083 |
\<forall>S. S \<subseteq> A --> (\<exists>L. isLub S (| pset = A, order = r |) L) |] |
|
1084 |
==> (| pset = A, order = r |) \<in> CompleteLattice" |
|
1085 |
by (simp add: CompleteLatticeI Rdual) |
|
1086 |
||
1087 |
||
1088 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
1089 |
declare [[ atp_problem_prefix = "Tarski__Tarski_full" ]] |
23449 | 1090 |
declare (in CLF) fixf_po[intro] P_def [simp] A_def [simp] r_def [simp] |
1091 |
Tarski.tarski_full_lemma [intro] cl_po [intro] cl_co [intro] |
|
1092 |
CompleteLatticeI_simp [intro] |
|
1093 |
theorem (in CLF) Tarski_full: |
|
1094 |
"(| pset = P, order = induced P r|) \<in> CompleteLattice" |
|
1095 |
(*sledgehammer*) |
|
1096 |
apply (rule CompleteLatticeI_simp) |
|
1097 |
apply (rule fixf_po, clarify) |
|
1098 |
(*never proved, 2007-01-22*) |
|
32864
a226f29d4bdc
re-organized signature of AtpWrapper structure: records instead of unnamed parameters and return values,
boehmes
parents:
30198
diff
changeset
|
1099 |
using [[ atp_problem_prefix = "Tarski__Tarski_full_simpler" ]] |
23449 | 1100 |
(*sledgehammer*) |
1101 |
apply (simp add: P_def A_def r_def) |
|
27681 | 1102 |
apply (blast intro!: Tarski.tarski_full_lemma [OF Tarski.intro, OF CLF.intro Tarski_axioms.intro, |
1103 |
OF CL.intro CLF_axioms.intro, OF PO.intro CL_axioms.intro] cl_po cl_co f_cl) |
|
23449 | 1104 |
done |
1105 |
declare (in CLF) fixf_po[rule del] P_def [simp del] A_def [simp del] r_def [simp del] |
|
1106 |
Tarski.tarski_full_lemma [rule del] cl_po [rule del] cl_co [rule del] |
|
1107 |
CompleteLatticeI_simp [rule del] |
|
1108 |
||
1109 |
||
1110 |
end |