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