src/HOL/Isar_Examples/Higher_Order_Logic.thy
author wenzelm
Tue, 02 Aug 2016 18:46:24 +0200
changeset 63585 f4a308fdf664
parent 63532 b01154b74314
child 64475 d751bef76e5c
permissions -rw-r--r--
tuned;
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>
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    12
  The following theory development demonstrates Higher-Order Logic itself,
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    13
  represented directly within the Pure framework of Isabelle. The ``HOL''
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    14
  logic given here is essentially that of Gordon @{cite "Gordon:1985:HOL"},
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    15
  although we prefer to present basic concepts in a slightly more conventional
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    16
  manner oriented towards plain Natural Deduction.
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    17
\<close>
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    18
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    19
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    20
subsection \<open>Pure Logic\<close>
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    21
55380
4de48353034e prefer vacuous definitional type classes over axiomatic ones;
wenzelm
parents: 41460
diff changeset
    22
class type
36452
d37c6eed8117 renamed command 'defaultsort' to 'default_sort';
wenzelm
parents: 26957
diff changeset
    23
default_sort type
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    24
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    25
typedecl o
55380
4de48353034e prefer vacuous definitional type classes over axiomatic ones;
wenzelm
parents: 41460
diff changeset
    26
instance o :: type ..
4de48353034e prefer vacuous definitional type classes over axiomatic ones;
wenzelm
parents: 41460
diff changeset
    27
instance "fun" :: (type, type) type ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    28
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    29
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    30
subsubsection \<open>Basic logical connectives\<close>
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    31
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    32
judgment Trueprop :: "o \<Rightarrow> prop"  ("_" 5)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    33
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    34
axiomatization imp :: "o \<Rightarrow> o \<Rightarrow> o"  (infixr "\<longrightarrow>" 25)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    35
  where impI [intro]: "(A \<Longrightarrow> B) \<Longrightarrow> A \<longrightarrow> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    36
    and impE [dest, trans]: "A \<longrightarrow> B \<Longrightarrow> A \<Longrightarrow> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    37
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    38
axiomatization All :: "('a \<Rightarrow> o) \<Rightarrow> o"  (binder "\<forall>" 10)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    39
  where allI [intro]: "(\<And>x. P x) \<Longrightarrow> \<forall>x. P x"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    40
    and allE [dest]: "\<forall>x. P x \<Longrightarrow> P a"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    41
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    42
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    43
subsubsection \<open>Extensional equality\<close>
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    44
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    45
axiomatization equal :: "'a \<Rightarrow> 'a \<Rightarrow> o"  (infixl "=" 50)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    46
  where refl [intro]: "x = x"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    47
    and subst: "x = y \<Longrightarrow> P x \<Longrightarrow> P y"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    48
61936
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
    49
abbreviation iff :: "o \<Rightarrow> o \<Rightarrow> o"  (infixr "\<longleftrightarrow>" 25)
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
    50
  where "A \<longleftrightarrow> B \<equiv> A = B"
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
    51
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    52
axiomatization
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    53
  where ext [intro]: "(\<And>x. f x = g x) \<Longrightarrow> f = g"
61936
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
    54
    and iff [intro]: "(A \<Longrightarrow> B) \<Longrightarrow> (B \<Longrightarrow> A) \<Longrightarrow> A \<longleftrightarrow> B"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    55
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    56
theorem sym [sym]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    57
  assumes "x = y"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    58
  shows "y = x"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    59
  using assms by (rule subst) (rule refl)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    60
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    61
lemma [trans]: "x = y \<Longrightarrow> P y \<Longrightarrow> P x"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    62
  by (rule subst) (rule sym)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    63
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    64
lemma [trans]: "P x \<Longrightarrow> x = y \<Longrightarrow> P y"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    65
  by (rule subst)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    66
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    67
theorem trans [trans]: "x = y \<Longrightarrow> y = z \<Longrightarrow> x = z"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    68
  by (rule subst)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    69
61936
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
    70
theorem iff1 [elim]: "A \<longleftrightarrow> B \<Longrightarrow> A \<Longrightarrow> B"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    71
  by (rule subst)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    72
61936
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
    73
theorem iff2 [elim]: "A \<longleftrightarrow> B \<Longrightarrow> B \<Longrightarrow> A"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    74
  by (rule subst) (rule sym)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    75
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    76
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    77
subsubsection \<open>Derived connectives\<close>
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
    78
63585
wenzelm
parents: 63532
diff changeset
    79
definition false :: o  ("\<bottom>")
wenzelm
parents: 63532
diff changeset
    80
  where "\<bottom> \<equiv> \<forall>A. A"
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20523
diff changeset
    81
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    82
theorem falseE [elim]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    83
  assumes "\<bottom>"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    84
  shows A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    85
proof -
63532
b01154b74314 provide Pure.simp/simp_all, which only know about meta-equality;
wenzelm
parents: 62266
diff changeset
    86
  from \<open>\<bottom>\<close> have "\<forall>A. A" by (simp only: false_def)
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    87
  then show A ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    88
qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    89
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    90
63585
wenzelm
parents: 63532
diff changeset
    91
definition true :: o  ("\<top>")
wenzelm
parents: 63532
diff changeset
    92
  where "\<top> \<equiv> \<bottom> \<longrightarrow> \<bottom>"
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20523
diff changeset
    93
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    94
theorem trueI [intro]: \<top>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    95
  unfolding true_def ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    96
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    97
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    98
definition not :: "o \<Rightarrow> o"  ("\<not> _" [40] 40)
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    99
  where "not \<equiv> \<lambda>A. A \<longrightarrow> \<bottom>"
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20523
diff changeset
   100
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
   101
abbreviation not_equal :: "'a \<Rightarrow> 'a \<Rightarrow> o"  (infixl "\<noteq>" 50)
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
   102
  where "x \<noteq> y \<equiv> \<not> (x = y)"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   103
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   104
theorem notI [intro]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   105
  assumes "A \<Longrightarrow> \<bottom>"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   106
  shows "\<not> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   107
  using assms unfolding not_def ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   108
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   109
theorem notE [elim]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   110
  assumes "\<not> A" and A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   111
  shows B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   112
proof -
63532
b01154b74314 provide Pure.simp/simp_all, which only know about meta-equality;
wenzelm
parents: 62266
diff changeset
   113
  from \<open>\<not> A\<close> have "A \<longrightarrow> \<bottom>" by (simp only: not_def)
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   114
  from this and \<open>A\<close> have "\<bottom>" ..
23373
ead82c82da9e tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
   115
  then show B ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   116
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   117
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   118
lemma notE': "A \<Longrightarrow> \<not> A \<Longrightarrow> B"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   119
  by (rule notE)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   120
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   121
lemmas contradiction = notE notE'  \<comment> \<open>proof by contradiction in any order\<close>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   122
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   123
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   124
definition conj :: "o \<Rightarrow> o \<Rightarrow> o"  (infixr "\<and>" 35)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   125
  where "conj \<equiv> \<lambda>A B. \<forall>C. (A \<longrightarrow> B \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   126
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   127
theorem conjI [intro]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   128
  assumes A and B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   129
  shows "A \<and> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   130
  unfolding conj_def
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   131
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   132
  fix C
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   133
  show "(A \<longrightarrow> B \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   134
  proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   135
    assume "A \<longrightarrow> B \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   136
    also note \<open>A\<close>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   137
    also note \<open>B\<close>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   138
    finally show C .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   139
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   140
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   141
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   142
theorem conjE [elim]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   143
  assumes "A \<and> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   144
  obtains A and B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   145
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   146
  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
   147
    unfolding conj_def ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   148
  show A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   149
  proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   150
    note * [of A]
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   151
    also have "A \<longrightarrow> B \<longrightarrow> A"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   152
    proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   153
      assume A
23373
ead82c82da9e tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
   154
      then show "B \<longrightarrow> A" ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   155
    qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   156
    finally show ?thesis .
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   157
  qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   158
  show B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   159
  proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   160
    note * [of B]
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   161
    also have "A \<longrightarrow> B \<longrightarrow> B"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   162
    proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   163
      show "B \<longrightarrow> B" ..
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   164
    qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   165
    finally show ?thesis .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   166
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   167
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   168
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   169
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   170
definition disj :: "o \<Rightarrow> o \<Rightarrow> o"  (infixr "\<or>" 30)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   171
  where "disj \<equiv> \<lambda>A B. \<forall>C. (A \<longrightarrow> C) \<longrightarrow> (B \<longrightarrow> C) \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   172
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   173
theorem disjI1 [intro]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   174
  assumes A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   175
  shows "A \<or> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   176
  unfolding disj_def
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   177
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   178
  fix C
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   179
  show "(A \<longrightarrow> C) \<longrightarrow> (B \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   180
  proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   181
    assume "A \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   182
    from this and \<open>A\<close> have C ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   183
    then show "(B \<longrightarrow> C) \<longrightarrow> C" ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   184
  qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   185
qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   186
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   187
theorem disjI2 [intro]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   188
  assumes B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   189
  shows "A \<or> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   190
  unfolding disj_def
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   191
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   192
  fix C
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   193
  show "(A \<longrightarrow> C) \<longrightarrow> (B \<longrightarrow> C) \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   194
  proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   195
    show "(B \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   196
    proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   197
      assume "B \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   198
      from this and \<open>B\<close> show C ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   199
    qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   200
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   201
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   202
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   203
theorem disjE [elim]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   204
  assumes "A \<or> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   205
  obtains (a) A | (b) B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   206
proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   207
  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
   208
    unfolding disj_def ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   209
  also have "A \<longrightarrow> thesis"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   210
  proof
60769
cf7f3465eaf1 tuned proofs;
wenzelm
parents: 59031
diff changeset
   211
    assume A
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   212
    then show thesis by (rule a)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   213
  qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   214
  also have "B \<longrightarrow> thesis"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   215
  proof
60769
cf7f3465eaf1 tuned proofs;
wenzelm
parents: 59031
diff changeset
   216
    assume B
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   217
    then show thesis by (rule b)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   218
  qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   219
  finally show thesis .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   220
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   221
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   222
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   223
definition Ex :: "('a \<Rightarrow> o) \<Rightarrow> o"  (binder "\<exists>" 10)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   224
  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
   225
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   226
theorem exI [intro]: "P a \<Longrightarrow> \<exists>x. P x"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   227
  unfolding Ex_def
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   228
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   229
  fix C
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   230
  assume "P a"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   231
  show "(\<forall>x. P x \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   232
  proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   233
    assume "\<forall>x. P x \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   234
    then have "P a \<longrightarrow> C" ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   235
    from this and \<open>P a\<close> show C ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   236
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   237
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   238
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   239
theorem exE [elim]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   240
  assumes "\<exists>x. P x"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   241
  obtains (that) x where "P x"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   242
proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   243
  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
   244
    unfolding Ex_def ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   245
  also have "\<forall>x. P x \<longrightarrow> thesis"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   246
  proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   247
    fix x
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   248
    show "P x \<longrightarrow> thesis"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   249
    proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   250
      assume "P x"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   251
      then show thesis by (rule that)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   252
    qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   253
  qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   254
  finally show thesis .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   255
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   256
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   257
61936
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   258
subsection \<open>Cantor's Theorem\<close>
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   259
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   260
text \<open>
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   261
  Cantor's Theorem states that there is no surjection from a set to its
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   262
  powerset. The subsequent formulation uses elementary \<open>\<lambda>\<close>-calculus and
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   263
  predicate logic, with standard introduction and elimination rules.
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   264
\<close>
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   265
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   266
lemma iff_contradiction:
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   267
  assumes *: "\<not> A \<longleftrightarrow> A"
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   268
  shows C
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   269
proof (rule notE)
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   270
  show "\<not> A"
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   271
  proof
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   272
    assume A
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   273
    with * have "\<not> A" ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   274
    from this and \<open>A\<close> show \<bottom> ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   275
  qed
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   276
  with * show A ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   277
qed
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   278
62038
wenzelm
parents: 61936
diff changeset
   279
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
   280
proof
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   281
  assume "\<exists>f :: 'a \<Rightarrow> 'a \<Rightarrow> o. \<forall>A. \<exists>x. A = f x"
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   282
  then obtain f :: "'a \<Rightarrow> 'a \<Rightarrow> o" where *: "\<forall>A. \<exists>x. A = f x" ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   283
  let ?D = "\<lambda>x. \<not> f x x"
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   284
  from * have "\<exists>x. ?D = f x" ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   285
  then obtain a where "?D = f a" ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   286
  then have "?D a \<longleftrightarrow> f a a" using refl by (rule subst)
62266
f4baefee5776 tuned proofs;
wenzelm
parents: 62038
diff changeset
   287
  then have "\<not> f a a \<longleftrightarrow> f a a" .
61936
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   288
  then show \<bottom> by (rule iff_contradiction)
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   289
qed
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   290
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   291
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
   292
subsection \<open>Classical logic\<close>
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   293
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   294
text \<open>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   295
  The subsequent rules of classical reasoning are all equivalent.
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   296
\<close>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   297
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   298
locale classical =
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   299
  assumes classical: "(\<not> A \<Longrightarrow> A) \<Longrightarrow> A"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   300
60769
cf7f3465eaf1 tuned proofs;
wenzelm
parents: 59031
diff changeset
   301
theorem (in classical) Peirce's_Law: "((A \<longrightarrow> B) \<longrightarrow> A) \<longrightarrow> A"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   302
proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   303
  assume a: "(A \<longrightarrow> B) \<longrightarrow> A"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   304
  show A
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   305
  proof (rule classical)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   306
    assume "\<not> A"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   307
    have "A \<longrightarrow> B"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   308
    proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   309
      assume A
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
   310
      with \<open>\<not> A\<close> show B by (rule contradiction)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   311
    qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   312
    with a show A ..
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   313
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   314
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   315
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   316
theorem (in classical) double_negation:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   317
  assumes "\<not> \<not> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   318
  shows A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   319
proof (rule classical)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   320
  assume "\<not> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   321
  with \<open>\<not> \<not> A\<close> show ?thesis by (rule contradiction)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   322
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   323
60769
cf7f3465eaf1 tuned proofs;
wenzelm
parents: 59031
diff changeset
   324
theorem (in classical) tertium_non_datur: "A \<or> \<not> A"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   325
proof (rule double_negation)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   326
  show "\<not> \<not> (A \<or> \<not> A)"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   327
  proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   328
    assume "\<not> (A \<or> \<not> A)"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   329
    have "\<not> A"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   330
    proof
23373
ead82c82da9e tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
   331
      assume A then have "A \<or> \<not> A" ..
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
   332
      with \<open>\<not> (A \<or> \<not> A)\<close> show \<bottom> by (rule contradiction)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   333
    qed
23373
ead82c82da9e tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
   334
    then have "A \<or> \<not> A" ..
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
   335
    with \<open>\<not> (A \<or> \<not> A)\<close> show \<bottom> by (rule contradiction)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   336
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   337
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   338
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   339
theorem (in classical) classical_cases:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   340
  obtains A | "\<not> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   341
  using tertium_non_datur
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   342
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   343
  assume A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   344
  then show thesis ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   345
next
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   346
  assume "\<not> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   347
  then show thesis ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   348
qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   349
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   350
lemma
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   351
  assumes classical_cases: "\<And>A C. (A \<Longrightarrow> C) \<Longrightarrow> (\<not> A \<Longrightarrow> C) \<Longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   352
  shows "PROP classical"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   353
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   354
  fix A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   355
  assume *: "\<not> A \<Longrightarrow> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   356
  show A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   357
  proof (rule classical_cases)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   358
    assume A
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   359
    then show A .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   360
  next
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   361
    assume "\<not> A"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   362
    then show A by (rule *)
12573
6226b35c04ca added lemma;
wenzelm
parents: 12394
diff changeset
   363
  qed
6226b35c04ca added lemma;
wenzelm
parents: 12394
diff changeset
   364
qed
6226b35c04ca added lemma;
wenzelm
parents: 12394
diff changeset
   365
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   366
end