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