src/HOL/Isar_Examples/Higher_Order_Logic.thy
author wenzelm
Mon, 16 Jan 2017 21:33:09 +0100
changeset 64908 f94ad67a0f6e
parent 64907 354bfbb27fbb
child 69593 3dda49e08b9d
permissions -rw-r--r--
clarified classical rules;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
61935
6512e84cc9f5 clarified sessions;
wenzelm
parents: 61759
diff changeset
     1
(*  Title:      HOL/Isar_Examples/Higher_Order_Logic.thy
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
     2
    Author:     Makarius
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
     3
*)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
     4
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
     5
section \<open>Foundations of HOL\<close>
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
     6
60769
cf7f3465eaf1 tuned proofs;
wenzelm
parents: 59031
diff changeset
     7
theory Higher_Order_Logic
63585
wenzelm
parents: 63532
diff changeset
     8
  imports Pure
60769
cf7f3465eaf1 tuned proofs;
wenzelm
parents: 59031
diff changeset
     9
begin
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    10
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    11
text \<open>
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    12
  The following theory development illustrates the foundations of Higher-Order
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    13
  Logic. The ``HOL'' logic that is given here resembles @{cite
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    14
  "Gordon:1985:HOL"} and its predecessor @{cite "church40"}, but the order of
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    15
  axiomatizations and defined connectives has be adapted to modern
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    16
  presentations of \<open>\<lambda>\<close>-calculus and Constructive Type Theory. Thus it fits
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    17
  nicely to the underlying Natural Deduction framework of Isabelle/Pure and
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    18
  Isabelle/Isar.
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    19
\<close>
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    20
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    21
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    22
section \<open>HOL syntax within Pure\<close>
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    23
55380
4de48353034e prefer vacuous definitional type classes over axiomatic ones;
wenzelm
parents: 41460
diff changeset
    24
class type
36452
d37c6eed8117 renamed command 'defaultsort' to 'default_sort';
wenzelm
parents: 26957
diff changeset
    25
default_sort type
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    26
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    27
typedecl o
55380
4de48353034e prefer vacuous definitional type classes over axiomatic ones;
wenzelm
parents: 41460
diff changeset
    28
instance o :: type ..
4de48353034e prefer vacuous definitional type classes over axiomatic ones;
wenzelm
parents: 41460
diff changeset
    29
instance "fun" :: (type, type) type ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    30
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    31
judgment Trueprop :: "o \<Rightarrow> prop"  ("_" 5)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    32
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    33
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    34
section \<open>Minimal logic (axiomatization)\<close>
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    35
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    36
axiomatization imp :: "o \<Rightarrow> o \<Rightarrow> o"  (infixr "\<longrightarrow>" 25)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    37
  where impI [intro]: "(A \<Longrightarrow> B) \<Longrightarrow> A \<longrightarrow> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    38
    and impE [dest, trans]: "A \<longrightarrow> B \<Longrightarrow> A \<Longrightarrow> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    39
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    40
axiomatization All :: "('a \<Rightarrow> o) \<Rightarrow> o"  (binder "\<forall>" 10)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    41
  where allI [intro]: "(\<And>x. P x) \<Longrightarrow> \<forall>x. P x"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    42
    and allE [dest]: "\<forall>x. P x \<Longrightarrow> P a"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    43
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    44
lemma atomize_imp [atomize]: "(A \<Longrightarrow> B) \<equiv> Trueprop (A \<longrightarrow> B)"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    45
  by standard (fact impI, fact impE)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    46
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    47
lemma atomize_all [atomize]: "(\<And>x. P x) \<equiv> Trueprop (\<forall>x. P x)"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    48
  by standard (fact allI, fact allE)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    49
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    50
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    51
subsubsection \<open>Derived connectives\<close>
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    52
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    53
definition False :: o
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    54
  where "False \<equiv> \<forall>A. A"
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20523
diff changeset
    55
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    56
lemma FalseE [elim]:
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    57
  assumes "False"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    58
  shows A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    59
proof -
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    60
  from \<open>False\<close> have "\<forall>A. A" by (simp only: False_def)
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    61
  then show A ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    62
qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    63
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    64
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    65
definition True :: o
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    66
  where "True \<equiv> False \<longrightarrow> False"
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20523
diff changeset
    67
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    68
lemma TrueI [intro]: True
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    69
  unfolding True_def ..
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    70
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    71
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    72
definition not :: "o \<Rightarrow> o"  ("\<not> _" [40] 40)
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    73
  where "not \<equiv> \<lambda>A. A \<longrightarrow> False"
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20523
diff changeset
    74
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    75
lemma notI [intro]:
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    76
  assumes "A \<Longrightarrow> False"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    77
  shows "\<not> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    78
  using assms unfolding not_def ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    79
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    80
lemma notE [elim]:
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    81
  assumes "\<not> A" and A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    82
  shows B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    83
proof -
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    84
  from \<open>\<not> A\<close> have "A \<longrightarrow> False" by (simp only: not_def)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    85
  from this and \<open>A\<close> have "False" ..
23373
ead82c82da9e tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
    86
  then show B ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    87
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    88
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    89
lemma notE': "A \<Longrightarrow> \<not> A \<Longrightarrow> B"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    90
  by (rule notE)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    91
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    92
lemmas contradiction = notE notE'  \<comment> \<open>proof by contradiction in any order\<close>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    93
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    94
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    95
definition conj :: "o \<Rightarrow> o \<Rightarrow> o"  (infixr "\<and>" 35)
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    96
  where "A \<and> B \<equiv> \<forall>C. (A \<longrightarrow> B \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    97
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
    98
lemma conjI [intro]:
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    99
  assumes A and B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   100
  shows "A \<and> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   101
  unfolding conj_def
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   102
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   103
  fix C
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   104
  show "(A \<longrightarrow> B \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   105
  proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   106
    assume "A \<longrightarrow> B \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   107
    also note \<open>A\<close>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   108
    also note \<open>B\<close>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   109
    finally show C .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   110
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   111
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   112
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   113
lemma conjE [elim]:
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   114
  assumes "A \<and> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   115
  obtains A and B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   116
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   117
  from \<open>A \<and> B\<close> have *: "(A \<longrightarrow> B \<longrightarrow> C) \<longrightarrow> C" for C
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   118
    unfolding conj_def ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   119
  show A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   120
  proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   121
    note * [of A]
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   122
    also have "A \<longrightarrow> B \<longrightarrow> A"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   123
    proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   124
      assume A
23373
ead82c82da9e tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
   125
      then show "B \<longrightarrow> A" ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   126
    qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   127
    finally show ?thesis .
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   128
  qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   129
  show B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   130
  proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   131
    note * [of B]
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   132
    also have "A \<longrightarrow> B \<longrightarrow> B"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   133
    proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   134
      show "B \<longrightarrow> B" ..
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   135
    qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   136
    finally show ?thesis .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   137
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   138
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   139
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   140
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   141
definition disj :: "o \<Rightarrow> o \<Rightarrow> o"  (infixr "\<or>" 30)
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   142
  where "A \<or> B \<equiv> \<forall>C. (A \<longrightarrow> C) \<longrightarrow> (B \<longrightarrow> C) \<longrightarrow> C"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   143
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   144
lemma disjI1 [intro]:
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   145
  assumes A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   146
  shows "A \<or> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   147
  unfolding disj_def
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   148
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   149
  fix C
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   150
  show "(A \<longrightarrow> C) \<longrightarrow> (B \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   151
  proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   152
    assume "A \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   153
    from this and \<open>A\<close> have C ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   154
    then show "(B \<longrightarrow> C) \<longrightarrow> C" ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   155
  qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   156
qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   157
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   158
lemma disjI2 [intro]:
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   159
  assumes B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   160
  shows "A \<or> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   161
  unfolding disj_def
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   162
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   163
  fix C
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   164
  show "(A \<longrightarrow> C) \<longrightarrow> (B \<longrightarrow> C) \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   165
  proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   166
    show "(B \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   167
    proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   168
      assume "B \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   169
      from this and \<open>B\<close> show C ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   170
    qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   171
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   172
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   173
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   174
lemma disjE [elim]:
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   175
  assumes "A \<or> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   176
  obtains (a) A | (b) B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   177
proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   178
  from \<open>A \<or> B\<close> have "(A \<longrightarrow> thesis) \<longrightarrow> (B \<longrightarrow> thesis) \<longrightarrow> thesis"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   179
    unfolding disj_def ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   180
  also have "A \<longrightarrow> thesis"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   181
  proof
60769
cf7f3465eaf1 tuned proofs;
wenzelm
parents: 59031
diff changeset
   182
    assume A
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   183
    then show thesis by (rule a)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   184
  qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   185
  also have "B \<longrightarrow> thesis"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   186
  proof
60769
cf7f3465eaf1 tuned proofs;
wenzelm
parents: 59031
diff changeset
   187
    assume B
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   188
    then show thesis by (rule b)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   189
  qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   190
  finally show thesis .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   191
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   192
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   193
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   194
definition Ex :: "('a \<Rightarrow> o) \<Rightarrow> o"  (binder "\<exists>" 10)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   195
  where "\<exists>x. P x \<equiv> \<forall>C. (\<forall>x. P x \<longrightarrow> C) \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   196
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   197
lemma exI [intro]: "P a \<Longrightarrow> \<exists>x. P x"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   198
  unfolding Ex_def
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   199
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   200
  fix C
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   201
  assume "P a"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   202
  show "(\<forall>x. P x \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   203
  proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   204
    assume "\<forall>x. P x \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   205
    then have "P a \<longrightarrow> C" ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   206
    from this and \<open>P a\<close> show C ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   207
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   208
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   209
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   210
lemma exE [elim]:
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   211
  assumes "\<exists>x. P x"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   212
  obtains (that) x where "P x"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   213
proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   214
  from \<open>\<exists>x. P x\<close> have "(\<forall>x. P x \<longrightarrow> thesis) \<longrightarrow> thesis"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   215
    unfolding Ex_def ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   216
  also have "\<forall>x. P x \<longrightarrow> thesis"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   217
  proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   218
    fix x
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   219
    show "P x \<longrightarrow> thesis"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   220
    proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   221
      assume "P x"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   222
      then show thesis by (rule that)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   223
    qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   224
  qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   225
  finally show thesis .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   226
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   227
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   228
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   229
subsubsection \<open>Extensional equality\<close>
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   230
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   231
axiomatization equal :: "'a \<Rightarrow> 'a \<Rightarrow> o"  (infixl "=" 50)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   232
  where refl [intro]: "x = x"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   233
    and subst: "x = y \<Longrightarrow> P x \<Longrightarrow> P y"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   234
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   235
abbreviation not_equal :: "'a \<Rightarrow> 'a \<Rightarrow> o"  (infixl "\<noteq>" 50)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   236
  where "x \<noteq> y \<equiv> \<not> (x = y)"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   237
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   238
abbreviation iff :: "o \<Rightarrow> o \<Rightarrow> o"  (infixr "\<longleftrightarrow>" 25)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   239
  where "A \<longleftrightarrow> B \<equiv> A = B"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   240
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   241
axiomatization
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   242
  where ext [intro]: "(\<And>x. f x = g x) \<Longrightarrow> f = g"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   243
    and iff [intro]: "(A \<Longrightarrow> B) \<Longrightarrow> (B \<Longrightarrow> A) \<Longrightarrow> A \<longleftrightarrow> B"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   244
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   245
lemma sym [sym]: "y = x" if "x = y"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   246
  using that by (rule subst) (rule refl)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   247
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   248
lemma [trans]: "x = y \<Longrightarrow> P y \<Longrightarrow> P x"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   249
  by (rule subst) (rule sym)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   250
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   251
lemma [trans]: "P x \<Longrightarrow> x = y \<Longrightarrow> P y"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   252
  by (rule subst)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   253
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   254
lemma arg_cong: "f x = f y" if "x = y"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   255
  using that by (rule subst) (rule refl)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   256
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   257
lemma fun_cong: "f x = g x" if "f = g"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   258
  using that by (rule subst) (rule refl)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   259
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   260
lemma trans [trans]: "x = y \<Longrightarrow> y = z \<Longrightarrow> x = z"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   261
  by (rule subst)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   262
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   263
lemma iff1 [elim]: "A \<longleftrightarrow> B \<Longrightarrow> A \<Longrightarrow> B"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   264
  by (rule subst)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   265
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   266
lemma iff2 [elim]: "A \<longleftrightarrow> B \<Longrightarrow> B \<Longrightarrow> A"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   267
  by (rule subst) (rule sym)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   268
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   269
61936
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   270
subsection \<open>Cantor's Theorem\<close>
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   271
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   272
text \<open>
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   273
  Cantor's Theorem states that there is no surjection from a set to its
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   274
  powerset. The subsequent formulation uses elementary \<open>\<lambda>\<close>-calculus and
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   275
  predicate logic, with standard introduction and elimination rules.
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   276
\<close>
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   277
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   278
lemma iff_contradiction:
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   279
  assumes *: "\<not> A \<longleftrightarrow> A"
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   280
  shows C
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   281
proof (rule notE)
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   282
  show "\<not> A"
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   283
  proof
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   284
    assume A
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   285
    with * have "\<not> A" ..
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   286
    from this and \<open>A\<close> show False ..
61936
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   287
  qed
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   288
  with * show A ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   289
qed
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   290
62038
wenzelm
parents: 61936
diff changeset
   291
theorem Cantor: "\<not> (\<exists>f :: 'a \<Rightarrow> 'a \<Rightarrow> o. \<forall>A. \<exists>x. A = f x)"
61936
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   292
proof
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   293
  assume "\<exists>f :: 'a \<Rightarrow> 'a \<Rightarrow> o. \<forall>A. \<exists>x. A = f x"
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   294
  then obtain f :: "'a \<Rightarrow> 'a \<Rightarrow> o" where *: "\<forall>A. \<exists>x. A = f x" ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   295
  let ?D = "\<lambda>x. \<not> f x x"
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   296
  from * have "\<exists>x. ?D = f x" ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   297
  then obtain a where "?D = f a" ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   298
  then have "?D a \<longleftrightarrow> f a a" using refl by (rule subst)
62266
f4baefee5776 tuned proofs;
wenzelm
parents: 62038
diff changeset
   299
  then have "\<not> f a a \<longleftrightarrow> f a a" .
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   300
  then show False by (rule iff_contradiction)
61936
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   301
qed
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   302
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   303
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   304
subsection \<open>Characterization of Classical Logic\<close>
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   305
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   306
text \<open>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   307
  The subsequent rules of classical reasoning are all equivalent.
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   308
\<close>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   309
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   310
locale classical =
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   311
  assumes classical: "(\<not> A \<Longrightarrow> A) \<Longrightarrow> A"
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   312
  \<comment> \<open>predicate definition and hypothetical context\<close>
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   313
begin
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   314
64908
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   315
lemma classical_contradiction:
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   316
  assumes "\<not> A \<Longrightarrow> False"
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   317
  shows A
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   318
proof (rule classical)
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   319
  assume "\<not> A"
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   320
  then have False by (rule assms)
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   321
  then show A ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   322
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   323
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   324
lemma double_negation:
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   325
  assumes "\<not> \<not> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   326
  shows A
64908
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   327
proof (rule classical_contradiction)
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   328
  assume "\<not> A"
64908
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   329
  with \<open>\<not> \<not> A\<close> show False by (rule contradiction)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   330
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   331
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   332
lemma tertium_non_datur: "A \<or> \<not> A"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   333
proof (rule double_negation)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   334
  show "\<not> \<not> (A \<or> \<not> A)"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   335
  proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   336
    assume "\<not> (A \<or> \<not> A)"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   337
    have "\<not> A"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   338
    proof
23373
ead82c82da9e tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
   339
      assume A then have "A \<or> \<not> A" ..
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   340
      with \<open>\<not> (A \<or> \<not> A)\<close> show False by (rule contradiction)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   341
    qed
23373
ead82c82da9e tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
   342
    then have "A \<or> \<not> A" ..
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   343
    with \<open>\<not> (A \<or> \<not> A)\<close> show False by (rule contradiction)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   344
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   345
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   346
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   347
lemma classical_cases:
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   348
  obtains A | "\<not> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   349
  using tertium_non_datur
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   350
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   351
  assume A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   352
  then show thesis ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   353
next
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   354
  assume "\<not> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   355
  then show thesis ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   356
qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   357
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   358
end
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   359
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   360
lemma classical_if_cases: classical
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   361
  if cases: "\<And>A C. (A \<Longrightarrow> C) \<Longrightarrow> (\<not> A \<Longrightarrow> C) \<Longrightarrow> C"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   362
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   363
  fix A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   364
  assume *: "\<not> A \<Longrightarrow> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   365
  show A
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   366
  proof (rule cases)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   367
    assume A
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   368
    then show A .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   369
  next
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   370
    assume "\<not> A"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   371
    then show A by (rule *)
12573
6226b35c04ca added lemma;
wenzelm
parents: 12394
diff changeset
   372
  qed
6226b35c04ca added lemma;
wenzelm
parents: 12394
diff changeset
   373
qed
6226b35c04ca added lemma;
wenzelm
parents: 12394
diff changeset
   374
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   375
64908
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   376
section \<open>Peirce's Law\<close>
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   377
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   378
text \<open>
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   379
  Peirce's Law is another characterization of classical reasoning. Its
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   380
  statement only requires implication.
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   381
\<close>
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   382
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   383
theorem (in classical) Peirce's_Law: "((A \<longrightarrow> B) \<longrightarrow> A) \<longrightarrow> A"
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   384
proof
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   385
  assume *: "(A \<longrightarrow> B) \<longrightarrow> A"
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   386
  show A
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   387
  proof (rule classical)
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   388
    assume "\<not> A"
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   389
    have "A \<longrightarrow> B"
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   390
    proof
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   391
      assume A
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   392
      with \<open>\<not> A\<close> show B by (rule contradiction)
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   393
    qed
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   394
    with * show A ..
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   395
  qed
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   396
qed
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   397
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   398
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   399
section \<open>Hilbert's choice operator (axiomatization)\<close>
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   400
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   401
axiomatization Eps :: "('a \<Rightarrow> o) \<Rightarrow> 'a"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   402
  where someI: "P x \<Longrightarrow> P (Eps P)"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   403
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   404
syntax "_Eps" :: "pttrn \<Rightarrow> o \<Rightarrow> 'a"  ("(3SOME _./ _)" [0, 10] 10)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   405
translations "SOME x. P" \<rightleftharpoons> "CONST Eps (\<lambda>x. P)"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   406
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   407
text \<open>
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   408
  \<^medskip>
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   409
  It follows a derivation of the classical law of tertium-non-datur by
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   410
  means of Hilbert's choice operator (due to Berghofer, Beeson, Harrison,
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   411
  based on a proof by Diaconescu).
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   412
  \<^medskip>
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   413
\<close>
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   414
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   415
theorem Diaconescu: "A \<or> \<not> A"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   416
proof -
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   417
  let ?P = "\<lambda>x. (A \<and> x) \<or> \<not> x"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   418
  let ?Q = "\<lambda>x. (A \<and> \<not> x) \<or> x"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   419
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   420
  have a: "?P (Eps ?P)"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   421
  proof (rule someI)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   422
    have "\<not> False" ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   423
    then show "?P False" ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   424
  qed
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   425
  have b: "?Q (Eps ?Q)"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   426
  proof (rule someI)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   427
    have True ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   428
    then show "?Q True" ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   429
  qed
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   430
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   431
  from a show ?thesis
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   432
  proof
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   433
    assume "A \<and> Eps ?P"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   434
    then have A ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   435
    then show ?thesis ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   436
  next
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   437
    assume "\<not> Eps ?P"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   438
    from b show ?thesis
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   439
    proof
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   440
      assume "A \<and> \<not> Eps ?Q"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   441
      then have A ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   442
      then show ?thesis ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   443
    next
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   444
      assume "Eps ?Q"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   445
      have neq: "?P \<noteq> ?Q"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   446
      proof
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   447
        assume "?P = ?Q"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   448
        then have "Eps ?P \<longleftrightarrow> Eps ?Q" by (rule arg_cong)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   449
        also note \<open>Eps ?Q\<close>
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   450
        finally have "Eps ?P" .
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   451
        with \<open>\<not> Eps ?P\<close> show False by (rule contradiction)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   452
      qed
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   453
      have "\<not> A"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   454
      proof
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   455
        assume A
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   456
        have "?P = ?Q"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   457
        proof (rule ext)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   458
          show "?P x \<longleftrightarrow> ?Q x" for x
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   459
          proof
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   460
            assume "?P x"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   461
            then show "?Q x"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   462
            proof
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   463
              assume "\<not> x"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   464
              with \<open>A\<close> have "A \<and> \<not> x" ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   465
              then show ?thesis ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   466
            next
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   467
              assume "A \<and> x"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   468
              then have x ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   469
              then show ?thesis ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   470
            qed
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   471
          next
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   472
            assume "?Q x"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   473
            then show "?P x"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   474
            proof
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   475
              assume "A \<and> \<not> x"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   476
              then have "\<not> x" ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   477
              then show ?thesis ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   478
            next
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   479
              assume x
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   480
              with \<open>A\<close> have "A \<and> x" ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   481
              then show ?thesis ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   482
            qed
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   483
          qed
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   484
        qed
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   485
        with neq show False by (rule contradiction)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   486
      qed
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   487
      then show ?thesis ..
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   488
    qed
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   489
  qed
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   490
qed
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   491
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   492
text \<open>
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   493
  This means, the hypothetical predicate @{const classical} always holds
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   494
  unconditionally (with all consequences).
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   495
\<close>
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   496
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   497
interpretation classical
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   498
proof (rule classical_if_cases)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   499
  fix A C
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   500
  assume *: "A \<Longrightarrow> C"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   501
    and **: "\<not> A \<Longrightarrow> C"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   502
  from Diaconescu [of A] show C
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   503
  proof
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   504
    assume A
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   505
    then show C by (rule *)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   506
  next
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   507
    assume "\<not> A"
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   508
    then show C by (rule **)
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   509
  qed
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   510
qed
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   511
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   512
thm classical
64908
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   513
  classical_contradiction
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   514
  double_negation
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   515
  tertium_non_datur
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   516
  classical_cases
64908
f94ad67a0f6e clarified classical rules;
wenzelm
parents: 64907
diff changeset
   517
  Peirce's_Law
64907
354bfbb27fbb misc tuning and updates according to Curry-Club Dec-2016;
wenzelm
parents: 64475
diff changeset
   518
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   519
end