author | blanchet |
Wed, 15 Dec 2010 11:26:28 +0100 | |
changeset 41145 | a5ee3b8e5a90 |
parent 41144 | 509e51b7509a |
child 42103 | 6066a35f6678 |
permissions | -rw-r--r-- |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
1 |
(* Title: HOL/Metis_Examples/HO_Reas.thy |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
2 |
Author: Jasmin Blanchette, TU Muenchen |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
3 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
4 |
Testing Metis's and Sledgehammer's higher-order reasoning capabilities. |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
5 |
*) |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
6 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
7 |
theory HO_Reas |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
8 |
imports Main |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
9 |
begin |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
10 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
11 |
sledgehammer_params [prover = e, blocking, isar_proof, timeout = 10] |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
12 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
13 |
lemma "id True" |
41144 | 14 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
15 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
16 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 17 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
18 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
19 |
lemma "\<not> id False" |
41144 | 20 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
21 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
22 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 23 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
24 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
25 |
lemma "x = id True \<or> x = id False" |
41144 | 26 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
27 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
28 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 29 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
30 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
31 |
lemma "id x = id True \<or> id x = id False" |
41144 | 32 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
33 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
34 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 35 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
36 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
37 |
lemma "P True \<Longrightarrow> P False \<Longrightarrow> P x" |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
38 |
sledgehammer [expect = none] () |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
39 |
sledgehammer [type_sys = tags, expect = some] () |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
40 |
sledgehammer [full_types, type_sys = tags, expect = some] () |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
41 |
by metisFT |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
42 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
43 |
lemma "id (\<not> a) \<Longrightarrow> \<not> id a" |
41144 | 44 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
45 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
46 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 47 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
48 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
49 |
lemma "id (\<not> \<not> a) \<Longrightarrow> id a" |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
50 |
sledgehammer [expect = some] () |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
51 |
sledgehammer [type_sys = tags, expect = some] () |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
52 |
sledgehammer [full_types, type_sys = tags, expect = some] () |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
53 |
by metis |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
54 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
55 |
lemma "id (\<not> (id (\<not> a))) \<Longrightarrow> id a" |
41144 | 56 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
57 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
58 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 59 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
60 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
61 |
lemma "id (a \<and> b) \<Longrightarrow> id a" |
41144 | 62 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
63 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
64 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 65 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
66 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
67 |
lemma "id (a \<and> b) \<Longrightarrow> id b" |
41144 | 68 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
69 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
70 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 71 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
72 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
73 |
lemma "id a \<Longrightarrow> id b \<Longrightarrow> id (a \<and> b)" |
41144 | 74 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
75 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
76 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 77 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
78 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
79 |
lemma "id a \<Longrightarrow> id (a \<or> b)" |
41144 | 80 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
81 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
82 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 83 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
84 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
85 |
lemma "id b \<Longrightarrow> id (a \<or> b)" |
41144 | 86 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
87 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
88 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 89 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
90 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
91 |
lemma "id (\<not> a) \<Longrightarrow> id (\<not> b) \<Longrightarrow> id (\<not> (a \<or> b))" |
41144 | 92 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
93 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
94 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 95 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
96 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
97 |
lemma "id (\<not> a) \<Longrightarrow> id (a \<longrightarrow> b)" |
41144 | 98 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
99 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
100 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 101 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
102 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
103 |
lemma "id (a \<longrightarrow> b) \<longleftrightarrow> id (\<not> a \<or> b)" |
41144 | 104 |
sledgehammer [expect = some] (id_apply) |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
105 |
sledgehammer [type_sys = tags, expect = some] (id_apply) |
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
106 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 107 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
108 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
109 |
end |