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