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