|
6882
|
1 |
(* Title: HOL/Isar_examples/KnasterTarski.thy
|
|
|
2 |
ID: $Id$
|
|
|
3 |
Author: Markus Wenzel, TU Muenchen
|
|
|
4 |
|
|
|
5 |
Typical textbook proof example.
|
|
|
6 |
*)
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
theory KnasterTarski = Main:;
|
|
|
10 |
|
|
|
11 |
(*
|
|
|
12 |
|
|
|
13 |
text {*
|
|
|
14 |
The proof of Knaster-Tarski below closely follows the presentation in
|
|
|
15 |
'Introduction to Lattices and Order' by Davey/Priestley, pages
|
|
|
16 |
93--94. Only one statement of their narration has not been rephrased
|
|
|
17 |
in formal Isar language elements, but left as a comment. Also note
|
|
|
18 |
that Davey/Priestley do not point out non-emptyness of the set ??H,
|
|
|
19 |
(which is obvious, but not vacous).
|
|
|
20 |
*};
|
|
|
21 |
*)
|
|
|
22 |
|
|
|
23 |
theorems [dest] = monoD; (* FIXME [dest!!] *)
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
theorem KnasterTarski: "mono f ==> EX a::'a set. f a = a";
|
|
|
27 |
proof;
|
|
|
28 |
let ??H = "{u. f u <= u}";
|
|
|
29 |
let ??a = "Inter ??H";
|
|
|
30 |
|
|
|
31 |
assume mono: "mono f";
|
|
|
32 |
show "f ??a = ??a";
|
|
|
33 |
proof same;
|
|
|
34 |
fix x;
|
|
|
35 |
presume mem: "x : ??H";
|
|
|
36 |
hence "??a <= x"; by (rule Inter_lower);
|
|
|
37 |
with mono; have "f ??a <= f x"; ..;
|
|
|
38 |
also; from mem; have "f x <= x"; ..;
|
|
|
39 |
finally; have "f ??a <= x"; .;
|
|
|
40 |
hence ge: "f ??a <= ??a"; by (rule Inter_greatest);
|
|
|
41 |
(* text {* We now use this inequality to prove the reverse one (!)
|
|
|
42 |
and thereby complete the proof that @term{??a} is a fixpoint. *}; *)
|
|
|
43 |
with mono; have "f (f ??a) <= f ??a"; ..;
|
|
|
44 |
hence "f ??a : ??H"; ..;
|
|
|
45 |
hence "??a <= f ??a"; by (rule Inter_lower);
|
|
|
46 |
also (order_antisym); note ge;
|
|
|
47 |
finally; show "f ??a = ??a"; proof same;
|
|
|
48 |
next;
|
|
|
49 |
have "f UNIV <= UNIV"; by (rule subset_UNIV);
|
|
|
50 |
thus "UNIV : ??H"; ..;
|
|
|
51 |
qed;
|
|
|
52 |
qed;
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
end;
|