src/LK/ex/hard-quant.ML
author paulson
Fri, 29 Nov 1996 18:03:21 +0100
changeset 2284 80ebd1a213fd
parent 0 a5a9c433f639
permissions -rw-r--r--
Swapped arguments of Crypt (for clarity and because it is conventional)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     1
(*  Title: 	LK/ex/hard-quant
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     2
    ID:         $Id$
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     3
    Author: 	Lawrence C Paulson, Cambridge University Computer Laboratory
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     4
    Copyright   1992  University of Cambridge
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     5
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     6
Hard examples with quantifiers.  Can be read to test the LK system.
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     7
From  F. J. Pelletier,
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     8
  Seventy-Five Problems for Testing Automatic Theorem Provers,
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
     9
  J. Automated Reasoning 2 (1986), 191-216.
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
  Errata, JAR 4 (1988), 236-236.
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    11
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    12
Uses pc_tac rather than fast_tac when the former is significantly faster.
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    13
*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    14
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    15
writeln"File LK/ex/hard-quant.";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    17
goal LK.thy "|- (ALL x. P(x) & Q(x)) <-> (ALL x. P(x))  &  (ALL x. Q(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    18
by (fast_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
result(); 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    20
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    21
goal LK.thy "|- (EX x. P-->Q(x))  <->  (P --> (EX x.Q(x)))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
by (fast_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    23
result(); 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    24
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    25
goal LK.thy "|- (EX x.P(x)-->Q)  <->  (ALL x.P(x)) --> Q";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    26
by (fast_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    27
result(); 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    28
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    29
goal LK.thy "|- (ALL x.P(x)) | Q  <->  (ALL x. P(x) | Q)";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    30
by (fast_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    31
result(); 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    32
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    33
writeln"Problems requiring quantifier duplication";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    34
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    35
(*Not provable by fast_tac LK_pack: needs multiple instantiation of ALL*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    36
goal LK.thy "|- (ALL x. P(x)-->P(f(x)))  &  P(d)-->P(f(f(f(d))))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    37
by (best_tac LK_dup_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    38
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    39
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    40
(*Needs double instantiation of the quantifier*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    41
goal LK.thy "|- EX x. P(x) --> P(a) & P(b)";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    42
by (fast_tac LK_dup_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    43
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    44
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    45
goal LK.thy "|- EX z. P(z) --> (ALL x. P(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    46
by (best_tac LK_dup_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    47
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    48
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    49
writeln"Hard examples with quantifiers";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    50
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    51
writeln"Problem 18";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    52
goal LK.thy "|- EX y. ALL x. P(y)-->P(x)";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    53
by (best_tac LK_dup_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    54
result(); 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    55
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    56
writeln"Problem 19";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    57
goal LK.thy "|- EX x. ALL y z. (P(y)-->Q(z)) --> (P(x)-->Q(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    58
by (best_tac LK_dup_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    59
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    60
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    61
writeln"Problem 20";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    62
goal LK.thy "|- (ALL x y. EX z. ALL w. (P(x)&Q(y)-->R(z)&S(w)))     \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    63
\   --> (EX x y. P(x) & Q(y)) --> (EX z. R(z))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    64
by (fast_tac LK_pack 1); 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    65
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    66
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    67
writeln"Problem 21";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    68
goal LK.thy "|- (EX x. P-->Q(x)) & (EX x. Q(x)-->P) --> (EX x. P<->Q(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    69
by (best_tac LK_dup_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    70
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    71
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    72
writeln"Problem 22";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    73
goal LK.thy "|- (ALL x. P <-> Q(x))  -->  (P <-> (ALL x. Q(x)))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    74
by (fast_tac LK_pack 1); 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    75
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    76
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    77
writeln"Problem 23";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    78
goal LK.thy "|- (ALL x. P | Q(x))  <->  (P | (ALL x. Q(x)))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    79
by (best_tac LK_pack 1);  
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    80
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    81
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    82
writeln"Problem 24";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    83
goal LK.thy "|- ~(EX x. S(x)&Q(x)) & (ALL x. P(x) --> Q(x)|R(x)) &  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    84
\    ~(EX x.P(x)) --> (EX x.Q(x)) & (ALL x. Q(x)|R(x) --> S(x))  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    85
\   --> (EX x. P(x)&R(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    86
by (pc_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    87
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    88
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    89
writeln"Problem 25";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    90
goal LK.thy "|- (EX x. P(x)) &  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    91
\       (ALL x. L(x) --> ~ (M(x) & R(x))) &  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    92
\       (ALL x. P(x) --> (M(x) & L(x))) &   \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    93
\       ((ALL x. P(x)-->Q(x)) | (EX x. P(x)&R(x)))  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    94
\   --> (EX x. Q(x)&P(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    95
by (best_tac LK_pack 1);  
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    96
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    97
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    98
writeln"Problem 26";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    99
goal LK.thy "|- ((EX x. p(x)) <-> (EX x. q(x))) &	\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   100
\     (ALL x. ALL y. p(x) & q(y) --> (r(x) <-> s(y)))	\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   101
\ --> ((ALL x. p(x)-->r(x)) <-> (ALL x. q(x)-->s(x)))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   102
by (pc_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   103
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   104
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   105
writeln"Problem 27";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   106
goal LK.thy "|- (EX x. P(x) & ~Q(x)) &   \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   107
\             (ALL x. P(x) --> R(x)) &   \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   108
\             (ALL x. M(x) & L(x) --> P(x)) &   \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   109
\             ((EX x. R(x) & ~ Q(x)) --> (ALL x. L(x) --> ~ R(x)))  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   110
\         --> (ALL x. M(x) --> ~L(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   111
by (pc_tac LK_pack 1); 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   112
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   113
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   114
writeln"Problem 28.  AMENDED";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   115
goal LK.thy "|- (ALL x. P(x) --> (ALL x. Q(x))) &   \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   116
\       ((ALL x. Q(x)|R(x)) --> (EX x. Q(x)&S(x))) &  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   117
\       ((EX x.S(x)) --> (ALL x. L(x) --> M(x)))  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   118
\   --> (ALL x. P(x) & L(x) --> M(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   119
by (pc_tac LK_pack 1);  
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   120
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   121
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   122
writeln"Problem 29.  Essentially the same as Principia Mathematica *11.71";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   123
goal LK.thy "|- (EX x. P(x)) & (EX y. Q(y))  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   124
\   --> ((ALL x. P(x)-->R(x)) & (ALL y. Q(y)-->S(y))   <->     \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   125
\        (ALL x y. P(x) & Q(y) --> R(x) & S(y)))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   126
by (pc_tac LK_pack 1); 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   127
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   128
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   129
writeln"Problem 30";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   130
goal LK.thy "|- (ALL x. P(x) | Q(x) --> ~ R(x)) & \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   131
\       (ALL x. (Q(x) --> ~ S(x)) --> P(x) & R(x))  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   132
\   --> (ALL x. S(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   133
by (fast_tac LK_pack 1);  
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   134
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   135
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   136
writeln"Problem 31";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   137
goal LK.thy "|- ~(EX x.P(x) & (Q(x) | R(x))) & \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   138
\       (EX x. L(x) & P(x)) & \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   139
\       (ALL x. ~ R(x) --> M(x))  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   140
\   --> (EX x. L(x) & M(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   141
by (fast_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   142
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   143
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   144
writeln"Problem 32";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   145
goal LK.thy "|- (ALL x. P(x) & (Q(x)|R(x))-->S(x)) & \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   146
\       (ALL x. S(x) & R(x) --> L(x)) & \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   147
\       (ALL x. M(x) --> R(x))  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   148
\   --> (ALL x. P(x) & M(x) --> L(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   149
by (best_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   150
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   151
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   152
writeln"Problem 33";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   153
goal LK.thy "|- (ALL x. P(a) & (P(x)-->P(b))-->P(c))  <->    \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   154
\    (ALL x. (~P(a) | P(x) | P(c)) & (~P(a) | ~P(b) | P(c)))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   155
by (fast_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   156
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   157
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   158
writeln"Problem 34  AMENDED (TWICE!!)  NOT PROVED AUTOMATICALLY";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   159
(*Andrews's challenge*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   160
goal LK.thy "|- ((EX x. ALL y. p(x) <-> p(y))  <->		\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   161
\              ((EX x. q(x)) <-> (ALL y. p(y))))     <->	\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   162
\             ((EX x. ALL y. q(x) <-> q(y))  <->		\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   163
\              ((EX x. p(x)) <-> (ALL y. q(y))))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   164
by (safe_goal_tac LK_pack 1);   (*53 secs*) (*13 secs*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   165
by (TRYALL (fast_tac LK_pack));	(*165 secs*)  (*117 secs*)  (*138 secs*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   166
(*for some reason, pc_tac leaves 14 subgoals instead of 6*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   167
by (TRYALL (best_tac LK_dup_pack)); (*55 secs*) (*29 secs*) (*54 secs*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   168
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   169
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   170
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   171
writeln"Problem 35";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   172
goal LK.thy "|- EX x y. P(x,y) -->  (ALL u v. P(u,v))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   173
by (best_tac LK_dup_pack 1);  (*27 secs??*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   174
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   175
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   176
writeln"Problem 36";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   177
goal LK.thy "|- (ALL x. EX y. J(x,y)) & \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   178
\       (ALL x. EX y. G(x,y)) & \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   179
\       (ALL x y. J(x,y) | G(x,y) -->	\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   180
\       (ALL z. J(y,z) | G(y,z) --> H(x,z)))   \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   181
\   --> (ALL x. EX y. H(x,y))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   182
by (fast_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   183
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   184
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   185
writeln"Problem 37";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   186
goal LK.thy "|- (ALL z. EX w. ALL x. EX y. \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   187
\          (P(x,z)-->P(y,w)) & P(y,z) & (P(y,w) --> (EX u.Q(u,w)))) & \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   188
\       (ALL x z. ~P(x,z) --> (EX y. Q(y,z))) & \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   189
\       ((EX x y. Q(x,y)) --> (ALL x. R(x,x)))  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   190
\   --> (ALL x. EX y. R(x,y))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   191
by (pc_tac LK_pack 1);  (*slow*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   192
by flexflex_tac;
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   193
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   194
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   195
writeln"Problem 38. NOT PROVED";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   196
goal LK.thy
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   197
 "|- (ALL x. p(a) & (p(x) --> (EX y. p(y) & r(x,y))) -->	\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   198
\            (EX z. EX w. p(z) & r(x,w) & r(w,z)))  <->		\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   199
\    (ALL x. (~p(a) | p(x) | (EX z. EX w. p(z) & r(x,w) & r(w,z))) &	\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   200
\            (~p(a) | ~(EX y. p(y) & r(x,y)) |				\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   201
\             (EX z. EX w. p(z) & r(x,w) & r(w,z))))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   202
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   203
writeln"Problem 39";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   204
goal LK.thy "|- ~ (EX x. ALL y. F(y,x) <-> ~F(y,y))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   205
by (fast_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   206
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   207
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   208
writeln"Problem 40.  AMENDED";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   209
goal LK.thy "|- (EX y. ALL x. F(x,y) <-> F(x,x)) -->  \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   210
\                    ~(ALL x. EX y. ALL z. F(z,y) <-> ~ F(z,x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   211
by (fast_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   212
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   213
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   214
writeln"Problem 41";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   215
goal LK.thy "|- (ALL z. EX y. ALL x. f(x,y) <-> f(x,z) & ~ f(x,x))	\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   216
\         --> ~ (EX z. ALL x. f(x,z))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   217
by (fast_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   218
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   219
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   220
writeln"Problem 42";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   221
goal LK.thy "|- ~ (EX y. ALL x. p(x,y) <-> ~ (EX z. p(x,z) & p(z,x)))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   222
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   223
writeln"Problem 43  NOT PROVED AUTOMATICALLY";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   224
goal LK.thy "|- (ALL x. ALL y. q(x,y) <-> (ALL z. p(z,x) <-> p(z,y))) \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   225
\         --> (ALL x. (ALL y. q(x,y) <-> q(y,x)))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   226
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   227
writeln"Problem 44";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   228
goal LK.thy "|- (ALL x. f(x) -->					\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   229
\             (EX y. g(y) & h(x,y) & (EX y. g(y) & ~ h(x,y))))  &   	\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   230
\             (EX x. j(x) & (ALL y. g(y) --> h(x,y)))			\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   231
\             --> (EX x. j(x) & ~f(x))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   232
by (fast_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   233
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   234
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   235
writeln"Problem 45";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   236
goal LK.thy "|- (ALL x. f(x) & (ALL y. g(y) & h(x,y) --> j(x,y))	\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   237
\                     --> (ALL y. g(y) & h(x,y) --> k(y))) &	\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   238
\     ~ (EX y. l(y) & k(y)) &					\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   239
\     (EX x. f(x) & (ALL y. h(x,y) --> l(y))			\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   240
\                  & (ALL y. g(y) & h(x,y) --> j(x,y)))		\
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   241
\     --> (EX x. f(x) & ~ (EX y. g(y) & h(x,y)))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   242
by (best_tac LK_pack 1); 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   243
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   244
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   245
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   246
writeln"Problem 50";  
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   247
goal LK.thy
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   248
    "|- (ALL x. P(a,x) | (ALL y.P(x,y))) --> (EX x. ALL y.P(x,y))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   249
by (best_tac LK_dup_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   250
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   251
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   252
writeln"Problem 57";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   253
goal LK.thy
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   254
    "|- P(f(a,b), f(b,c)) & P(f(b,c), f(a,c)) & \
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   255
\    (ALL x y z. P(x,y) & P(y,z) --> P(x,z))    -->   P(f(a,b), f(a,c))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   256
by (fast_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   257
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   258
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   259
writeln"Problem 59";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   260
(*Unification works poorly here -- the abstraction %sobj prevents efficient
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   261
  operation of the occurs check*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   262
Unify.trace_bound := !Unify.search_bound - 1; 
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   263
goal LK.thy "|- (ALL x. P(x) <-> ~P(f(x))) --> (EX x. P(x) & ~P(f(x)))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   264
by (best_tac LK_dup_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   265
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   266
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   267
writeln"Problem 60";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   268
goal LK.thy
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   269
    "|- ALL x. P(x,f(x)) <-> (EX y. (ALL z. P(z,y) --> P(z,f(x))) & P(x,y))";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   270
by (fast_tac LK_pack 1);
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   271
result();
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   272
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   273
writeln"Reached end of file.";
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   274
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   275
(*18 June 92: loaded in 372 secs*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   276
(*19 June 92: loaded in 166 secs except #34, using repeat_goal_tac*)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
   277
(*29 June 92: loaded in 370 secs*)