src/FOL/ex/Intuitionistic.thy
author wenzelm
Thu, 03 Jan 2019 22:30:41 +0100
changeset 69591 cc6a21413f8a
parent 69590 e65314985426
child 69593 3dda49e08b9d
permissions -rw-r--r--
tuned spelling;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31974
e81979a703a4 removed obsolete CVS Ids;
wenzelm
parents: 16417
diff changeset
     1
(*  Title:      FOL/ex/Intuitionistic.thy
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
     2
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
     3
    Copyright   1991  University of Cambridge
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
     4
*)
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
     5
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
     6
section \<open>Intuitionistic First-Order Logic\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
     7
31974
e81979a703a4 removed obsolete CVS Ids;
wenzelm
parents: 16417
diff changeset
     8
theory Intuitionistic
e81979a703a4 removed obsolete CVS Ids;
wenzelm
parents: 16417
diff changeset
     9
imports IFOL
e81979a703a4 removed obsolete CVS Ids;
wenzelm
parents: 16417
diff changeset
    10
begin
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    11
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    12
(*
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    13
Single-step ML commands:
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    14
by (IntPr.step_tac 1)
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    15
by (biresolve_tac safe_brls 1);
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    16
by (biresolve_tac haz_brls 1);
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    17
by (assume_tac 1);
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    18
by (IntPr.safe_tac 1);
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    19
by (IntPr.mp_tac 1);
51798
ad3a241def73 uniform Proof.context for hyp_subst_tac;
wenzelm
parents: 31974
diff changeset
    20
by (IntPr.fast_tac @{context} 1);
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    21
*)
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    22
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    23
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    24
text\<open>Metatheorem (for \emph{propositional} formulae):
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    25
  $P$ is classically provable iff $\neg\neg P$ is intuitionistically provable.
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    26
  Therefore $\neg P$ is classically provable iff it is intuitionistically
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    27
  provable.
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    28
69591
cc6a21413f8a tuned spelling;
wenzelm
parents: 69590
diff changeset
    29
Proof: Let $Q$ be the conjunction of the propositions $A\vee\neg A$, one for
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    30
each atom $A$ in $P$.  Now $\neg\neg Q$ is intuitionistically provable because
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    31
$\neg\neg(A\vee\neg A)$ is and because double-negation distributes over
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    32
conjunction.  If $P$ is provable classically, then clearly $Q\rightarrow P$ is
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    33
provable intuitionistically, so $\neg\neg(Q\rightarrow P)$ is also provable
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    34
intuitionistically.  The latter is intuitionistically equivalent to $\neg\neg
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    35
Q\rightarrow\neg\neg P$, hence to $\neg\neg P$, since $\neg\neg Q$ is
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    36
intuitionistically provable.  Finally, if $P$ is a negation then $\neg\neg P$
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
    37
is intuitionstically equivalent to $P$.  [Andy Pitts]\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    38
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    39
lemma \<open>\<not> \<not> (P \<and> Q) \<longleftrightarrow> \<not> \<not> P \<and> \<not> \<not> Q\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    40
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    41
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    42
lemma \<open>\<not> \<not> ((\<not> P \<longrightarrow> Q) \<longrightarrow> (\<not> P \<longrightarrow> \<not> Q) \<longrightarrow> P)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    43
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    44
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    45
text \<open>Double-negation does NOT distribute over disjunction.\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    46
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    47
lemma \<open>\<not> \<not> (P \<longrightarrow> Q) \<longleftrightarrow> (\<not> \<not> P \<longrightarrow> \<not> \<not> Q)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    48
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    49
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    50
lemma \<open>\<not> \<not> \<not> P \<longleftrightarrow> \<not> P\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    51
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    52
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    53
lemma \<open>\<not> \<not> ((P \<longrightarrow> Q \<or> R) \<longrightarrow> (P \<longrightarrow> Q) \<or> (P \<longrightarrow> R))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    54
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    55
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    56
lemma \<open>(P \<longleftrightarrow> Q) \<longleftrightarrow> (Q \<longleftrightarrow> P)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    57
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    58
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    59
lemma \<open>((P \<longrightarrow> (Q \<or> (Q \<longrightarrow> R))) \<longrightarrow> R) \<longrightarrow> R\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    60
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    61
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    62
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    63
  \<open>(((G \<longrightarrow> A) \<longrightarrow> J) \<longrightarrow> D \<longrightarrow> E) \<longrightarrow> (((H \<longrightarrow> B) \<longrightarrow> I) \<longrightarrow> C \<longrightarrow> J)
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    64
    \<longrightarrow> (A \<longrightarrow> H) \<longrightarrow> F \<longrightarrow> G \<longrightarrow> (((C \<longrightarrow> B) \<longrightarrow> I) \<longrightarrow> D) \<longrightarrow> (A \<longrightarrow> C)
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    65
    \<longrightarrow> (((F \<longrightarrow> A) \<longrightarrow> B) \<longrightarrow> I) \<longrightarrow> E\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    66
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    67
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    68
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    69
subsection \<open>Lemmas for the propositional double-negation translation\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    70
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    71
lemma \<open>P \<longrightarrow> \<not> \<not> P\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    72
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    73
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    74
lemma \<open>\<not> \<not> (\<not> \<not> P \<longrightarrow> P)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    75
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    76
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    77
lemma \<open>\<not> \<not> P \<and> \<not> \<not> (P \<longrightarrow> Q) \<longrightarrow> \<not> \<not> Q\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    78
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    79
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    80
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    81
text \<open>The following are classically but not constructively valid.
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    82
  The attempt to prove them terminates quickly!\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    83
lemma \<open>((P \<longrightarrow> Q) \<longrightarrow> P) \<longrightarrow> P\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    84
apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
67443
3abf6a722518 standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents: 62020
diff changeset
    85
apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    86
oops
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    87
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    88
lemma \<open>(P \<and> Q \<longrightarrow> R) \<longrightarrow> (P \<longrightarrow> R) \<or> (Q \<longrightarrow> R)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    89
apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
67443
3abf6a722518 standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents: 62020
diff changeset
    90
apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    91
oops
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    92
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    93
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    94
subsection \<open>de Bruijn formulae\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
    95
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    96
text \<open>de Bruijn formula with three predicates\<close>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    97
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
    98
  \<open>((P \<longleftrightarrow> Q) \<longrightarrow> P \<and> Q \<and> R) \<and>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
    99
    ((Q \<longleftrightarrow> R) \<longrightarrow> P \<and> Q \<and> R) \<and>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   100
    ((R \<longleftrightarrow> P) \<longrightarrow> P \<and> Q \<and> R) \<longrightarrow> P \<and> Q \<and> R\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   101
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   102
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   103
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   104
text \<open>de Bruijn formula with five predicates\<close>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   105
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   106
  \<open>((P \<longleftrightarrow> Q) \<longrightarrow> P \<and> Q \<and> R \<and> S \<and> T) \<and>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   107
    ((Q \<longleftrightarrow> R) \<longrightarrow> P \<and> Q \<and> R \<and> S \<and> T) \<and>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   108
    ((R \<longleftrightarrow> S) \<longrightarrow> P \<and> Q \<and> R \<and> S \<and> T) \<and>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   109
    ((S \<longleftrightarrow> T) \<longrightarrow> P \<and> Q \<and> R \<and> S \<and> T) \<and>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   110
    ((T \<longleftrightarrow> P) \<longrightarrow> P \<and> Q \<and> R \<and> S \<and> T) \<longrightarrow> P \<and> Q \<and> R \<and> S \<and> T\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   111
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   112
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   113
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   114
text \<open>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   115
  Problems from of Sahlin, Franzen and Haridi,
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   116
  An Intuitionistic Predicate Logic Theorem Prover.
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   117
  J. Logic and Comp. 2 (5), October 1992, 619-656.
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   118
\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   119
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   120
text\<open>Problem 1.1\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   121
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   122
  \<open>(\<forall>x. \<exists>y. \<forall>z. p(x) \<and> q(y) \<and> r(z)) \<longleftrightarrow>
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   123
    (\<forall>z. \<exists>y. \<forall>x. p(x) \<and> q(y) \<and> r(z))\<close>
67443
3abf6a722518 standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents: 62020
diff changeset
   124
  by (tactic \<open>IntPr.best_dup_tac @{context} 1\<close>)  \<comment> \<open>SLOW\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   125
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   126
text\<open>Problem 3.1\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   127
lemma \<open>\<not> (\<exists>x. \<forall>y. mem(y,x) \<longleftrightarrow> \<not> mem(x,x))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   128
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   129
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   130
text\<open>Problem 4.1: hopeless!\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   131
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   132
  \<open>(\<forall>x. p(x) \<longrightarrow> p(h(x)) \<or> p(g(x))) \<and> (\<exists>x. p(x)) \<and> (\<forall>x. \<not> p(h(x)))
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   133
    \<longrightarrow> (\<exists>x. p(g(g(g(g(g(x)))))))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   134
  oops
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   135
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   136
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   137
subsection \<open>Intuitionistic FOL: propositional problems based on Pelletier.\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   138
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   139
text\<open>\<open>\<not>\<not>\<close>1\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   140
lemma \<open>\<not> \<not> ((P \<longrightarrow> Q) \<longleftrightarrow> (\<not> Q \<longrightarrow> \<not> P))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   141
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   142
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   143
text\<open>\<open>\<not>\<not>\<close>2\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   144
lemma \<open>\<not> \<not> (\<not> \<not> P \<longleftrightarrow> P)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   145
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   146
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   147
text\<open>3\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   148
lemma \<open>\<not> (P \<longrightarrow> Q) \<longrightarrow> (Q \<longrightarrow> P)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   149
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   150
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   151
text\<open>\<open>\<not>\<not>\<close>4\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   152
lemma \<open>\<not> \<not> ((\<not> P \<longrightarrow> Q) \<longleftrightarrow> (\<not> Q \<longrightarrow> P))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   153
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   154
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   155
text\<open>\<open>\<not>\<not>\<close>5\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   156
lemma \<open>\<not> \<not> ((P \<or> Q \<longrightarrow> P \<or> R) \<longrightarrow> P \<or> (Q \<longrightarrow> R))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   157
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   158
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   159
text\<open>\<open>\<not>\<not>\<close>6\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   160
lemma \<open>\<not> \<not> (P \<or> \<not> P)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   161
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   162
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   163
text\<open>\<open>\<not>\<not>\<close>7\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   164
lemma \<open>\<not> \<not> (P \<or> \<not> \<not> \<not> P)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   165
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   166
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   167
text\<open>\<open>\<not>\<not>\<close>8. Peirce's law\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   168
lemma \<open>\<not> \<not> (((P \<longrightarrow> Q) \<longrightarrow> P) \<longrightarrow> P)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   169
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   170
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   171
text\<open>9\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   172
lemma \<open>((P \<or> Q) \<and> (\<not> P \<or> Q) \<and> (P \<or> \<not> Q)) \<longrightarrow> \<not> (\<not> P \<or> \<not> Q)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   173
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   174
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   175
text\<open>10\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   176
lemma \<open>(Q \<longrightarrow> R) \<longrightarrow> (R \<longrightarrow> P \<and> Q) \<longrightarrow> (P \<longrightarrow> (Q \<or> R)) \<longrightarrow> (P \<longleftrightarrow> Q)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   177
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   178
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   179
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   180
subsection\<open>11. Proved in each direction (incorrectly, says Pelletier!!)\<close>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   181
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   182
lemma \<open>P \<longleftrightarrow> P\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   183
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   184
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   185
text\<open>\<open>\<not>\<not>\<close>12. Dijkstra's law\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   186
lemma \<open>\<not> \<not> (((P \<longleftrightarrow> Q) \<longleftrightarrow> R) \<longleftrightarrow> (P \<longleftrightarrow> (Q \<longleftrightarrow> R)))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   187
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   188
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   189
lemma \<open>((P \<longleftrightarrow> Q) \<longleftrightarrow> R) \<longrightarrow> \<not> \<not> (P \<longleftrightarrow> (Q \<longleftrightarrow> R))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   190
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   191
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   192
text\<open>13. Distributive law\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   193
lemma \<open>P \<or> (Q \<and> R) \<longleftrightarrow> (P \<or> Q) \<and> (P \<or> R)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   194
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   195
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   196
text\<open>\<open>\<not>\<not>\<close>14\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   197
lemma \<open>\<not> \<not> ((P \<longleftrightarrow> Q) \<longleftrightarrow> ((Q \<or> \<not> P) \<and> (\<not> Q \<or> P)))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   198
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   199
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   200
text\<open>\<open>\<not>\<not>\<close>15\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   201
lemma \<open>\<not> \<not> ((P \<longrightarrow> Q) \<longleftrightarrow> (\<not> P \<or> Q))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   202
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   203
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   204
text\<open>\<open>\<not>\<not>\<close>16\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   205
lemma \<open>\<not> \<not> ((P \<longrightarrow> Q) \<or> (Q \<longrightarrow> P))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   206
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   207
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   208
text\<open>\<open>\<not>\<not>\<close>17\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   209
lemma \<open>\<not> \<not> (((P \<and> (Q \<longrightarrow> R)) \<longrightarrow> S) \<longleftrightarrow> ((\<not> P \<or> Q \<or> S) \<and> (\<not> P \<or> \<not> R \<or> S)))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   210
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   211
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   212
text \<open>Dijkstra's ``Golden Rule''\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   213
lemma \<open>(P \<and> Q) \<longleftrightarrow> P \<longleftrightarrow> Q \<longleftrightarrow> (P \<or> Q)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   214
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   215
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   216
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   217
section \<open>Examples with quantifiers\<close>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   218
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   219
subsection \<open>The converse is classical in the following implications \dots\<close>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   220
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   221
lemma \<open>(\<exists>x. P(x) \<longrightarrow> Q) \<longrightarrow> (\<forall>x. P(x)) \<longrightarrow> Q\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   222
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   223
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   224
lemma \<open>((\<forall>x. P(x)) \<longrightarrow> Q) \<longrightarrow> \<not> (\<forall>x. P(x) \<and> \<not> Q)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   225
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   226
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   227
lemma \<open>((\<forall>x. \<not> P(x)) \<longrightarrow> Q) \<longrightarrow> \<not> (\<forall>x. \<not> (P(x) \<or> Q))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   228
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   229
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   230
lemma \<open>(\<forall>x. P(x)) \<or> Q \<longrightarrow> (\<forall>x. P(x) \<or> Q)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   231
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   232
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   233
lemma \<open>(\<exists>x. P \<longrightarrow> Q(x)) \<longrightarrow> (P \<longrightarrow> (\<exists>x. Q(x)))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   234
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   235
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   236
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   237
subsection \<open>The following are not constructively valid!\<close>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   238
text \<open>The attempt to prove them terminates quickly!\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   239
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   240
lemma \<open>((\<forall>x. P(x)) \<longrightarrow> Q) \<longrightarrow> (\<exists>x. P(x) \<longrightarrow> Q)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   241
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
67443
3abf6a722518 standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents: 62020
diff changeset
   242
  apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   243
  oops
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   244
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   245
lemma \<open>(P \<longrightarrow> (\<exists>x. Q(x))) \<longrightarrow> (\<exists>x. P \<longrightarrow> Q(x))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   246
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
67443
3abf6a722518 standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents: 62020
diff changeset
   247
  apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   248
  oops
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   249
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   250
lemma \<open>(\<forall>x. P(x) \<or> Q) \<longrightarrow> ((\<forall>x. P(x)) \<or> Q)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   251
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
67443
3abf6a722518 standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents: 62020
diff changeset
   252
  apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   253
  oops
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   254
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   255
lemma \<open>(\<forall>x. \<not> \<not> P(x)) \<longrightarrow> \<not> \<not> (\<forall>x. P(x))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   256
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
67443
3abf6a722518 standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents: 62020
diff changeset
   257
  apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   258
  oops
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   259
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   260
text \<open>Classically but not intuitionistically valid.  Proved by a bug in 1986!\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   261
lemma \<open>\<exists>x. Q(x) \<longrightarrow> (\<forall>x. Q(x))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   262
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)?
67443
3abf6a722518 standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents: 62020
diff changeset
   263
  apply (rule asm_rl) \<comment> \<open>Checks that subgoals remain: proof failed.\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   264
  oops
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   265
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   266
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   267
subsection \<open>Hard examples with quantifiers\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   268
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   269
text \<open>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   270
  The ones that have not been proved are not known to be valid! Some will
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   271
  require quantifier duplication -- not currently available.
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   272
\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   273
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   274
text\<open>\<open>\<not>\<not>\<close>18\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   275
lemma \<open>\<not> \<not> (\<exists>y. \<forall>x. P(y) \<longrightarrow> P(x))\<close>
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   276
  oops  \<comment> \<open>NOT PROVED\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   277
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   278
text\<open>\<open>\<not>\<not>\<close>19\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   279
lemma \<open>\<not> \<not> (\<exists>x. \<forall>y z. (P(y) \<longrightarrow> Q(z)) \<longrightarrow> (P(x) \<longrightarrow> Q(x)))\<close>
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   280
  oops  \<comment> \<open>NOT PROVED\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   281
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   282
text\<open>20\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   283
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   284
  \<open>(\<forall>x y. \<exists>z. \<forall>w. (P(x) \<and> Q(y) \<longrightarrow> R(z) \<and> S(w)))
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   285
    \<longrightarrow> (\<exists>x y. P(x) \<and> Q(y)) \<longrightarrow> (\<exists>z. R(z))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   286
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   287
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   288
text\<open>21\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   289
lemma \<open>(\<exists>x. P \<longrightarrow> Q(x)) \<and> (\<exists>x. Q(x) \<longrightarrow> P) \<longrightarrow> \<not> \<not> (\<exists>x. P \<longleftrightarrow> Q(x))\<close>
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   290
  oops \<comment> \<open>NOT PROVED; needs quantifier duplication\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   291
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   292
text\<open>22\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   293
lemma \<open>(\<forall>x. P \<longleftrightarrow> Q(x)) \<longrightarrow> (P \<longleftrightarrow> (\<forall>x. Q(x)))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   294
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   295
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   296
text\<open>\<open>\<not>\<not>\<close>23\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   297
lemma \<open>\<not> \<not> ((\<forall>x. P \<or> Q(x)) \<longleftrightarrow> (P \<or> (\<forall>x. Q(x))))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   298
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   299
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   300
text\<open>24\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   301
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   302
  \<open>\<not> (\<exists>x. S(x) \<and> Q(x)) \<and> (\<forall>x. P(x) \<longrightarrow> Q(x) \<or> R(x)) \<and>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   303
    (\<not> (\<exists>x. P(x)) \<longrightarrow> (\<exists>x. Q(x))) \<and> (\<forall>x. Q(x) \<or> R(x) \<longrightarrow> S(x))
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   304
    \<longrightarrow> \<not> \<not> (\<exists>x. P(x) \<and> R(x))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   305
text \<open>
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   306
  Not clear why \<open>fast_tac\<close>, \<open>best_tac\<close>, \<open>ASTAR\<close> and
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   307
  \<open>ITER_DEEPEN\<close> all take forever.
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   308
\<close>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   309
  apply (tactic \<open>IntPr.safe_tac @{context}\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   310
  apply (erule impE)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   311
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   312
  apply (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   313
  done
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   314
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   315
text\<open>25\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   316
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   317
  \<open>(\<exists>x. P(x)) \<and>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   318
      (\<forall>x. L(x) \<longrightarrow> \<not> (M(x) \<and> R(x))) \<and>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   319
      (\<forall>x. P(x) \<longrightarrow> (M(x) \<and> L(x))) \<and>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   320
      ((\<forall>x. P(x) \<longrightarrow> Q(x)) \<or> (\<exists>x. P(x) \<and> R(x)))
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   321
    \<longrightarrow> (\<exists>x. Q(x) \<and> P(x))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   322
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   323
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   324
text\<open>\<open>\<not>\<not>\<close>26\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   325
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   326
  \<open>(\<not> \<not> (\<exists>x. p(x)) \<longleftrightarrow> \<not> \<not> (\<exists>x. q(x))) \<and>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   327
    (\<forall>x. \<forall>y. p(x) \<and> q(y) \<longrightarrow> (r(x) \<longleftrightarrow> s(y)))
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   328
  \<longrightarrow> ((\<forall>x. p(x) \<longrightarrow> r(x)) \<longleftrightarrow> (\<forall>x. q(x) \<longrightarrow> s(x)))\<close>
67443
3abf6a722518 standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents: 62020
diff changeset
   329
  oops  \<comment> \<open>NOT PROVED\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   330
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   331
text\<open>27\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   332
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   333
  \<open>(\<exists>x. P(x) \<and> \<not> Q(x)) \<and>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   334
    (\<forall>x. P(x) \<longrightarrow> R(x)) \<and>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   335
    (\<forall>x. M(x) \<and> L(x) \<longrightarrow> P(x)) \<and>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   336
    ((\<exists>x. R(x) \<and> \<not> Q(x)) \<longrightarrow> (\<forall>x. L(x) \<longrightarrow> \<not> R(x)))
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   337
  \<longrightarrow> (\<forall>x. M(x) \<longrightarrow> \<not> L(x))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   338
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   339
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   340
text\<open>\<open>\<not>\<not>\<close>28. AMENDED\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   341
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   342
  \<open>(\<forall>x. P(x) \<longrightarrow> (\<forall>x. Q(x))) \<and>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   343
      (\<not> \<not> (\<forall>x. Q(x) \<or> R(x)) \<longrightarrow> (\<exists>x. Q(x) \<and> S(x))) \<and>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   344
      (\<not> \<not> (\<exists>x. S(x)) \<longrightarrow> (\<forall>x. L(x) \<longrightarrow> M(x)))
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   345
    \<longrightarrow> (\<forall>x. P(x) \<and> L(x) \<longrightarrow> M(x))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   346
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   347
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   348
text\<open>29. Essentially the same as Principia Mathematica *11.71\<close>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   349
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   350
  \<open>(\<exists>x. P(x)) \<and> (\<exists>y. Q(y))
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   351
    \<longrightarrow> ((\<forall>x. P(x) \<longrightarrow> R(x)) \<and> (\<forall>y. Q(y) \<longrightarrow> S(y)) \<longleftrightarrow>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   352
      (\<forall>x y. P(x) \<and> Q(y) \<longrightarrow> R(x) \<and> S(y)))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   353
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   354
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   355
text\<open>\<open>\<not>\<not>\<close>30\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   356
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   357
  \<open>(\<forall>x. (P(x) \<or> Q(x)) \<longrightarrow> \<not> R(x)) \<and>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   358
      (\<forall>x. (Q(x) \<longrightarrow> \<not> S(x)) \<longrightarrow> P(x) \<and> R(x))
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   359
    \<longrightarrow> (\<forall>x. \<not> \<not> S(x))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   360
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   361
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   362
text\<open>31\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   363
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   364
  \<open>\<not> (\<exists>x. P(x) \<and> (Q(x) \<or> R(x))) \<and>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   365
      (\<exists>x. L(x) \<and> P(x)) \<and>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   366
      (\<forall>x. \<not> R(x) \<longrightarrow> M(x))
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   367
  \<longrightarrow> (\<exists>x. L(x) \<and> M(x))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   368
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   369
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   370
text\<open>32\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   371
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   372
  \<open>(\<forall>x. P(x) \<and> (Q(x) \<or> R(x)) \<longrightarrow> S(x)) \<and>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   373
    (\<forall>x. S(x) \<and> R(x) \<longrightarrow> L(x)) \<and>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   374
    (\<forall>x. M(x) \<longrightarrow> R(x))
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   375
  \<longrightarrow> (\<forall>x. P(x) \<and> M(x) \<longrightarrow> L(x))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   376
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   377
62020
5d208fd2507d isabelle update_cartouches -c -t;
wenzelm
parents: 61490
diff changeset
   378
text\<open>\<open>\<not>\<not>\<close>33\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   379
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   380
  \<open>(\<forall>x. \<not> \<not> (P(a) \<and> (P(x) \<longrightarrow> P(b)) \<longrightarrow> P(c))) \<longleftrightarrow>
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   381
    (\<forall>x. \<not> \<not> ((\<not> P(a) \<or> P(x) \<or> P(c)) \<and> (\<not> P(a) \<or> \<not> P(b) \<or> P(c))))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   382
  apply (tactic \<open>IntPr.best_tac @{context} 1\<close>)
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   383
  done
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   384
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   385
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   386
text\<open>36\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   387
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   388
  \<open>(\<forall>x. \<exists>y. J(x,y)) \<and>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   389
    (\<forall>x. \<exists>y. G(x,y)) \<and>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   390
    (\<forall>x y. J(x,y) \<or> G(x,y) \<longrightarrow> (\<forall>z. J(y,z) \<or> G(y,z) \<longrightarrow> H(x,z)))
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   391
  \<longrightarrow> (\<forall>x. \<exists>y. H(x,y))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   392
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   393
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   394
text\<open>37\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   395
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   396
  \<open>(\<forall>z. \<exists>w. \<forall>x. \<exists>y.
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   397
      \<not> \<not> (P(x,z) \<longrightarrow> P(y,w)) \<and> P(y,z) \<and> (P(y,w) \<longrightarrow> (\<exists>u. Q(u,w)))) \<and>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   398
        (\<forall>x z. \<not> P(x,z) \<longrightarrow> (\<exists>y. Q(y,z))) \<and>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   399
        (\<not> \<not> (\<exists>x y. Q(x,y)) \<longrightarrow> (\<forall>x. R(x,x)))
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   400
    \<longrightarrow> \<not> \<not> (\<forall>x. \<exists>y. R(x,y))\<close>
67443
3abf6a722518 standardized towards new-style formal comments: isabelle update_comments;
wenzelm
parents: 62020
diff changeset
   401
  oops  \<comment> \<open>NOT PROVED\<close>
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   402
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   403
text\<open>39\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   404
lemma \<open>\<not> (\<exists>x. \<forall>y. F(y,x) \<longleftrightarrow> \<not> F(y,y))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   405
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   406
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   407
text\<open>40. AMENDED\<close>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   408
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   409
  \<open>(\<exists>y. \<forall>x. F(x,y) \<longleftrightarrow> F(x,x)) \<longrightarrow>
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   410
    \<not> (\<forall>x. \<exists>y. \<forall>z. F(z,y) \<longleftrightarrow> \<not> F(z,x))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   411
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   412
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   413
text\<open>44\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   414
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   415
  \<open>(\<forall>x. f(x) \<longrightarrow>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   416
    (\<exists>y. g(y) \<and> h(x,y) \<and> (\<exists>y. g(y) \<and> \<not> h(x,y)))) \<and>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   417
    (\<exists>x. j(x) \<and> (\<forall>y. g(y) \<longrightarrow> h(x,y)))
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   418
    \<longrightarrow> (\<exists>x. j(x) \<and> \<not> f(x))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   419
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   420
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   421
text\<open>48\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   422
lemma \<open>(a = b \<or> c = d) \<and> (a = c \<or> b = d) \<longrightarrow> a = d \<or> b = c\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   423
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   424
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   425
text\<open>51\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   426
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   427
  \<open>(\<exists>z w. \<forall>x y. P(x,y) \<longleftrightarrow> (x = z \<and> y = w)) \<longrightarrow>
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   428
    (\<exists>z. \<forall>x. \<exists>w. (\<forall>y. P(x,y) \<longleftrightarrow> y = w) \<longleftrightarrow> x = z)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   429
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   430
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   431
text\<open>52\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   432
text \<open>Almost the same as 51.\<close>
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   433
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   434
  \<open>(\<exists>z w. \<forall>x y. P(x,y) \<longleftrightarrow> (x = z \<and> y = w)) \<longrightarrow>
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   435
    (\<exists>w. \<forall>y. \<exists>z. (\<forall>x. P(x,y) \<longleftrightarrow> x = z) \<longleftrightarrow> y = w)\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   436
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   437
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   438
text\<open>56\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   439
lemma \<open>(\<forall>x. (\<exists>y. P(y) \<and> x = f(y)) \<longrightarrow> P(x)) \<longleftrightarrow> (\<forall>x. P(x) \<longrightarrow> P(f(x)))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   440
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   441
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   442
text\<open>57\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   443
lemma
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   444
  \<open>P(f(a,b), f(b,c)) \<and> P(f(b,c), f(a,c)) \<and>
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   445
    (\<forall>x y z. P(x,y) \<and> P(y,z) \<longrightarrow> P(x,z)) \<longrightarrow> P(f(a,b), f(a,c))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   446
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   447
60770
240563fbf41d isabelle update_cartouches;
wenzelm
parents: 58889
diff changeset
   448
text\<open>60\<close>
69590
e65314985426 isabelle update_inner_syntax_cartouches;
wenzelm
parents: 67443
diff changeset
   449
lemma \<open>\<forall>x. P(x,f(x)) \<longleftrightarrow> (\<exists>y. (\<forall>z. P(z,y) \<longrightarrow> P(z,f(x))) \<and> P(x,y))\<close>
61489
b8d375aee0df more symbols;
wenzelm
parents: 60770
diff changeset
   450
  by (tactic \<open>IntPr.fast_tac @{context} 1\<close>)
14239
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   451
af2a9e68bea9 partial conversion to Isar scripts
paulson
parents:
diff changeset
   452
end