author | blanchet |
Thu, 24 Mar 2011 17:49:27 +0100 | |
changeset 42103 | 6066a35f6678 |
parent 41145 | a5ee3b8e5a90 |
child 42555 | 2570e1a5ddfb |
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 |
|
42103
6066a35f6678
Metis examples use the new Skolemizer to test it
blanchet
parents:
41145
diff
changeset
|
11 |
declare [[metis_new_skolemizer]] |
6066a35f6678
Metis examples use the new Skolemizer to test it
blanchet
parents:
41145
diff
changeset
|
12 |
|
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
13 |
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
|
14 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
15 |
lemma "id True" |
41144 | 16 |
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
|
17 |
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
|
18 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 19 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
20 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
21 |
lemma "\<not> id False" |
41144 | 22 |
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
|
23 |
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
|
24 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 25 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
26 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
27 |
lemma "x = id True \<or> x = id False" |
41144 | 28 |
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
|
29 |
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
|
30 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 31 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
32 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
33 |
lemma "id x = id True \<or> id x = id False" |
41144 | 34 |
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
|
35 |
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
|
36 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 37 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
38 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
39 |
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
|
40 |
sledgehammer [expect = none] () |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
41 |
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
|
42 |
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
|
43 |
by metisFT |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
44 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
45 |
lemma "id (\<not> a) \<Longrightarrow> \<not> id a" |
41144 | 46 |
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
|
47 |
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
|
48 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 49 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
50 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
51 |
lemma "id (\<not> \<not> a) \<Longrightarrow> id a" |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
52 |
sledgehammer [expect = some] () |
41145
a5ee3b8e5a90
improve partially tagged encoding by adding a helper fact that coalesces consecutive "ti" tags
blanchet
parents:
41144
diff
changeset
|
53 |
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
|
54 |
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
|
55 |
by metis |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
56 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
57 |
lemma "id (\<not> (id (\<not> a))) \<Longrightarrow> id a" |
41144 | 58 |
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
|
59 |
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
|
60 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 61 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
62 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
63 |
lemma "id (a \<and> b) \<Longrightarrow> id a" |
41144 | 64 |
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
|
65 |
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
|
66 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 67 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
68 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
69 |
lemma "id (a \<and> b) \<Longrightarrow> id b" |
41144 | 70 |
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
|
71 |
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
|
72 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 73 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
74 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
75 |
lemma "id a \<Longrightarrow> id b \<Longrightarrow> id (a \<and> b)" |
41144 | 76 |
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
|
77 |
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
|
78 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 79 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
80 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
81 |
lemma "id a \<Longrightarrow> id (a \<or> b)" |
41144 | 82 |
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
|
83 |
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
|
84 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 85 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
86 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
87 |
lemma "id b \<Longrightarrow> id (a \<or> b)" |
41144 | 88 |
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
|
89 |
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
|
90 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 91 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
92 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
93 |
lemma "id (\<not> a) \<Longrightarrow> id (\<not> b) \<Longrightarrow> id (\<not> (a \<or> b))" |
41144 | 94 |
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
|
95 |
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
|
96 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 97 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
98 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
99 |
lemma "id (\<not> a) \<Longrightarrow> id (a \<longrightarrow> b)" |
41144 | 100 |
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
|
101 |
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
|
102 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 103 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
104 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
105 |
lemma "id (a \<longrightarrow> b) \<longleftrightarrow> id (\<not> a \<or> b)" |
41144 | 106 |
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
|
107 |
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
|
108 |
sledgehammer [full_types, type_sys = tags, expect = some] (id_apply) |
41144 | 109 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
110 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
111 |
end |