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 |
|
6883
|
11 |
|
6893
|
12 |
text {*
|
6939
|
13 |
The proof of Knaster-Tarski below closely follows the presentation in
|
6883
|
14 |
'Introduction to Lattices' and Order by Davey/Priestley, pages
|
6884
|
15 |
93--94. All of their narration has been rephrased in terms of formal
|
6897
|
16 |
Isar language elements. Just as many textbook-style proofs, there is
|
|
17 |
a strong bias towards forward reasoning, and little hierarchical
|
|
18 |
structure.
|
6893
|
19 |
*};
|
6882
|
20 |
|
6939
|
21 |
theorem KnasterTarski: "mono f ==> EX a::'a set. f a = a";
|
6882
|
22 |
proof;
|
|
23 |
let ??H = "{u. f u <= u}";
|
|
24 |
let ??a = "Inter ??H";
|
|
25 |
|
6897
|
26 |
assume mono: "mono f";
|
|
27 |
show "f ??a = ??a";
|
6882
|
28 |
proof same;
|
6897
|
29 |
{{;
|
|
30 |
fix x;
|
|
31 |
assume mem: "x : ??H";
|
|
32 |
hence "??a <= x"; by (rule Inter_lower);
|
|
33 |
with mono; have "f ??a <= f x"; ..;
|
|
34 |
also; from mem; have "... <= x"; ..;
|
6939
|
35 |
finally; have "f ??a <= x"; .;
|
6898
|
36 |
}};
|
|
37 |
hence ge: "f ??a <= ??a"; by (rule Inter_greatest);
|
|
38 |
{{;
|
|
39 |
also; presume "... <= f ??a";
|
|
40 |
finally (order_antisym); show ??thesis; .;
|
|
41 |
}};
|
|
42 |
from mono ge; have "f (f ??a) <= f ??a"; ..;
|
|
43 |
hence "f ??a : ??H"; ..;
|
|
44 |
thus "??a <= f ??a"; by (rule Inter_lower);
|
|
45 |
qed;
|
|
46 |
qed;
|
|
47 |
|
|
48 |
|
6882
|
49 |
end;
|