src/HOL/ex/unsolved.ML
author paulson
Thu, 22 May 1997 15:11:23 +0200
changeset 3300 4f5ffefa7799
parent 2031 03a843f0f447
permissions -rw-r--r--
New example of recdef and permutative rewriting
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1465
5d7a7e439cec expanded tabs
clasohm
parents: 969
diff changeset
     1
(*  Title:      HOL/ex/unsolved
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     2
    ID:         $Id$
1465
5d7a7e439cec expanded tabs
clasohm
parents: 969
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     4
    Copyright   1992  University of Cambridge
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     5
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     6
Problems that currently defeat the MESON procedure as well as best_tac
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     7
*)
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
     8
1586
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
     9
(*from Vladimir Lifschitz, What Is the Inverse Method?, JAR 5  1989.  1--23*)
2031
03a843f0f447 Ran expandshort
paulson
parents: 1586
diff changeset
    10
        (*27 clauses; 81 Horn clauses*)
1586
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    11
goal HOL.thy "? x x'. ! y. ? z z'. (~P y y | P x x | ~S z x) & \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    12
\                                  (S x y | ~S y z | Q z' z')  & \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    13
\                                  (Q x' y | ~Q y z' | S x' x')";
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    14
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    15
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    16
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    17
writeln"Problem 55";
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    18
1586
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    19
(*Original, equational version by Len Schubert [via Pelletier] *)
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    20
goal HOL.thy
1586
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    21
  "(? x. lives x & killed x agatha) & \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    22
\  lives agatha & lives butler & lives charles & \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    23
\  (! x. lives x --> x=agatha | x=butler | x=charles) & \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    24
\  (! x y. killed x y --> hates x y) & \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    25
\  (! x y. killed x y --> ~richer x y) & \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    26
\  (! x. hates agatha x --> ~hates charles x) & \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    27
\  (! x. ~ x=butler --> hates agatha x) & \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    28
\  (! x. ~richer x agatha --> hates butler x) & \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    29
\  (! x. hates agatha x --> hates butler x) & \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    30
\  (! x. ? y. ~hates x y) & \
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    31
\  ~ agatha=butler --> \
1586
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    32
\  killed agatha agatha";
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    33
1586
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    34
(*Halting problem: Formulation of Li Dafa (AAR Newsletter 27, Oct 1994.)
2031
03a843f0f447 Ran expandshort
paulson
parents: 1586
diff changeset
    35
        author U. Egly;  46 clauses; 264 Horn clauses*)
1586
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    36
goal HOL.thy
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    37
 "((EX X. (a X) & (ALL Y. (c Y) --> (ALL Z. (d X Y Z)))) -->  \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    38
\  (EX W. (c W) & (ALL Y. (c Y) --> (ALL Z. (d W Y Z)))))     \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    39
\ &                                                          \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    40
\ (ALL W. (c W) & (ALL U. (c U) --> (ALL V. (d W U V))) -->       \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    41
\       (ALL Y Z.                                               \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    42
\           ((c Y) & (h2 Y Z) --> (h3 W Y Z) & (oo W g)) &       \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    43
\           ((c Y) & ~(h2 Y Z) --> (h3 W Y Z) & (oo W b))))  \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    44
\ &                    \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    45
\ (ALL W. (c W) &       \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    46
\   (ALL Y Z.          \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    47
\       ((c Y) & (h2 Y Z) --> (h3 W Y Z) & (oo W g)) &       \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    48
\       ((c Y) & ~(h2 Y Z) --> (h3 W Y Z) & (oo W b))) -->       \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    49
\   (EX V. (c V) &       \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    50
\         (ALL Y. (((c Y) & (h3 W Y Y)) & (oo W g) --> ~(h2 V Y)) &       \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    51
\                 (((c Y) & (h3 W Y Y)) & (oo W b) --> (h2 V Y) & (oo V b))))) \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    52
\  -->                  \
d91296e4deb3 New safe_meson_tac proves some harder theorems
paulson
parents: 1465
diff changeset
    53
\  ~ (EX X. (a X) & (ALL Y. (c Y) --> (ALL Z. (d X Y Z))))";
969
b051e2fc2e34 converted ex with curried function application
clasohm
parents:
diff changeset
    54