8037
|
1 |
|
|
2 |
header {* The mimimality principle *};
|
|
3 |
|
|
4 |
theory Minimal = Main:;
|
|
5 |
|
|
6 |
consts
|
|
7 |
rel :: "'a => 'a => bool" (infixl "<<" 50);
|
|
8 |
axioms
|
|
9 |
induct: "(ALL m. m << n --> P m ==> P n) ==> P n";
|
|
10 |
|
|
11 |
theorem "A ~= {} ==> EX n. n:A & (ALL m. m << n --> m ~: A)"
|
|
12 |
(concl is "Ex ?minimal");
|
|
13 |
proof -;
|
|
14 |
assume "A ~= {}";
|
|
15 |
hence "EX n. n:A"; by blast;
|
|
16 |
thus ?thesis;
|
|
17 |
proof;
|
|
18 |
fix n; assume h: "n:A";
|
|
19 |
have "n:A --> Ex ?minimal" (is "?P n");
|
|
20 |
proof (rule induct [of n]);
|
|
21 |
fix m;
|
|
22 |
assume hyp: "ALL m. m << n --> ?P m";
|
|
23 |
show "?P n";
|
|
24 |
proof;
|
|
25 |
show "Ex ?minimal";
|
|
26 |
proof (rule case_split);
|
|
27 |
assume "EX m. m << n & m:A";
|
|
28 |
with hyp; show ?thesis; by blast;
|
|
29 |
next;
|
|
30 |
assume "~ (EX m. m << n & m:A)";
|
|
31 |
with h; have "?minimal n"; by blast;
|
|
32 |
thus ?thesis; ..;
|
|
33 |
qed;
|
|
34 |
qed;
|
|
35 |
qed;
|
|
36 |
thus ?thesis; ..;
|
|
37 |
qed;
|
|
38 |
qed;
|
|
39 |
|
|
40 |
text {* \medskip Prefer a short, tactic script-style proof? *};
|
|
41 |
|
|
42 |
theorem "A ~= {} ==> EX n. n:A & (ALL m. m << n --> m ~: A)";
|
|
43 |
proof -;
|
|
44 |
assume "A ~= {}";
|
|
45 |
{{; fix n; have "n:A --> ?thesis"; by (rule induct [of n]) blast; }};
|
|
46 |
thus ?thesis; by (force! simp add: not_empty);
|
|
47 |
qed;
|
|
48 |
|
|
49 |
end;
|