src/FOLP/ex/Intuitionistic.thy
author wenzelm
Fri, 01 Jan 2016 10:49:00 +0100
changeset 62020 5d208fd2507d
parent 61337 4645502c3c64
child 67443 3abf6a722518
permissions -rw-r--r--
isabelle update_cartouches -c -t;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
     1
(*  Title:      FOLP/ex/Intuitionistic.thy
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
     2
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
     3
    Copyright   1991  University of Cambridge
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
     4
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
     5
Intuitionistic First-Order Logic.
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
     6
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
     7
Single-step commands:
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
     8
by (IntPr.step_tac 1)
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
     9
by (biresolve_tac safe_brls 1);
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    10
by (biresolve_tac haz_brls 1);
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    11
by (assume_tac 1);
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    12
by (IntPr.safe_tac 1);
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    13
by (IntPr.mp_tac 1);
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    14
by (IntPr.fast_tac 1);
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    15
*)
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    16
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    17
(*Note: for PROPOSITIONAL formulae...
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    18
  ~A is classically provable iff it is intuitionistically provable.  
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    19
  Therefore A is classically provable iff ~~A is intuitionistically provable.
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    20
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    21
Let Q be the conjuction of the propositions A|~A, one for each atom A in
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    22
P.  If P is provable classically, then clearly P&Q is provable
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    23
intuitionistically, so ~~(P&Q) is also provable intuitionistically.
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    24
The latter is intuitionistically equivalent to ~~P&~~Q, hence to ~~P,
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    25
since ~~Q is intuitionistically provable.  Finally, if P is a negation then
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    26
~~P is intuitionstically equivalent to P.  [Andy Pitts]
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    27
*)
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    28
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    29
theory Intuitionistic
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    30
imports IFOLP
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    31
begin
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    32
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    33
schematic_goal "?p : ~~(P&Q) <-> ~~P & ~~Q"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    34
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    35
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    36
schematic_goal "?p : ~~~P <-> ~P"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    37
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    38
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    39
schematic_goal "?p : ~~((P --> Q | R)  -->  (P-->Q) | (P-->R))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    40
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    41
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    42
schematic_goal "?p : (P<->Q) <-> (Q<->P)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    43
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    44
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    45
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    46
subsection \<open>Lemmas for the propositional double-negation translation\<close>
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    47
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    48
schematic_goal "?p : P --> ~~P"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    49
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    50
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    51
schematic_goal "?p : ~~(~~P --> P)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    52
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    53
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    54
schematic_goal "?p : ~~P & ~~(P --> Q) --> ~~Q"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    55
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    56
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    57
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    58
subsection \<open>The following are classically but not constructively valid\<close>
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    59
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    60
(*The attempt to prove them terminates quickly!*)
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    61
schematic_goal "?p : ((P-->Q) --> P)  -->  P"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    62
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    63
  oops
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    64
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    65
schematic_goal "?p : (P&Q-->R)  -->  (P-->R) | (Q-->R)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    66
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    67
  oops
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    68
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    69
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    70
subsection \<open>Intuitionistic FOL: propositional problems based on Pelletier\<close>
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    71
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    72
text "Problem ~~1"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    73
schematic_goal "?p : ~~((P-->Q)  <->  (~Q --> ~P))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    74
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    75
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    76
text "Problem ~~2"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    77
schematic_goal "?p : ~~(~~P  <->  P)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    78
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    79
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    80
text "Problem 3"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    81
schematic_goal "?p : ~(P-->Q) --> (Q-->P)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    82
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    83
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    84
text "Problem ~~4"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    85
schematic_goal "?p : ~~((~P-->Q)  <->  (~Q --> P))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    86
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    87
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    88
text "Problem ~~5"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    89
schematic_goal "?p : ~~((P|Q-->P|R) --> P|(Q-->R))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    90
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    91
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    92
text "Problem ~~6"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    93
schematic_goal "?p : ~~(P | ~P)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    94
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    95
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    96
text "Problem ~~7"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
    97
schematic_goal "?p : ~~(P | ~~~P)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
    98
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
    99
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   100
text "Problem ~~8.  Peirce's law"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   101
schematic_goal "?p : ~~(((P-->Q) --> P)  -->  P)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   102
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   103
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   104
text "Problem 9"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   105
schematic_goal "?p : ((P|Q) & (~P|Q) & (P| ~Q)) --> ~ (~P | ~Q)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   106
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   107
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   108
text "Problem 10"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   109
schematic_goal "?p : (Q-->R) --> (R-->P&Q) --> (P-->(Q|R)) --> (P<->Q)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   110
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   111
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   112
text "11.  Proved in each direction (incorrectly, says Pelletier!!) "
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   113
schematic_goal "?p : P<->P"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   114
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   115
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   116
text "Problem ~~12.  Dijkstra's law  "
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   117
schematic_goal "?p : ~~(((P <-> Q) <-> R)  <->  (P <-> (Q <-> R)))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   118
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   119
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   120
schematic_goal "?p : ((P <-> Q) <-> R)  -->  ~~(P <-> (Q <-> R))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   121
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   122
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   123
text "Problem 13.  Distributive law"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   124
schematic_goal "?p : P | (Q & R)  <-> (P | Q) & (P | R)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   125
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   126
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   127
text "Problem ~~14"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   128
schematic_goal "?p : ~~((P <-> Q) <-> ((Q | ~P) & (~Q|P)))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   129
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   130
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   131
text "Problem ~~15"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   132
schematic_goal "?p : ~~((P --> Q) <-> (~P | Q))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   133
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   134
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   135
text "Problem ~~16"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   136
schematic_goal "?p : ~~((P-->Q) | (Q-->P))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   137
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   138
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   139
text "Problem ~~17"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   140
schematic_goal "?p : ~~(((P & (Q-->R))-->S) <-> ((~P | Q | S) & (~P | ~R | S)))"
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61337
diff changeset
   141
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)  \<comment> slow
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   142
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   143
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   144
subsection \<open>Examples with quantifiers\<close>
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   145
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   146
text "The converse is classical in the following implications..."
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   147
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   148
schematic_goal "?p : (EX x. P(x)-->Q)  -->  (ALL x. P(x)) --> Q"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   149
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   150
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   151
schematic_goal "?p : ((ALL x. P(x))-->Q) --> ~ (ALL x. P(x) & ~Q)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   152
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   153
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   154
schematic_goal "?p : ((ALL x. ~P(x))-->Q)  -->  ~ (ALL x. ~ (P(x)|Q))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   155
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   156
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   157
schematic_goal "?p : (ALL x. P(x)) | Q  -->  (ALL x. P(x) | Q)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   158
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   159
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   160
schematic_goal "?p : (EX x. P --> Q(x)) --> (P --> (EX x. Q(x)))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   161
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   162
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   163
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   164
text "The following are not constructively valid!"
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   165
text "The attempt to prove them terminates quickly!"
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   166
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   167
schematic_goal "?p : ((ALL x. P(x))-->Q) --> (EX x. P(x)-->Q)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   168
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   169
  oops
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   170
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   171
schematic_goal "?p : (P --> (EX x. Q(x))) --> (EX x. P-->Q(x))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   172
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   173
  oops
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   174
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   175
schematic_goal "?p : (ALL x. P(x) | Q) --> ((ALL x. P(x)) | Q)"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   176
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   177
  oops
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   178
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   179
schematic_goal "?p : (ALL x. ~~P(x)) --> ~~(ALL x. P(x))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   180
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   181
  oops
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   182
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   183
(*Classically but not intuitionistically valid.  Proved by a bug in 1986!*)
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   184
schematic_goal "?p : EX x. Q(x) --> (ALL x. Q(x))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   185
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   186
  oops
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   187
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   188
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   189
subsection "Hard examples with quantifiers"
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   190
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   191
text \<open>
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   192
  The ones that have not been proved are not known to be valid!
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   193
  Some will require quantifier duplication -- not currently available.
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   194
\<close>
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   195
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   196
text "Problem ~~18"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   197
schematic_goal "?p : ~~(EX y. ALL x. P(y)-->P(x))" oops
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   198
(*NOT PROVED*)
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   199
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   200
text "Problem ~~19"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   201
schematic_goal "?p : ~~(EX x. ALL y z. (P(y)-->Q(z)) --> (P(x)-->Q(x)))" oops
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   202
(*NOT PROVED*)
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   203
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   204
text "Problem 20"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   205
schematic_goal "?p : (ALL x y. EX z. ALL w. (P(x)&Q(y)-->R(z)&S(w)))      
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   206
    --> (EX x y. P(x) & Q(y)) --> (EX z. R(z))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   207
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   208
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   209
text "Problem 21"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   210
schematic_goal "?p : (EX x. P-->Q(x)) & (EX x. Q(x)-->P) --> ~~(EX x. P<->Q(x))" oops
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   211
(*NOT PROVED*)
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   212
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   213
text "Problem 22"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   214
schematic_goal "?p : (ALL x. P <-> Q(x))  -->  (P <-> (ALL x. Q(x)))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   215
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   216
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   217
text "Problem ~~23"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   218
schematic_goal "?p : ~~ ((ALL x. P | Q(x))  <->  (P | (ALL x. Q(x))))"
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58963
diff changeset
   219
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   220
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   221
text "Problem 24"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   222
schematic_goal "?p : ~(EX x. S(x)&Q(x)) & (ALL x. P(x) --> Q(x)|R(x)) &   
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   223
     (~(EX x. P(x)) --> (EX x. Q(x))) & (ALL x. Q(x)|R(x) --> S(x))   
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   224
    --> ~~(EX x. P(x)&R(x))"
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   225
(*Not clear why fast_tac, best_tac, ASTAR and ITER_DEEPEN all take forever*)
58963
26bf09b95dda proper context for assume_tac (atac remains as fall-back without context);
wenzelm
parents: 36319
diff changeset
   226
  apply (tactic "IntPr.safe_tac @{context}")
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   227
  apply (erule impE)
58963
26bf09b95dda proper context for assume_tac (atac remains as fall-back without context);
wenzelm
parents: 36319
diff changeset
   228
   apply (tactic "IntPr.fast_tac @{context} 1")
26bf09b95dda proper context for assume_tac (atac remains as fall-back without context);
wenzelm
parents: 36319
diff changeset
   229
  apply (tactic "IntPr.fast_tac @{context} 1")
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   230
  done
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   231
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   232
text "Problem 25"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   233
schematic_goal "?p : (EX x. P(x)) &   
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   234
        (ALL x. L(x) --> ~ (M(x) & R(x))) &   
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   235
        (ALL x. P(x) --> (M(x) & L(x))) &    
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   236
        ((ALL x. P(x)-->Q(x)) | (EX x. P(x)&R(x)))   
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   237
    --> (EX x. Q(x)&P(x))"
58963
26bf09b95dda proper context for assume_tac (atac remains as fall-back without context);
wenzelm
parents: 36319
diff changeset
   238
  by (tactic "IntPr.best_tac @{context} 1")
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   239
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   240
text "Problem 29.  Essentially the same as Principia Mathematica *11.71"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   241
schematic_goal "?p : (EX x. P(x)) & (EX y. Q(y))   
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   242
    --> ((ALL x. P(x)-->R(x)) & (ALL y. Q(y)-->S(y))   <->      
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   243
         (ALL x y. P(x) & Q(y) --> R(x) & S(y)))"
58963
26bf09b95dda proper context for assume_tac (atac remains as fall-back without context);
wenzelm
parents: 36319
diff changeset
   244
  by (tactic "IntPr.fast_tac @{context} 1")
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   245
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   246
text "Problem ~~30"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   247
schematic_goal "?p : (ALL x. (P(x) | Q(x)) --> ~ R(x)) &  
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   248
        (ALL x. (Q(x) --> ~ S(x)) --> P(x) & R(x))   
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   249
    --> (ALL x. ~~S(x))"
58963
26bf09b95dda proper context for assume_tac (atac remains as fall-back without context);
wenzelm
parents: 36319
diff changeset
   250
  by (tactic "IntPr.fast_tac @{context} 1")
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   251
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   252
text "Problem 31"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   253
schematic_goal "?p : ~(EX x. P(x) & (Q(x) | R(x))) &  
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   254
        (EX x. L(x) & P(x)) &  
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   255
        (ALL x. ~ R(x) --> M(x))   
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   256
    --> (EX x. L(x) & M(x))"
58963
26bf09b95dda proper context for assume_tac (atac remains as fall-back without context);
wenzelm
parents: 36319
diff changeset
   257
  by (tactic "IntPr.fast_tac @{context} 1")
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   258
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   259
text "Problem 32"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   260
schematic_goal "?p : (ALL x. P(x) & (Q(x)|R(x))-->S(x)) &  
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   261
        (ALL x. S(x) & R(x) --> L(x)) &  
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   262
        (ALL x. M(x) --> R(x))   
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   263
    --> (ALL x. P(x) & M(x) --> L(x))"
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61337
diff changeset
   264
  by (tactic "IntPr.best_tac @{context} 1") \<comment> slow
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   265
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   266
text "Problem 39"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   267
schematic_goal "?p : ~ (EX x. ALL y. F(y,x) <-> ~F(y,y))"
58963
26bf09b95dda proper context for assume_tac (atac remains as fall-back without context);
wenzelm
parents: 36319
diff changeset
   268
  by (tactic "IntPr.best_tac @{context} 1")
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   269
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   270
text "Problem 40.  AMENDED"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   271
schematic_goal "?p : (EX y. ALL x. F(x,y) <-> F(x,x)) -->   
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   272
              ~(ALL x. EX y. ALL z. F(z,y) <-> ~ F(z,x))"
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61337
diff changeset
   273
  by (tactic "IntPr.best_tac @{context} 1") \<comment> slow
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   274
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   275
text "Problem 44"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   276
schematic_goal "?p : (ALL x. f(x) -->                                    
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   277
              (EX y. g(y) & h(x,y) & (EX y. g(y) & ~ h(x,y))))  &        
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   278
              (EX x. j(x) & (ALL y. g(y) --> h(x,y)))                    
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   279
              --> (EX x. j(x) & ~f(x))"
58963
26bf09b95dda proper context for assume_tac (atac remains as fall-back without context);
wenzelm
parents: 36319
diff changeset
   280
  by (tactic "IntPr.best_tac @{context} 1")
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   281
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   282
text "Problem 48"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   283
schematic_goal "?p : (a=b | c=d) & (a=c | b=d) --> a=d | b=c"
58963
26bf09b95dda proper context for assume_tac (atac remains as fall-back without context);
wenzelm
parents: 36319
diff changeset
   284
  by (tactic "IntPr.best_tac @{context} 1")
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   285
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   286
text "Problem 51"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   287
schematic_goal
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   288
    "?p : (EX z w. ALL x y. P(x,y) <->  (x=z & y=w)) -->   
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   289
     (EX z. ALL x. EX w. (ALL y. P(x,y) <-> y=w) <-> x=z)"
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61337
diff changeset
   290
  by (tactic "IntPr.best_tac @{context} 1") \<comment> \<open>60 seconds\<close>
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   291
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   292
text "Problem 56"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   293
schematic_goal "?p : (ALL x. (EX y. P(y) & x=f(y)) --> P(x)) <-> (ALL x. P(x) --> P(f(x)))"
58963
26bf09b95dda proper context for assume_tac (atac remains as fall-back without context);
wenzelm
parents: 36319
diff changeset
   294
  by (tactic "IntPr.best_tac @{context} 1")
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   295
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   296
text "Problem 57"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   297
schematic_goal
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   298
    "?p : P(f(a,b), f(b,c)) & P(f(b,c), f(a,c)) &  
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   299
     (ALL x y z. P(x,y) & P(y,z) --> P(x,z))    -->   P(f(a,b), f(a,c))"
58963
26bf09b95dda proper context for assume_tac (atac remains as fall-back without context);
wenzelm
parents: 36319
diff changeset
   300
  by (tactic "IntPr.best_tac @{context} 1")
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   301
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   302
text "Problem 60"
61337
4645502c3c64 fewer aliases for toplevel theorem statements;
wenzelm
parents: 60770
diff changeset
   303
schematic_goal "?p : ALL x. P(x,f(x)) <-> (EX y. (ALL z. P(z,y) --> P(z,f(x))) & P(x,y))"
58963
26bf09b95dda proper context for assume_tac (atac remains as fall-back without context);
wenzelm
parents: 36319
diff changeset
   304
  by (tactic "IntPr.best_tac @{context} 1")
26322
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   305
eaf634e975fa converted legacy ML scripts;
wenzelm
parents:
diff changeset
   306
end