author | paulson |
Mon, 27 Jul 1998 17:38:55 +0200 | |
changeset 5203 | eb5a1511a07d |
parent 3835 | 9a5a4e123859 |
child 8273 | 9f9e6c65487d |
permissions | -rw-r--r-- |
1459 | 1 |
(* Title: FOL/ex/int |
0 | 2 |
ID: $Id$ |
1459 | 3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
0 | 4 |
Copyright 1991 University of Cambridge |
5 |
||
6 |
Intuitionistic First-Order Logic |
|
7 |
||
8 |
Single-step commands: |
|
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
9 |
by (IntPr.step_tac 1); |
0 | 10 |
by (biresolve_tac safe_brls 1); |
11 |
by (biresolve_tac haz_brls 1); |
|
12 |
by (assume_tac 1); |
|
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
13 |
by (IntPr.safe_tac 1); |
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
14 |
by (IntPr.mp_tac 1); |
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
15 |
by (IntPr.fast_tac 1); |
0 | 16 |
*) |
17 |
||
5203 | 18 |
context IFOL.thy; |
19 |
||
0 | 20 |
writeln"File FOL/ex/int."; |
21 |
||
1006 | 22 |
(*Metatheorem (for PROPOSITIONAL formulae...): |
23 |
P is classically provable iff ~~P is intuitionistically provable. |
|
24 |
Therefore ~P is classically provable iff it is intuitionistically provable. |
|
0 | 25 |
|
1006 | 26 |
Proof: Let Q be the conjuction of the propositions A|~A, one for each atom A |
27 |
in P. Now ~~Q is intuitionistically provable because ~~(A|~A) is and because |
|
28 |
~~ distributes over &. If P is provable classically, then clearly Q-->P is |
|
29 |
provable intuitionistically, so ~~(Q-->P) is also provable intuitionistically. |
|
30 |
The latter is intuitionistically equivalent to ~~Q-->~~P, hence to ~~P, since |
|
31 |
~~Q is intuitionistically provable. Finally, if P is a negation then ~~P is |
|
32 |
intuitionstically equivalent to P. [Andy Pitts] *) |
|
0 | 33 |
|
5203 | 34 |
Goal "~~(P&Q) <-> ~~P & ~~Q"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
35 |
by (IntPr.fast_tac 1); |
0 | 36 |
result(); |
37 |
||
1006 | 38 |
(* ~~ does NOT distribute over | *) |
39 |
||
5203 | 40 |
Goal "~~(P-->Q) <-> (~~P --> ~~Q)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
41 |
by (IntPr.fast_tac 1); |
1006 | 42 |
result(); |
43 |
||
5203 | 44 |
Goal "~~~P <-> ~P"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
45 |
by (IntPr.fast_tac 1); |
0 | 46 |
result(); |
47 |
||
5203 | 48 |
Goal "~~((P --> Q | R) --> (P-->Q) | (P-->R))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
49 |
by (IntPr.fast_tac 1); |
0 | 50 |
result(); |
51 |
||
5203 | 52 |
Goal "(P<->Q) <-> (Q<->P)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
53 |
by (IntPr.fast_tac 1); |
0 | 54 |
result(); |
55 |
||
56 |
||
57 |
writeln"Lemmas for the propositional double-negation translation"; |
|
58 |
||
5203 | 59 |
Goal "P --> ~~P"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
60 |
by (IntPr.fast_tac 1); |
0 | 61 |
result(); |
62 |
||
5203 | 63 |
Goal "~~(~~P --> P)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
64 |
by (IntPr.fast_tac 1); |
0 | 65 |
result(); |
66 |
||
5203 | 67 |
Goal "~~P & ~~(P --> Q) --> ~~Q"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
68 |
by (IntPr.fast_tac 1); |
0 | 69 |
result(); |
70 |
||
71 |
||
72 |
writeln"The following are classically but not constructively valid."; |
|
73 |
||
74 |
(*The attempt to prove them terminates quickly!*) |
|
5203 | 75 |
Goal "((P-->Q) --> P) --> P"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
76 |
by (IntPr.fast_tac 1) handle ERROR => writeln"Failed, as expected"; |
0 | 77 |
(*Check that subgoals remain: proof failed.*) |
78 |
getgoal 1; |
|
79 |
||
5203 | 80 |
Goal "(P&Q-->R) --> (P-->R) | (Q-->R)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
81 |
by (IntPr.fast_tac 1) handle ERROR => writeln"Failed, as expected"; |
0 | 82 |
getgoal 1; |
83 |
||
84 |
||
2687 | 85 |
writeln"de Bruijn formulae"; |
86 |
||
87 |
(*de Bruijn formula with three predicates*) |
|
5203 | 88 |
Goal "((P<->Q) --> P&Q&R) & \ |
2687 | 89 |
\ ((Q<->R) --> P&Q&R) & \ |
90 |
\ ((R<->P) --> P&Q&R) --> P&Q&R"; |
|
91 |
by (IntPr.fast_tac 1); |
|
92 |
result(); |
|
93 |
||
94 |
||
95 |
(*de Bruijn formula with five predicates*) |
|
5203 | 96 |
Goal "((P<->Q) --> P&Q&R&S&T) & \ |
2687 | 97 |
\ ((Q<->R) --> P&Q&R&S&T) & \ |
98 |
\ ((R<->S) --> P&Q&R&S&T) & \ |
|
99 |
\ ((S<->T) --> P&Q&R&S&T) & \ |
|
100 |
\ ((T<->P) --> P&Q&R&S&T) --> P&Q&R&S&T"; |
|
101 |
by (IntPr.fast_tac 1); |
|
102 |
result(); |
|
103 |
||
104 |
||
5203 | 105 |
(*** Problems from of Sahlin, Franzen and Haridi, |
106 |
An Intuitionistic Predicate Logic Theorem Prover |
|
107 |
***) |
|
108 |
||
109 |
(*Problem 1.1*) |
|
110 |
Goal "(ALL x. EX y. ALL z. p(x) & q(y) & r(z)) <-> \ |
|
111 |
\ (ALL z. EX y. ALL x. p(x) & q(y) & r(z))"; |
|
112 |
(* |
|
113 |
by (IntPr.best_dup_tac 1); (*2 minutes! Is it worth it?*) |
|
114 |
*) |
|
115 |
||
116 |
(*Problem 3.1*) |
|
117 |
Goal "~ (EX x. ALL y. mem(y,x) <-> ~ mem(x,x))"; |
|
118 |
by (IntPr.fast_tac 1); |
|
119 |
result(); |
|
120 |
||
121 |
(*Problem 4.1: hopeless!*) |
|
122 |
Goal "(ALL x. p(x) --> p(h(x)) | p(g(x))) & (EX x. p(x)) & (ALL x. ~p(h(x))) \ |
|
123 |
\ --> (EX x. p(g(g(g(g(g(x)))))))"; |
|
124 |
||
125 |
||
0 | 126 |
writeln"Intuitionistic FOL: propositional problems based on Pelletier."; |
127 |
||
128 |
writeln"Problem ~~1"; |
|
5203 | 129 |
Goal "~~((P-->Q) <-> (~Q --> ~P))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
130 |
by (IntPr.fast_tac 1); |
0 | 131 |
result(); |
132 |
||
133 |
||
134 |
writeln"Problem ~~2"; |
|
5203 | 135 |
Goal "~~(~~P <-> P)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
136 |
by (IntPr.fast_tac 1); |
0 | 137 |
result(); |
138 |
(*1 secs*) |
|
139 |
||
140 |
||
141 |
writeln"Problem 3"; |
|
5203 | 142 |
Goal "~(P-->Q) --> (Q-->P)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
143 |
by (IntPr.fast_tac 1); |
0 | 144 |
result(); |
145 |
||
146 |
writeln"Problem ~~4"; |
|
5203 | 147 |
Goal "~~((~P-->Q) <-> (~Q --> P))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
148 |
by (IntPr.fast_tac 1); |
0 | 149 |
result(); |
150 |
(*9 secs*) |
|
151 |
||
152 |
writeln"Problem ~~5"; |
|
5203 | 153 |
Goal "~~((P|Q-->P|R) --> P|(Q-->R))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
154 |
by (IntPr.fast_tac 1); |
0 | 155 |
result(); |
156 |
(*10 secs*) |
|
157 |
||
158 |
||
159 |
writeln"Problem ~~6"; |
|
5203 | 160 |
Goal "~~(P | ~P)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
161 |
by (IntPr.fast_tac 1); |
0 | 162 |
result(); |
163 |
||
164 |
writeln"Problem ~~7"; |
|
5203 | 165 |
Goal "~~(P | ~~~P)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
166 |
by (IntPr.fast_tac 1); |
0 | 167 |
result(); |
168 |
||
169 |
writeln"Problem ~~8. Peirce's law"; |
|
5203 | 170 |
Goal "~~(((P-->Q) --> P) --> P)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
171 |
by (IntPr.fast_tac 1); |
0 | 172 |
result(); |
173 |
||
174 |
writeln"Problem 9"; |
|
5203 | 175 |
Goal "((P|Q) & (~P|Q) & (P| ~Q)) --> ~ (~P | ~Q)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
176 |
by (IntPr.fast_tac 1); |
0 | 177 |
result(); |
178 |
(*9 secs*) |
|
179 |
||
180 |
||
181 |
writeln"Problem 10"; |
|
5203 | 182 |
Goal "(Q-->R) --> (R-->P&Q) --> (P-->(Q|R)) --> (P<->Q)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
183 |
by (IntPr.fast_tac 1); |
0 | 184 |
result(); |
185 |
||
186 |
writeln"11. Proved in each direction (incorrectly, says Pelletier!!) "; |
|
5203 | 187 |
Goal "P<->P"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
188 |
by (IntPr.fast_tac 1); |
0 | 189 |
|
190 |
writeln"Problem ~~12. Dijkstra's law "; |
|
5203 | 191 |
Goal "~~(((P <-> Q) <-> R) <-> (P <-> (Q <-> R)))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
192 |
by (IntPr.fast_tac 1); |
0 | 193 |
result(); |
194 |
||
5203 | 195 |
Goal "((P <-> Q) <-> R) --> ~~(P <-> (Q <-> R))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
196 |
by (IntPr.fast_tac 1); |
0 | 197 |
result(); |
198 |
||
199 |
writeln"Problem 13. Distributive law"; |
|
5203 | 200 |
Goal "P | (Q & R) <-> (P | Q) & (P | R)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
201 |
by (IntPr.fast_tac 1); |
0 | 202 |
result(); |
203 |
||
204 |
writeln"Problem ~~14"; |
|
5203 | 205 |
Goal "~~((P <-> Q) <-> ((Q | ~P) & (~Q|P)))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
206 |
by (IntPr.fast_tac 1); |
0 | 207 |
result(); |
208 |
||
209 |
writeln"Problem ~~15"; |
|
5203 | 210 |
Goal "~~((P --> Q) <-> (~P | Q))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
211 |
by (IntPr.fast_tac 1); |
0 | 212 |
result(); |
213 |
||
214 |
writeln"Problem ~~16"; |
|
5203 | 215 |
Goal "~~((P-->Q) | (Q-->P))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
216 |
by (IntPr.fast_tac 1); |
0 | 217 |
result(); |
218 |
||
219 |
writeln"Problem ~~17"; |
|
5203 | 220 |
Goal |
0 | 221 |
"~~(((P & (Q-->R))-->S) <-> ((~P | Q | S) & (~P | ~R | S)))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
222 |
by (IntPr.fast_tac 1); |
0 | 223 |
result(); |
224 |
||
225 |
(*Dijkstra's "Golden Rule"*) |
|
5203 | 226 |
Goal "(P&Q) <-> P <-> Q <-> (P|Q)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
227 |
by (IntPr.fast_tac 1); |
0 | 228 |
result(); |
229 |
||
230 |
||
232 | 231 |
writeln"****Examples with quantifiers****"; |
0 | 232 |
|
233 |
||
234 |
writeln"The converse is classical in the following implications..."; |
|
235 |
||
5203 | 236 |
Goal "(EX x. P(x)-->Q) --> (ALL x. P(x)) --> Q"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
237 |
by (IntPr.fast_tac 1); |
0 | 238 |
result(); |
239 |
||
5203 | 240 |
Goal "((ALL x. P(x))-->Q) --> ~ (ALL x. P(x) & ~Q)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
241 |
by (IntPr.fast_tac 1); |
0 | 242 |
result(); |
243 |
||
5203 | 244 |
Goal "((ALL x. ~P(x))-->Q) --> ~ (ALL x. ~ (P(x)|Q))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
245 |
by (IntPr.fast_tac 1); |
0 | 246 |
result(); |
247 |
||
5203 | 248 |
Goal "(ALL x. P(x)) | Q --> (ALL x. P(x) | Q)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
249 |
by (IntPr.fast_tac 1); |
0 | 250 |
result(); |
251 |
||
5203 | 252 |
Goal "(EX x. P --> Q(x)) --> (P --> (EX x. Q(x)))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
253 |
by (IntPr.fast_tac 1); |
0 | 254 |
result(); |
255 |
||
256 |
||
257 |
||
258 |
||
259 |
writeln"The following are not constructively valid!"; |
|
260 |
(*The attempt to prove them terminates quickly!*) |
|
261 |
||
5203 | 262 |
Goal "((ALL x. P(x))-->Q) --> (EX x. P(x)-->Q)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
263 |
by (IntPr.fast_tac 1) handle ERROR => writeln"Failed, as expected"; |
0 | 264 |
getgoal 1; |
265 |
||
5203 | 266 |
Goal "(P --> (EX x. Q(x))) --> (EX x. P-->Q(x))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
267 |
by (IntPr.fast_tac 1) handle ERROR => writeln"Failed, as expected"; |
0 | 268 |
getgoal 1; |
269 |
||
5203 | 270 |
Goal "(ALL x. P(x) | Q) --> ((ALL x. P(x)) | Q)"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
271 |
by (IntPr.fast_tac 1) handle ERROR => writeln"Failed, as expected"; |
0 | 272 |
getgoal 1; |
273 |
||
5203 | 274 |
Goal "(ALL x. ~~P(x)) --> ~~(ALL x. P(x))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
275 |
by (IntPr.fast_tac 1) handle ERROR => writeln"Failed, as expected"; |
0 | 276 |
getgoal 1; |
277 |
||
278 |
(*Classically but not intuitionistically valid. Proved by a bug in 1986!*) |
|
5203 | 279 |
Goal "EX x. Q(x) --> (ALL x. Q(x))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
280 |
by (IntPr.fast_tac 1) handle ERROR => writeln"Failed, as expected"; |
0 | 281 |
getgoal 1; |
282 |
||
283 |
||
284 |
writeln"Hard examples with quantifiers"; |
|
285 |
||
286 |
(*The ones that have not been proved are not known to be valid! |
|
287 |
Some will require quantifier duplication -- not currently available*) |
|
288 |
||
289 |
writeln"Problem ~~18"; |
|
5203 | 290 |
Goal "~~(EX y. ALL x. P(y)-->P(x))"; |
0 | 291 |
(*NOT PROVED*) |
292 |
||
293 |
writeln"Problem ~~19"; |
|
5203 | 294 |
Goal "~~(EX x. ALL y z. (P(y)-->Q(z)) --> (P(x)-->Q(x)))"; |
0 | 295 |
(*NOT PROVED*) |
296 |
||
297 |
writeln"Problem 20"; |
|
5203 | 298 |
Goal "(ALL x y. EX z. ALL w. (P(x)&Q(y)-->R(z)&S(w))) \ |
0 | 299 |
\ --> (EX x y. P(x) & Q(y)) --> (EX z. R(z))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
300 |
by (IntPr.fast_tac 1); |
0 | 301 |
result(); |
302 |
||
303 |
writeln"Problem 21"; |
|
5203 | 304 |
Goal "(EX x. P-->Q(x)) & (EX x. Q(x)-->P) --> ~~(EX x. P<->Q(x))"; |
2573
f3e04805895a
Correction to Problem 24 (with unsatisfactory proof)
paulson
parents:
1459
diff
changeset
|
305 |
(*NOT PROVED; needs quantifier duplication*) |
0 | 306 |
|
307 |
writeln"Problem 22"; |
|
5203 | 308 |
Goal "(ALL x. P <-> Q(x)) --> (P <-> (ALL x. Q(x)))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
309 |
by (IntPr.fast_tac 1); |
0 | 310 |
result(); |
311 |
||
312 |
writeln"Problem ~~23"; |
|
5203 | 313 |
Goal "~~ ((ALL x. P | Q(x)) <-> (P | (ALL x. Q(x))))"; |
314 |
by (IntPr.fast_tac 1); |
|
0 | 315 |
result(); |
316 |
||
317 |
writeln"Problem 24"; |
|
5203 | 318 |
Goal "~(EX x. S(x)&Q(x)) & (ALL x. P(x) --> Q(x)|R(x)) & \ |
3835 | 319 |
\ (~(EX x. P(x)) --> (EX x. Q(x))) & (ALL x. Q(x)|R(x) --> S(x)) \ |
2573
f3e04805895a
Correction to Problem 24 (with unsatisfactory proof)
paulson
parents:
1459
diff
changeset
|
320 |
\ --> ~~(EX x. P(x)&R(x))"; |
f3e04805895a
Correction to Problem 24 (with unsatisfactory proof)
paulson
parents:
1459
diff
changeset
|
321 |
(*Not clear why fast_tac, best_tac, ASTAR and ITER_DEEPEN all take forever*) |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
322 |
by IntPr.safe_tac; |
2573
f3e04805895a
Correction to Problem 24 (with unsatisfactory proof)
paulson
parents:
1459
diff
changeset
|
323 |
by (etac impE 1); |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
324 |
by (IntPr.fast_tac 1); |
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
325 |
by (IntPr.fast_tac 1); |
0 | 326 |
result(); |
327 |
||
328 |
writeln"Problem 25"; |
|
5203 | 329 |
Goal "(EX x. P(x)) & \ |
0 | 330 |
\ (ALL x. L(x) --> ~ (M(x) & R(x))) & \ |
331 |
\ (ALL x. P(x) --> (M(x) & L(x))) & \ |
|
332 |
\ ((ALL x. P(x)-->Q(x)) | (EX x. P(x)&R(x))) \ |
|
333 |
\ --> (EX x. Q(x)&P(x))"; |
|
5203 | 334 |
by (IntPr.fast_tac 1); |
0 | 335 |
result(); |
336 |
||
337 |
writeln"Problem ~~26"; |
|
5203 | 338 |
Goal "(~~(EX x. p(x)) <-> ~~(EX x. q(x))) & \ |
1459 | 339 |
\ (ALL x. ALL y. p(x) & q(y) --> (r(x) <-> s(y))) \ |
0 | 340 |
\ --> ((ALL x. p(x)-->r(x)) <-> (ALL x. q(x)-->s(x)))"; |
341 |
(*NOT PROVED*) |
|
342 |
||
343 |
writeln"Problem 27"; |
|
5203 | 344 |
Goal "(EX x. P(x) & ~Q(x)) & \ |
0 | 345 |
\ (ALL x. P(x) --> R(x)) & \ |
346 |
\ (ALL x. M(x) & L(x) --> P(x)) & \ |
|
347 |
\ ((EX x. R(x) & ~ Q(x)) --> (ALL x. L(x) --> ~ R(x))) \ |
|
348 |
\ --> (ALL x. M(x) --> ~L(x))"; |
|
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
349 |
by (IntPr.fast_tac 1); (*21 secs*) |
0 | 350 |
result(); |
351 |
||
352 |
writeln"Problem ~~28. AMENDED"; |
|
5203 | 353 |
Goal "(ALL x. P(x) --> (ALL x. Q(x))) & \ |
0 | 354 |
\ (~~(ALL x. Q(x)|R(x)) --> (EX x. Q(x)&S(x))) & \ |
3835 | 355 |
\ (~~(EX x. S(x)) --> (ALL x. L(x) --> M(x))) \ |
0 | 356 |
\ --> (ALL x. P(x) & L(x) --> M(x))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
357 |
by (IntPr.fast_tac 1); (*48 secs*) |
0 | 358 |
result(); |
359 |
||
360 |
writeln"Problem 29. Essentially the same as Principia Mathematica *11.71"; |
|
5203 | 361 |
Goal "(EX x. P(x)) & (EX y. Q(y)) \ |
0 | 362 |
\ --> ((ALL x. P(x)-->R(x)) & (ALL y. Q(y)-->S(y)) <-> \ |
363 |
\ (ALL x y. P(x) & Q(y) --> R(x) & S(y)))"; |
|
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
364 |
by (IntPr.fast_tac 1); |
0 | 365 |
result(); |
366 |
||
367 |
writeln"Problem ~~30"; |
|
5203 | 368 |
Goal "(ALL x. (P(x) | Q(x)) --> ~ R(x)) & \ |
0 | 369 |
\ (ALL x. (Q(x) --> ~ S(x)) --> P(x) & R(x)) \ |
370 |
\ --> (ALL x. ~~S(x))"; |
|
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
371 |
by (IntPr.fast_tac 1); |
0 | 372 |
result(); |
373 |
||
374 |
writeln"Problem 31"; |
|
5203 | 375 |
Goal "~(EX x. P(x) & (Q(x) | R(x))) & \ |
0 | 376 |
\ (EX x. L(x) & P(x)) & \ |
377 |
\ (ALL x. ~ R(x) --> M(x)) \ |
|
378 |
\ --> (EX x. L(x) & M(x))"; |
|
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
379 |
by (IntPr.fast_tac 1); |
0 | 380 |
result(); |
381 |
||
382 |
writeln"Problem 32"; |
|
5203 | 383 |
Goal "(ALL x. P(x) & (Q(x)|R(x))-->S(x)) & \ |
0 | 384 |
\ (ALL x. S(x) & R(x) --> L(x)) & \ |
385 |
\ (ALL x. M(x) --> R(x)) \ |
|
386 |
\ --> (ALL x. P(x) & M(x) --> L(x))"; |
|
5203 | 387 |
by (IntPr.fast_tac 1); |
0 | 388 |
result(); |
389 |
||
390 |
writeln"Problem ~~33"; |
|
5203 | 391 |
Goal "(ALL x. ~~(P(a) & (P(x)-->P(b))-->P(c))) <-> \ |
392 |
\ (ALL x. ~~((~P(a) | P(x) | P(c)) & (~P(a) | ~P(b) | P(c))))"; |
|
393 |
by (IntPr.best_tac 1); (*1.67s*) |
|
0 | 394 |
result(); |
395 |
||
396 |
||
397 |
writeln"Problem 36"; |
|
5203 | 398 |
Goal |
0 | 399 |
"(ALL x. EX y. J(x,y)) & \ |
400 |
\ (ALL x. EX y. G(x,y)) & \ |
|
401 |
\ (ALL x y. J(x,y) | G(x,y) --> (ALL z. J(y,z) | G(y,z) --> H(x,z))) \ |
|
402 |
\ --> (ALL x. EX y. H(x,y))"; |
|
5203 | 403 |
by (IntPr.fast_tac 1); (*5 secs*) |
0 | 404 |
result(); |
405 |
||
406 |
writeln"Problem 37"; |
|
5203 | 407 |
Goal |
0 | 408 |
"(ALL z. EX w. ALL x. EX y. \ |
3835 | 409 |
\ ~~(P(x,z)-->P(y,w)) & P(y,z) & (P(y,w) --> (EX u. Q(u,w)))) & \ |
0 | 410 |
\ (ALL x z. ~P(x,z) --> (EX y. Q(y,z))) & \ |
411 |
\ (~~(EX x y. Q(x,y)) --> (ALL x. R(x,x))) \ |
|
412 |
\ --> ~~(ALL x. EX y. R(x,y))"; |
|
413 |
(*NOT PROVED*) |
|
414 |
||
415 |
writeln"Problem 39"; |
|
5203 | 416 |
Goal "~ (EX x. ALL y. F(y,x) <-> ~F(y,y))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
417 |
by (IntPr.fast_tac 1); |
0 | 418 |
result(); |
419 |
||
420 |
writeln"Problem 40. AMENDED"; |
|
5203 | 421 |
Goal "(EX y. ALL x. F(x,y) <-> F(x,x)) --> \ |
0 | 422 |
\ ~(ALL x. EX y. ALL z. F(z,y) <-> ~ F(z,x))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
423 |
by (IntPr.fast_tac 1); |
0 | 424 |
result(); |
425 |
||
426 |
writeln"Problem 44"; |
|
5203 | 427 |
Goal "(ALL x. f(x) --> \ |
1459 | 428 |
\ (EX y. g(y) & h(x,y) & (EX y. g(y) & ~ h(x,y)))) & \ |
429 |
\ (EX x. j(x) & (ALL y. g(y) --> h(x,y))) \ |
|
0 | 430 |
\ --> (EX x. j(x) & ~f(x))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
431 |
by (IntPr.fast_tac 1); |
0 | 432 |
result(); |
433 |
||
434 |
writeln"Problem 48"; |
|
5203 | 435 |
Goal "(a=b | c=d) & (a=c | b=d) --> a=d | b=c"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
436 |
by (IntPr.fast_tac 1); |
0 | 437 |
result(); |
438 |
||
439 |
writeln"Problem 51"; |
|
5203 | 440 |
Goal "(EX z w. ALL x y. P(x,y) <-> (x=z & y=w)) --> \ |
0 | 441 |
\ (EX z. ALL x. EX w. (ALL y. P(x,y) <-> y=w) <-> x=z)"; |
5203 | 442 |
by (IntPr.fast_tac 1); |
0 | 443 |
result(); |
444 |
||
445 |
writeln"Problem 52"; |
|
446 |
(*Almost the same as 51. *) |
|
5203 | 447 |
Goal "(EX z w. ALL x y. P(x,y) <-> (x=z & y=w)) --> \ |
0 | 448 |
\ (EX w. ALL y. EX z. (ALL x. P(x,y) <-> x=z) <-> y=w)"; |
5203 | 449 |
by (IntPr.fast_tac 1); |
0 | 450 |
result(); |
451 |
||
452 |
writeln"Problem 56"; |
|
5203 | 453 |
Goal "(ALL x. (EX y. P(y) & x=f(y)) --> P(x)) <-> (ALL x. P(x) --> P(f(x)))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
454 |
by (IntPr.fast_tac 1); |
0 | 455 |
result(); |
456 |
||
457 |
writeln"Problem 57"; |
|
5203 | 458 |
Goal "P(f(a,b), f(b,c)) & P(f(b,c), f(a,c)) & \ |
0 | 459 |
\ (ALL x y z. P(x,y) & P(y,z) --> P(x,z)) --> P(f(a,b), f(a,c))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
460 |
by (IntPr.fast_tac 1); |
0 | 461 |
result(); |
462 |
||
463 |
writeln"Problem 60"; |
|
5203 | 464 |
Goal "ALL x. P(x,f(x)) <-> (EX y. (ALL z. P(z,y) --> P(z,f(x))) & P(x,y))"; |
2601
b301958c465d
Renamed structure Int (intuitionistic prover) to IntPr to prevent clash
paulson
parents:
2573
diff
changeset
|
465 |
by (IntPr.fast_tac 1); |
0 | 466 |
result(); |
467 |
||
468 |
writeln"Reached end of file."; |