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