src/HOL/Isar_Examples/Higher_Order_Logic.thy
author wenzelm
Sat, 02 Jan 2016 16:32:36 +0100
changeset 62038 5651de00bca9
parent 61936 c51ce9ed0b1c
child 62266 f4baefee5776
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
cf7f3465eaf1 tuned proofs;
wenzelm
parents: 59031
diff changeset
     8
imports Pure
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
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    79
definition false :: o  ("\<bottom>") where "\<bottom> \<equiv> \<forall>A. A"
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20523
diff changeset
    80
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    81
theorem falseE [elim]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    82
  assumes "\<bottom>"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    83
  shows A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    84
proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    85
  from \<open>\<bottom>\<close> have "\<forall>A. A" unfolding false_def .
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    86
  then show A ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    87
qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    88
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    89
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    90
definition true :: o  ("\<top>") where "\<top> \<equiv> \<bottom> \<longrightarrow> \<bottom>"
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20523
diff changeset
    91
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    92
theorem trueI [intro]: \<top>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    93
  unfolding true_def ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    94
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
    95
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    96
definition not :: "o \<Rightarrow> o"  ("\<not> _" [40] 40)
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    97
  where "not \<equiv> \<lambda>A. A \<longrightarrow> \<bottom>"
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 20523
diff changeset
    98
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
    99
abbreviation not_equal :: "'a \<Rightarrow> 'a \<Rightarrow> o"  (infixl "\<noteq>" 50)
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
   100
  where "x \<noteq> y \<equiv> \<not> (x = y)"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   101
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   102
theorem notI [intro]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   103
  assumes "A \<Longrightarrow> \<bottom>"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   104
  shows "\<not> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   105
  using assms unfolding not_def ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   106
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   107
theorem notE [elim]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   108
  assumes "\<not> A" and A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   109
  shows B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   110
proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   111
  from \<open>\<not> A\<close> have "A \<longrightarrow> \<bottom>" unfolding not_def .
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   112
  from this and \<open>A\<close> have "\<bottom>" ..
23373
ead82c82da9e tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
   113
  then show B ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   114
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   115
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   116
lemma notE': "A \<Longrightarrow> \<not> A \<Longrightarrow> B"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   117
  by (rule notE)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   118
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   119
lemmas contradiction = notE notE'  \<comment> \<open>proof by contradiction in any order\<close>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   120
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   121
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   122
definition conj :: "o \<Rightarrow> o \<Rightarrow> o"  (infixr "\<and>" 35)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   123
  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
   124
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   125
theorem conjI [intro]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   126
  assumes A and B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   127
  shows "A \<and> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   128
  unfolding conj_def
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   129
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   130
  fix C
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   131
  show "(A \<longrightarrow> B \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   132
  proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   133
    assume "A \<longrightarrow> B \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   134
    also note \<open>A\<close>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   135
    also note \<open>B\<close>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   136
    finally show C .
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
theorem conjE [elim]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   141
  assumes "A \<and> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   142
  obtains A and B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   143
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   144
  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
   145
    unfolding conj_def ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   146
  show A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   147
  proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   148
    note * [of A]
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   149
    also have "A \<longrightarrow> B \<longrightarrow> A"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   150
    proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   151
      assume A
23373
ead82c82da9e tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
   152
      then show "B \<longrightarrow> A" ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   153
    qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   154
    finally show ?thesis .
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   155
  qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   156
  show B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   157
  proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   158
    note * [of B]
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   159
    also have "A \<longrightarrow> B \<longrightarrow> B"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   160
    proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   161
      show "B \<longrightarrow> B" ..
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   162
    qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   163
    finally show ?thesis .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   164
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   165
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   166
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   167
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   168
definition disj :: "o \<Rightarrow> o \<Rightarrow> o"  (infixr "\<or>" 30)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   169
  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
   170
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   171
theorem disjI1 [intro]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   172
  assumes A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   173
  shows "A \<or> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   174
  unfolding disj_def
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   175
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   176
  fix C
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   177
  show "(A \<longrightarrow> C) \<longrightarrow> (B \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   178
  proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   179
    assume "A \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   180
    from this and \<open>A\<close> have C ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   181
    then show "(B \<longrightarrow> C) \<longrightarrow> C" ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   182
  qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   183
qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   184
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   185
theorem disjI2 [intro]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   186
  assumes B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   187
  shows "A \<or> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   188
  unfolding disj_def
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   189
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   190
  fix C
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   191
  show "(A \<longrightarrow> C) \<longrightarrow> (B \<longrightarrow> C) \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   192
  proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   193
    show "(B \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   194
    proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   195
      assume "B \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   196
      from this and \<open>B\<close> show C ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   197
    qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   198
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   199
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   200
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   201
theorem disjE [elim]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   202
  assumes "A \<or> B"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   203
  obtains (a) A | (b) B
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   204
proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   205
  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
   206
    unfolding disj_def ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   207
  also have "A \<longrightarrow> thesis"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   208
  proof
60769
cf7f3465eaf1 tuned proofs;
wenzelm
parents: 59031
diff changeset
   209
    assume A
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   210
    then show thesis by (rule a)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   211
  qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   212
  also have "B \<longrightarrow> thesis"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   213
  proof
60769
cf7f3465eaf1 tuned proofs;
wenzelm
parents: 59031
diff changeset
   214
    assume B
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   215
    then show thesis by (rule b)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   216
  qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   217
  finally show thesis .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   218
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   219
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   220
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   221
definition Ex :: "('a \<Rightarrow> o) \<Rightarrow> o"  (binder "\<exists>" 10)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   222
  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
   223
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   224
theorem exI [intro]: "P a \<Longrightarrow> \<exists>x. P x"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   225
  unfolding Ex_def
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   226
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   227
  fix C
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   228
  assume "P a"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   229
  show "(\<forall>x. P x \<longrightarrow> C) \<longrightarrow> C"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   230
  proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   231
    assume "\<forall>x. P x \<longrightarrow> C"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   232
    then have "P a \<longrightarrow> C" ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   233
    from this and \<open>P a\<close> show C ..
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   234
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   235
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   236
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   237
theorem exE [elim]:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   238
  assumes "\<exists>x. P x"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   239
  obtains (that) x where "P x"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   240
proof -
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   241
  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
   242
    unfolding Ex_def ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   243
  also have "\<forall>x. P x \<longrightarrow> thesis"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   244
  proof
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   245
    fix x
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   246
    show "P x \<longrightarrow> thesis"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   247
    proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   248
      assume "P x"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   249
      then show thesis by (rule that)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   250
    qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   251
  qed
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   252
  finally show thesis .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   253
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   254
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   255
61936
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   256
subsection \<open>Cantor's Theorem\<close>
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   257
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   258
text \<open>
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   259
  Cantor's Theorem states that there is no surjection from a set to its
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   260
  powerset. The subsequent formulation uses elementary \<open>\<lambda>\<close>-calculus and
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   261
  predicate logic, with standard introduction and elimination rules.
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   262
\<close>
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   263
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   264
lemma iff_contradiction:
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   265
  assumes *: "\<not> A \<longleftrightarrow> A"
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   266
  shows C
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   267
proof (rule notE)
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   268
  show "\<not> A"
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   269
  proof
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   270
    assume A
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   271
    with * have "\<not> A" ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   272
    from this and \<open>A\<close> show \<bottom> ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   273
  qed
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   274
  with * show A ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   275
qed
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   276
62038
wenzelm
parents: 61936
diff changeset
   277
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
   278
proof
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   279
  assume "\<exists>f :: 'a \<Rightarrow> 'a \<Rightarrow> o. \<forall>A. \<exists>x. A = f x"
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   280
  then obtain f :: "'a \<Rightarrow> 'a \<Rightarrow> o" where *: "\<forall>A. \<exists>x. A = f x" ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   281
  let ?D = "\<lambda>x. \<not> f x x"
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   282
  from * have "\<exists>x. ?D = f x" ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   283
  then obtain a where "?D = f a" ..
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   284
  then have "?D a \<longleftrightarrow> f a a" using refl by (rule subst)
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   285
  then show \<bottom> by (rule iff_contradiction)
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   286
qed
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   287
c51ce9ed0b1c more notation;
wenzelm
parents: 61935
diff changeset
   288
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
   289
subsection \<open>Classical logic\<close>
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   290
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   291
text \<open>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   292
  The subsequent rules of classical reasoning are all equivalent.
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   293
\<close>
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   294
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   295
locale classical =
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   296
  assumes classical: "(\<not> A \<Longrightarrow> A) \<Longrightarrow> A"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   297
60769
cf7f3465eaf1 tuned proofs;
wenzelm
parents: 59031
diff changeset
   298
theorem (in classical) Peirce's_Law: "((A \<longrightarrow> B) \<longrightarrow> A) \<longrightarrow> A"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   299
proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   300
  assume a: "(A \<longrightarrow> B) \<longrightarrow> A"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   301
  show A
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   302
  proof (rule classical)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   303
    assume "\<not> A"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   304
    have "A \<longrightarrow> B"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   305
    proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   306
      assume A
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
   307
      with \<open>\<not> A\<close> show B by (rule contradiction)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   308
    qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   309
    with a show A ..
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   310
  qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   311
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   312
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   313
theorem (in classical) double_negation:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   314
  assumes "\<not> \<not> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   315
  shows A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   316
proof (rule classical)
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   317
  assume "\<not> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   318
  with \<open>\<not> \<not> A\<close> show ?thesis by (rule contradiction)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   319
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   320
60769
cf7f3465eaf1 tuned proofs;
wenzelm
parents: 59031
diff changeset
   321
theorem (in classical) tertium_non_datur: "A \<or> \<not> A"
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   322
proof (rule double_negation)
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   323
  show "\<not> \<not> (A \<or> \<not> A)"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   324
  proof
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   325
    assume "\<not> (A \<or> \<not> A)"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   326
    have "\<not> A"
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   327
    proof
23373
ead82c82da9e tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
   328
      assume A then have "A \<or> \<not> A" ..
59031
4c3bb56b8ce7 misc tuning and modernization;
wenzelm
parents: 58889
diff changeset
   329
      with \<open>\<not> (A \<or> \<not> A)\<close> show \<bottom> by (rule contradiction)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   330
    qed
23373
ead82c82da9e tuned proofs: avoid implicit prems;
wenzelm
parents: 21404
diff changeset
   331
    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
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   334
qed
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   335
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   336
theorem (in classical) classical_cases:
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   337
  obtains A | "\<not> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   338
  using tertium_non_datur
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   339
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   340
  assume A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   341
  then show thesis ..
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   342
next
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   343
  assume "\<not> 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
qed
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   346
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   347
lemma
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   348
  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
   349
  shows "PROP classical"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   350
proof
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   351
  fix A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   352
  assume *: "\<not> A \<Longrightarrow> A"
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   353
  show A
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   354
  proof (rule classical_cases)
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   355
    assume A
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   356
    then show A .
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   357
  next
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   358
    assume "\<not> A"
61759
49353865e539 misc tuning and modernization;
wenzelm
parents: 60769
diff changeset
   359
    then show A by (rule *)
12573
6226b35c04ca added lemma;
wenzelm
parents: 12394
diff changeset
   360
  qed
6226b35c04ca added lemma;
wenzelm
parents: 12394
diff changeset
   361
qed
6226b35c04ca added lemma;
wenzelm
parents: 12394
diff changeset
   362
12360
9c156045c8f2 added Higher_Order_Logic.thy;
wenzelm
parents:
diff changeset
   363
end