author | blanchet |
Thu, 12 May 2011 15:29:19 +0200 | |
changeset 42756 | 6b7ef9b724fd |
parent 42722 | 626e292d22a7 |
child 42758 | 865ce93ce025 |
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 |
|
42555 | 13 |
sledgehammer_params [prover = e, blocking, timeout = 10] |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
14 |
|
42756
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
15 |
text {* Extensionality and set constants *} |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
16 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
17 |
lemma plus_1_not_0: "n + (1\<Colon>nat) \<noteq> 0" |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
18 |
by simp |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
19 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
20 |
definition inc :: "nat \<Rightarrow> nat" where |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
21 |
"inc x = x + 1" |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
22 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
23 |
lemma "inc \<noteq> (\<lambda>y. 0)" |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
24 |
sledgehammer [expect = some] (inc_def plus_1_not_0) |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
25 |
by (metis inc_def plus_1_not_0) |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
26 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
27 |
lemma "inc = (\<lambda>y. y + 1)" |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
28 |
sledgehammer [expect = some] (inc_def) |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
29 |
by (metis inc_def) |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
30 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
31 |
lemma "(\<lambda>y. y + 1) = inc" |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
32 |
sledgehammer [expect = some] (inc_def) |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
33 |
by (metis inc_def) |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
34 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
35 |
definition add_swap :: "nat \<Rightarrow> nat \<Rightarrow> nat" where |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
36 |
"add_swap = (\<lambda>x y. y + x)" |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
37 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
38 |
lemma "add_swap m n = n + m" |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
39 |
sledgehammer [expect = some] (add_swap_def) |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
40 |
by (metis add_swap_def) |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
41 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
42 |
definition "A = {xs\<Colon>'a list. True}" |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
43 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
44 |
lemma "xs \<in> A" |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
45 |
sledgehammer [expect = some] |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
46 |
by (metis A_def Collect_def mem_def) |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
47 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
48 |
definition "B (y::int) \<equiv> y \<le> 0" |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
49 |
definition "C (y::int) \<equiv> y \<le> 1" |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
50 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
51 |
lemma int_le_0_imp_le_1: "x \<le> (0::int) \<Longrightarrow> x \<le> 1" |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
52 |
by linarith |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
53 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
54 |
lemma "B \<subseteq> C" |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
55 |
sledgehammer [type_sys = poly_args, max_relevant = 200, expect = some] |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
56 |
by (metis B_def C_def int_le_0_imp_le_1 predicate1I) |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
57 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
58 |
|
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
59 |
text {* Proxies for logical constants *} |
6b7ef9b724fd
added two mildly higher-order examples contributed by TN, removed references to obsoleted type systems, and moved things around
blanchet
parents:
42722
diff
changeset
|
60 |
|
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
61 |
lemma "id True" |
42590 | 62 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 63 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
64 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
65 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 66 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 67 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 68 |
sledgehammer [type_sys = mangled_preds, expect = some] (id_apply) |
41144 | 69 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
70 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
71 |
lemma "\<not> id False" |
42590 | 72 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 73 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
74 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
75 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 76 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 77 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 78 |
sledgehammer [type_sys = mangled_preds, 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 "x = id True \<or> x = id False" |
42590 | 82 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 83 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
84 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
85 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 86 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 87 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 88 |
sledgehammer [type_sys = mangled_preds, 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 x = id True \<or> id x = id False" |
42590 | 92 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 93 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
94 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
95 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 96 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 97 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 98 |
sledgehammer [type_sys = mangled_preds, expect = some] (id_apply) |
41144 | 99 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
100 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
101 |
lemma "P True \<Longrightarrow> P False \<Longrightarrow> P x" |
42590 | 102 |
sledgehammer [type_sys = erased, expect = none] () |
42722 | 103 |
sledgehammer [type_sys = poly_args, expect = none] () |
104 |
sledgehammer [type_sys = poly_tags!, expect = some] () |
|
105 |
sledgehammer [type_sys = poly_tags, expect = some] () |
|
106 |
sledgehammer [type_sys = poly_preds, expect = some] () |
|
42590 | 107 |
sledgehammer [type_sys = mangled_preds!, expect = some] () |
42686 | 108 |
sledgehammer [type_sys = mangled_preds?, expect = some] () |
42590 | 109 |
sledgehammer [type_sys = mangled_preds, expect = some] () |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
110 |
by metisFT |
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
111 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
112 |
lemma "id (\<not> a) \<Longrightarrow> \<not> id a" |
42590 | 113 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 114 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
115 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
116 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 117 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 118 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 119 |
sledgehammer [type_sys = mangled_preds, expect = some] (id_apply) |
41144 | 120 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
121 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
122 |
lemma "id (\<not> \<not> a) \<Longrightarrow> id a" |
42590 | 123 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 124 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
125 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
126 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 127 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 128 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 129 |
sledgehammer [type_sys = mangled_preds, expect = some] (id_apply) |
42555 | 130 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
131 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
132 |
lemma "id (\<not> (id (\<not> a))) \<Longrightarrow> id a" |
42590 | 133 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 134 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
135 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
136 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 137 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 138 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 139 |
sledgehammer [type_sys = mangled_preds, expect = some] (id_apply) |
41144 | 140 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
141 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
142 |
lemma "id (a \<and> b) \<Longrightarrow> id a" |
42590 | 143 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 144 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
145 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
146 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 147 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 148 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 149 |
sledgehammer [type_sys = mangled_preds, expect = some] (id_apply) |
41144 | 150 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
151 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
152 |
lemma "id (a \<and> b) \<Longrightarrow> id b" |
42590 | 153 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 154 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
155 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
156 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 157 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 158 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 159 |
sledgehammer [type_sys = mangled_preds, expect = some] (id_apply) |
41144 | 160 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
161 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
162 |
lemma "id a \<Longrightarrow> id b \<Longrightarrow> id (a \<and> b)" |
42590 | 163 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 164 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
165 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
166 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 167 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 168 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 169 |
sledgehammer [type_sys = mangled_preds, expect = some] (id_apply) |
41144 | 170 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
171 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
172 |
lemma "id a \<Longrightarrow> id (a \<or> b)" |
42590 | 173 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 174 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
175 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
176 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 177 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 178 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 179 |
sledgehammer [type_sys = mangled_preds, expect = some] (id_apply) |
41144 | 180 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
181 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
182 |
lemma "id b \<Longrightarrow> id (a \<or> b)" |
42590 | 183 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 184 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
185 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
186 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 187 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 188 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 189 |
sledgehammer [type_sys = mangled_preds, expect = some] (id_apply) |
41144 | 190 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
191 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
192 |
lemma "id (\<not> a) \<Longrightarrow> id (\<not> b) \<Longrightarrow> id (\<not> (a \<or> b))" |
42590 | 193 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 194 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
195 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
196 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 197 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 198 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 199 |
sledgehammer [type_sys = mangled_preds, expect = some] (id_apply) |
41144 | 200 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
201 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
202 |
lemma "id (\<not> a) \<Longrightarrow> id (a \<longrightarrow> b)" |
42590 | 203 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 204 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
205 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
206 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 207 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 208 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 209 |
sledgehammer [type_sys = mangled_preds, expect = some] (id_apply) |
41144 | 210 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
211 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
212 |
lemma "id (a \<longrightarrow> b) \<longleftrightarrow> id (\<not> a \<or> b)" |
42590 | 213 |
sledgehammer [type_sys = erased, expect = some] (id_apply) |
42722 | 214 |
sledgehammer [type_sys = poly_tags!, expect = some] (id_apply) |
215 |
sledgehammer [type_sys = poly_tags, expect = some] (id_apply) |
|
216 |
sledgehammer [type_sys = poly_preds, expect = some] (id_apply) |
|
42590 | 217 |
sledgehammer [type_sys = mangled_preds!, expect = some] (id_apply) |
42686 | 218 |
sledgehammer [type_sys = mangled_preds?, expect = some] (id_apply) |
42590 | 219 |
sledgehammer [type_sys = mangled_preds, expect = some] (id_apply) |
41144 | 220 |
by (metis id_apply) |
41141
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
221 |
|
ad923cdd4a5d
added example to exercise higher-order reasoning with Sledgehammer and Metis
blanchet
parents:
diff
changeset
|
222 |
end |