more symbols;
authorwenzelm
Sun Jul 19 00:03:10 2015 +0200 (2015-07-19)
changeset 6075936d9f215c982
parent 60758 d8d85a8172b5
child 60760 3444e0bf9261
more symbols;
src/HOL/HOL.thy
src/HOL/Tools/cnf.ML
     1.1 --- a/src/HOL/HOL.thy	Sat Jul 18 22:58:50 2015 +0200
     1.2 +++ b/src/HOL/HOL.thy	Sun Jul 19 00:03:10 2015 +0200
     1.3 @@ -70,24 +70,24 @@
     1.4  typedecl bool
     1.5  
     1.6  judgment
     1.7 -  Trueprop      :: "bool => prop"                   ("(_)" 5)
     1.8 +  Trueprop      :: "bool \<Rightarrow> prop"                   ("(_)" 5)
     1.9  
    1.10  axiomatization
    1.11 -  implies       :: "[bool, bool] => bool"           (infixr "-->" 25)  and
    1.12 -  eq            :: "['a, 'a] => bool"               (infixl "=" 50)  and
    1.13 -  The           :: "('a => bool) => 'a"
    1.14 +  implies       :: "[bool, bool] \<Rightarrow> bool"           (infixr "-->" 25)  and
    1.15 +  eq            :: "['a, 'a] \<Rightarrow> bool"               (infixl "=" 50)  and
    1.16 +  The           :: "('a \<Rightarrow> bool) \<Rightarrow> 'a"
    1.17  
    1.18  consts
    1.19    True          :: bool
    1.20    False         :: bool
    1.21 -  Not           :: "bool => bool"                   ("~ _" [40] 40)
    1.22 +  Not           :: "bool \<Rightarrow> bool"                   ("~ _" [40] 40)
    1.23  
    1.24 -  conj          :: "[bool, bool] => bool"           (infixr "&" 35)
    1.25 -  disj          :: "[bool, bool] => bool"           (infixr "|" 30)
    1.26 +  conj          :: "[bool, bool] \<Rightarrow> bool"           (infixr "&" 35)
    1.27 +  disj          :: "[bool, bool] \<Rightarrow> bool"           (infixr "|" 30)
    1.28  
    1.29 -  All           :: "('a => bool) => bool"           (binder "ALL " 10)
    1.30 -  Ex            :: "('a => bool) => bool"           (binder "EX " 10)
    1.31 -  Ex1           :: "('a => bool) => bool"           (binder "EX! " 10)
    1.32 +  All           :: "('a \<Rightarrow> bool) \<Rightarrow> bool"           (binder "ALL " 10)
    1.33 +  Ex            :: "('a \<Rightarrow> bool) \<Rightarrow> bool"           (binder "EX " 10)
    1.34 +  Ex1           :: "('a \<Rightarrow> bool) \<Rightarrow> bool"           (binder "EX! " 10)
    1.35  
    1.36  
    1.37  subsubsection \<open>Additional concrete syntax\<close>
    1.38 @@ -96,8 +96,8 @@
    1.39    eq  (infix "=" 50)
    1.40  
    1.41  abbreviation
    1.42 -  not_equal :: "['a, 'a] => bool"  (infixl "~=" 50) where
    1.43 -  "x ~= y == ~ (x = y)"
    1.44 +  not_equal :: "['a, 'a] \<Rightarrow> bool"  (infixl "~=" 50) where
    1.45 +  "x ~= y \<equiv> ~ (x = y)"
    1.46  
    1.47  notation (output)
    1.48    not_equal  (infix "~=" 50)
    1.49 @@ -119,14 +119,14 @@
    1.50    not_equal  (infix "\<noteq>" 50)
    1.51  
    1.52  abbreviation (iff)
    1.53 -  iff :: "[bool, bool] => bool"  (infixr "<->" 25) where
    1.54 -  "A <-> B == A = B"
    1.55 +  iff :: "[bool, bool] \<Rightarrow> bool"  (infixr "<->" 25) where
    1.56 +  "A <-> B \<equiv> A = B"
    1.57  
    1.58  notation (xsymbols)
    1.59    iff  (infixr "\<longleftrightarrow>" 25)
    1.60  
    1.61 -syntax "_The" :: "[pttrn, bool] => 'a"  ("(3THE _./ _)" [0, 10] 10)
    1.62 -translations "THE x. P" == "CONST The (%x. P)"
    1.63 +syntax "_The" :: "[pttrn, bool] \<Rightarrow> 'a"  ("(3THE _./ _)" [0, 10] 10)
    1.64 +translations "THE x. P" \<rightleftharpoons> "CONST The (\<lambda>x. P)"
    1.65  print_translation \<open>
    1.66    [(@{const_syntax The}, fn _ => fn [Abs abs] =>
    1.67        let val (x, t) = Syntax_Trans.atomic_abs_tr' abs
    1.68 @@ -135,19 +135,19 @@
    1.69  
    1.70  nonterminal letbinds and letbind
    1.71  syntax
    1.72 -  "_bind"       :: "[pttrn, 'a] => letbind"              ("(2_ =/ _)" 10)
    1.73 -  ""            :: "letbind => letbinds"                 ("_")
    1.74 -  "_binds"      :: "[letbind, letbinds] => letbinds"     ("_;/ _")
    1.75 -  "_Let"        :: "[letbinds, 'a] => 'a"                ("(let (_)/ in (_))" [0, 10] 10)
    1.76 +  "_bind"       :: "[pttrn, 'a] \<Rightarrow> letbind"              ("(2_ =/ _)" 10)
    1.77 +  ""            :: "letbind \<Rightarrow> letbinds"                 ("_")
    1.78 +  "_binds"      :: "[letbind, letbinds] \<Rightarrow> letbinds"     ("_;/ _")
    1.79 +  "_Let"        :: "[letbinds, 'a] \<Rightarrow> 'a"                ("(let (_)/ in (_))" [0, 10] 10)
    1.80  
    1.81  nonterminal case_syn and cases_syn
    1.82  syntax
    1.83 -  "_case_syntax" :: "['a, cases_syn] => 'b"  ("(case _ of/ _)" 10)
    1.84 -  "_case1" :: "['a, 'b] => case_syn"  ("(2_ =>/ _)" 10)
    1.85 -  "" :: "case_syn => cases_syn"  ("_")
    1.86 -  "_case2" :: "[case_syn, cases_syn] => cases_syn"  ("_/ | _")
    1.87 +  "_case_syntax" :: "['a, cases_syn] \<Rightarrow> 'b"  ("(case _ of/ _)" 10)
    1.88 +  "_case1" :: "['a, 'b] \<Rightarrow> case_syn"  ("(2_ =>/ _)" 10)
    1.89 +  "" :: "case_syn \<Rightarrow> cases_syn"  ("_")
    1.90 +  "_case2" :: "[case_syn, cases_syn] \<Rightarrow> cases_syn"  ("_/ | _")
    1.91  syntax (xsymbols)
    1.92 -  "_case1" :: "['a, 'b] => case_syn"  ("(2_ \<Rightarrow>/ _)" 10)
    1.93 +  "_case1" :: "['a, 'b] \<Rightarrow> case_syn"  ("(2_ \<Rightarrow>/ _)" 10)
    1.94  
    1.95  notation (xsymbols)
    1.96    All  (binder "\<forall>" 10) and
    1.97 @@ -170,7 +170,7 @@
    1.98  axiomatization where
    1.99    refl: "t = (t::'a)" and
   1.100    subst: "s = t \<Longrightarrow> P s \<Longrightarrow> P t" and
   1.101 -  ext: "(!!x::'a. (f x ::'b) = g x) ==> (%x. f x) = (%x. g x)"
   1.102 +  ext: "(\<And>x::'a. (f x ::'b) = g x) \<Longrightarrow> (\<lambda>x. f x) = (\<lambda>x. g x)"
   1.103      -- \<open>Extensionality is built into the meta-logic, and this rule expresses
   1.104           a related property.  It is an eta-expanded version of the traditional
   1.105           rule, and similar to the ABS rule of HOL\<close> and
   1.106 @@ -178,31 +178,31 @@
   1.107    the_eq_trivial: "(THE x. x = a) = (a::'a)"
   1.108  
   1.109  axiomatization where
   1.110 -  impI: "(P ==> Q) ==> P-->Q" and
   1.111 -  mp: "[| P-->Q;  P |] ==> Q" and
   1.112 +  impI: "(P \<Longrightarrow> Q) \<Longrightarrow> P \<longrightarrow> Q" and
   1.113 +  mp: "\<lbrakk>P \<longrightarrow> Q; P\<rbrakk> \<Longrightarrow> Q" and
   1.114  
   1.115 -  iff: "(P-->Q) --> (Q-->P) --> (P=Q)" and
   1.116 -  True_or_False: "(P=True) | (P=False)"
   1.117 +  iff: "(P \<longrightarrow> Q) \<longrightarrow> (Q \<longrightarrow> P) \<longrightarrow> (P = Q)" and
   1.118 +  True_or_False: "(P = True) \<or> (P = False)"
   1.119  
   1.120  defs
   1.121 -  True_def:     "True      == ((%x::bool. x) = (%x. x))"
   1.122 -  All_def:      "All(P)    == (P = (%x. True))"
   1.123 -  Ex_def:       "Ex(P)     == !Q. (!x. P x --> Q) --> Q"
   1.124 -  False_def:    "False     == (!P. P)"
   1.125 -  not_def:      "~ P       == P-->False"
   1.126 -  and_def:      "P & Q     == !R. (P-->Q-->R) --> R"
   1.127 -  or_def:       "P | Q     == !R. (P-->R) --> (Q-->R) --> R"
   1.128 -  Ex1_def:      "Ex1(P)    == ? x. P(x) & (! y. P(y) --> y=x)"
   1.129 +  True_def:     "True      \<equiv> ((\<lambda>x::bool. x) = (\<lambda>x. x))"
   1.130 +  All_def:      "All P     \<equiv> (P = (\<lambda>x. True))"
   1.131 +  Ex_def:       "Ex P      \<equiv> \<forall>Q. (\<forall>x. P x \<longrightarrow> Q) \<longrightarrow> Q"
   1.132 +  False_def:    "False     \<equiv> (\<forall>P. P)"
   1.133 +  not_def:      "\<not> P       \<equiv> P \<longrightarrow> False"
   1.134 +  and_def:      "P \<and> Q     \<equiv> \<forall>R. (P \<longrightarrow> Q \<longrightarrow> R) \<longrightarrow> R"
   1.135 +  or_def:       "P \<or> Q     \<equiv> \<forall>R. (P \<longrightarrow> R) \<longrightarrow> (Q \<longrightarrow> R) \<longrightarrow> R"
   1.136 +  Ex1_def:      "Ex1 P     \<equiv> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)"
   1.137  
   1.138  definition If :: "bool \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> 'a" ("(if (_)/ then (_)/ else (_))" [0, 0, 10] 10)
   1.139 -  where "If P x y \<equiv> (THE z::'a. (P=True --> z=x) & (P=False --> z=y))"
   1.140 +  where "If P x y \<equiv> (THE z::'a. (P = True \<longrightarrow> z = x) \<and> (P = False \<longrightarrow> z = y))"
   1.141  
   1.142  definition Let :: "'a \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b"
   1.143    where "Let s f \<equiv> f s"
   1.144  
   1.145  translations
   1.146 -  "_Let (_binds b bs) e"  == "_Let b (_Let bs e)"
   1.147 -  "let x = a in e"        == "CONST Let a (%x. e)"
   1.148 +  "_Let (_binds b bs) e"  \<rightleftharpoons> "_Let b (_Let bs e)"
   1.149 +  "let x = a in e"        \<rightleftharpoons> "CONST Let a (\<lambda>x. e)"
   1.150  
   1.151  axiomatization undefined :: 'a
   1.152  
   1.153 @@ -213,20 +213,20 @@
   1.154  
   1.155  subsubsection \<open>Equality\<close>
   1.156  
   1.157 -lemma sym: "s = t ==> t = s"
   1.158 +lemma sym: "s = t \<Longrightarrow> t = s"
   1.159    by (erule subst) (rule refl)
   1.160  
   1.161 -lemma ssubst: "t = s ==> P s ==> P t"
   1.162 +lemma ssubst: "t = s \<Longrightarrow> P s \<Longrightarrow> P t"
   1.163    by (drule sym) (erule subst)
   1.164  
   1.165 -lemma trans: "[| r=s; s=t |] ==> r=t"
   1.166 +lemma trans: "\<lbrakk>r = s; s = t\<rbrakk> \<Longrightarrow> r = t"
   1.167    by (erule subst)
   1.168  
   1.169 -lemma trans_sym [Pure.elim?]: "r = s ==> t = s ==> r = t"
   1.170 +lemma trans_sym [Pure.elim?]: "r = s \<Longrightarrow> t = s \<Longrightarrow> r = t"
   1.171    by (rule trans [OF _ sym])
   1.172  
   1.173  lemma meta_eq_to_obj_eq:
   1.174 -  assumes meq: "A == B"
   1.175 +  assumes meq: "A \<equiv> B"
   1.176    shows "A = B"
   1.177    by (unfold meq) (rule refl)
   1.178  
   1.179 @@ -234,7 +234,7 @@
   1.180       (* a = b
   1.181          |   |
   1.182          c = d   *)
   1.183 -lemma box_equals: "[| a=b;  a=c;  b=d |] ==> c=d"
   1.184 +lemma box_equals: "\<lbrakk>a = b; a = c; b = d\<rbrakk> \<Longrightarrow> c = d"
   1.185  apply (rule trans)
   1.186  apply (rule trans)
   1.187  apply (rule sym)
   1.188 @@ -243,33 +243,33 @@
   1.189  
   1.190  text \<open>For calculational reasoning:\<close>
   1.191  
   1.192 -lemma forw_subst: "a = b ==> P b ==> P a"
   1.193 +lemma forw_subst: "a = b \<Longrightarrow> P b \<Longrightarrow> P a"
   1.194    by (rule ssubst)
   1.195  
   1.196 -lemma back_subst: "P a ==> a = b ==> P b"
   1.197 +lemma back_subst: "P a \<Longrightarrow> a = b \<Longrightarrow> P b"
   1.198    by (rule subst)
   1.199  
   1.200  
   1.201  subsubsection \<open>Congruence rules for application\<close>
   1.202  
   1.203  text \<open>Similar to @{text AP_THM} in Gordon's HOL.\<close>
   1.204 -lemma fun_cong: "(f::'a=>'b) = g ==> f(x)=g(x)"
   1.205 +lemma fun_cong: "(f :: 'a \<Rightarrow> 'b) = g \<Longrightarrow> f x = g x"
   1.206  apply (erule subst)
   1.207  apply (rule refl)
   1.208  done
   1.209  
   1.210  text \<open>Similar to @{text AP_TERM} in Gordon's HOL and FOL's @{text subst_context}.\<close>
   1.211 -lemma arg_cong: "x=y ==> f(x)=f(y)"
   1.212 +lemma arg_cong: "x = y \<Longrightarrow> f x = f y"
   1.213  apply (erule subst)
   1.214  apply (rule refl)
   1.215  done
   1.216  
   1.217 -lemma arg_cong2: "\<lbrakk> a = b; c = d \<rbrakk> \<Longrightarrow> f a c = f b d"
   1.218 +lemma arg_cong2: "\<lbrakk>a = b; c = d\<rbrakk> \<Longrightarrow> f a c = f b d"
   1.219  apply (erule ssubst)+
   1.220  apply (rule refl)
   1.221  done
   1.222  
   1.223 -lemma cong: "[| f = g; (x::'a) = y |] ==> f x = g y"
   1.224 +lemma cong: "\<lbrakk>f = g; (x::'a) = y\<rbrakk> \<Longrightarrow> f x = g y"
   1.225  apply (erule subst)+
   1.226  apply (rule refl)
   1.227  done
   1.228 @@ -279,13 +279,13 @@
   1.229  
   1.230  subsubsection \<open>Equality of booleans -- iff\<close>
   1.231  
   1.232 -lemma iffI: assumes "P ==> Q" and "Q ==> P" shows "P=Q"
   1.233 +lemma iffI: assumes "P \<Longrightarrow> Q" and "Q \<Longrightarrow> P" shows "P = Q"
   1.234    by (iprover intro: iff [THEN mp, THEN mp] impI assms)
   1.235  
   1.236 -lemma iffD2: "[| P=Q; Q |] ==> P"
   1.237 +lemma iffD2: "\<lbrakk>P = Q; Q\<rbrakk> \<Longrightarrow> P"
   1.238    by (erule ssubst)
   1.239  
   1.240 -lemma rev_iffD2: "[| Q; P=Q |] ==> P"
   1.241 +lemma rev_iffD2: "\<lbrakk>Q; P = Q\<rbrakk> \<Longrightarrow> P"
   1.242    by (erule iffD2)
   1.243  
   1.244  lemma iffD1: "Q = P \<Longrightarrow> Q \<Longrightarrow> P"
   1.245 @@ -295,8 +295,8 @@
   1.246    by (drule sym) (rule rev_iffD2)
   1.247  
   1.248  lemma iffE:
   1.249 -  assumes major: "P=Q"
   1.250 -    and minor: "[| P --> Q; Q --> P |] ==> R"
   1.251 +  assumes major: "P = Q"
   1.252 +    and minor: "\<lbrakk>P \<longrightarrow> Q; Q \<longrightarrow> P\<rbrakk> \<Longrightarrow> R"
   1.253    shows R
   1.254    by (iprover intro: minor impI major [THEN iffD2] major [THEN iffD1])
   1.255  
   1.256 @@ -306,33 +306,33 @@
   1.257  lemma TrueI: "True"
   1.258    unfolding True_def by (rule refl)
   1.259  
   1.260 -lemma eqTrueI: "P ==> P = True"
   1.261 +lemma eqTrueI: "P \<Longrightarrow> P = True"
   1.262    by (iprover intro: iffI TrueI)
   1.263  
   1.264 -lemma eqTrueE: "P = True ==> P"
   1.265 +lemma eqTrueE: "P = True \<Longrightarrow> P"
   1.266    by (erule iffD2) (rule TrueI)
   1.267  
   1.268  
   1.269  subsubsection \<open>Universal quantifier\<close>
   1.270  
   1.271 -lemma allI: assumes "!!x::'a. P(x)" shows "ALL x. P(x)"
   1.272 +lemma allI: assumes "\<And>x::'a. P x" shows "\<forall>x. P x"
   1.273    unfolding All_def by (iprover intro: ext eqTrueI assms)
   1.274  
   1.275 -lemma spec: "ALL x::'a. P(x) ==> P(x)"
   1.276 +lemma spec: "\<forall>x::'a. P x \<Longrightarrow> P x"
   1.277  apply (unfold All_def)
   1.278  apply (rule eqTrueE)
   1.279  apply (erule fun_cong)
   1.280  done
   1.281  
   1.282  lemma allE:
   1.283 -  assumes major: "ALL x. P(x)"
   1.284 -    and minor: "P(x) ==> R"
   1.285 +  assumes major: "\<forall>x. P x"
   1.286 +    and minor: "P x \<Longrightarrow> R"
   1.287    shows R
   1.288    by (iprover intro: minor major [THEN spec])
   1.289  
   1.290  lemma all_dupE:
   1.291 -  assumes major: "ALL x. P(x)"
   1.292 -    and minor: "[| P(x); ALL x. P(x) |] ==> R"
   1.293 +  assumes major: "\<forall>x. P x"
   1.294 +    and minor: "\<lbrakk>P x; \<forall>x. P x\<rbrakk> \<Longrightarrow> R"
   1.295    shows R
   1.296    by (iprover intro: minor major major [THEN spec])
   1.297  
   1.298 @@ -344,36 +344,36 @@
   1.299    logic before quantifiers!
   1.300  \<close>
   1.301  
   1.302 -lemma FalseE: "False ==> P"
   1.303 +lemma FalseE: "False \<Longrightarrow> P"
   1.304    apply (unfold False_def)
   1.305    apply (erule spec)
   1.306    done
   1.307  
   1.308 -lemma False_neq_True: "False = True ==> P"
   1.309 +lemma False_neq_True: "False = True \<Longrightarrow> P"
   1.310    by (erule eqTrueE [THEN FalseE])
   1.311  
   1.312  
   1.313  subsubsection \<open>Negation\<close>
   1.314  
   1.315  lemma notI:
   1.316 -  assumes "P ==> False"
   1.317 -  shows "~P"
   1.318 +  assumes "P \<Longrightarrow> False"
   1.319 +  shows "\<not> P"
   1.320    apply (unfold not_def)
   1.321    apply (iprover intro: impI assms)
   1.322    done
   1.323  
   1.324 -lemma False_not_True: "False ~= True"
   1.325 +lemma False_not_True: "False \<noteq> True"
   1.326    apply (rule notI)
   1.327    apply (erule False_neq_True)
   1.328    done
   1.329  
   1.330 -lemma True_not_False: "True ~= False"
   1.331 +lemma True_not_False: "True \<noteq> False"
   1.332    apply (rule notI)
   1.333    apply (drule sym)
   1.334    apply (erule False_neq_True)
   1.335    done
   1.336  
   1.337 -lemma notE: "[| ~P;  P |] ==> R"
   1.338 +lemma notE: "\<lbrakk>\<not> P; P\<rbrakk> \<Longrightarrow> R"
   1.339    apply (unfold not_def)
   1.340    apply (erule mp [THEN FalseE])
   1.341    apply assumption
   1.342 @@ -386,44 +386,44 @@
   1.343  subsubsection \<open>Implication\<close>
   1.344  
   1.345  lemma impE:
   1.346 -  assumes "P-->Q" "P" "Q ==> R"
   1.347 -  shows "R"
   1.348 +  assumes "P \<longrightarrow> Q" P "Q \<Longrightarrow> R"
   1.349 +  shows R
   1.350  by (iprover intro: assms mp)
   1.351  
   1.352 -(* Reduces Q to P-->Q, allowing substitution in P. *)
   1.353 -lemma rev_mp: "[| P;  P --> Q |] ==> Q"
   1.354 +(* Reduces Q to P \<longrightarrow> Q, allowing substitution in P. *)
   1.355 +lemma rev_mp: "\<lbrakk>P; P \<longrightarrow> Q\<rbrakk> \<Longrightarrow> Q"
   1.356  by (iprover intro: mp)
   1.357  
   1.358  lemma contrapos_nn:
   1.359 -  assumes major: "~Q"
   1.360 -      and minor: "P==>Q"
   1.361 -  shows "~P"
   1.362 +  assumes major: "\<not> Q"
   1.363 +      and minor: "P \<Longrightarrow> Q"
   1.364 +  shows "\<not> P"
   1.365  by (iprover intro: notI minor major [THEN notE])
   1.366  
   1.367  (*not used at all, but we already have the other 3 combinations *)
   1.368  lemma contrapos_pn:
   1.369    assumes major: "Q"
   1.370 -      and minor: "P ==> ~Q"
   1.371 -  shows "~P"
   1.372 +      and minor: "P \<Longrightarrow> \<not> Q"
   1.373 +  shows "\<not> P"
   1.374  by (iprover intro: notI minor major notE)
   1.375  
   1.376 -lemma not_sym: "t ~= s ==> s ~= t"
   1.377 +lemma not_sym: "t \<noteq> s \<Longrightarrow> s \<noteq> t"
   1.378    by (erule contrapos_nn) (erule sym)
   1.379  
   1.380 -lemma eq_neq_eq_imp_neq: "[| x = a ; a ~= b; b = y |] ==> x ~= y"
   1.381 +lemma eq_neq_eq_imp_neq: "\<lbrakk>x = a; a \<noteq> b; b = y\<rbrakk> \<Longrightarrow> x \<noteq> y"
   1.382    by (erule subst, erule ssubst, assumption)
   1.383  
   1.384  
   1.385  subsubsection \<open>Existential quantifier\<close>
   1.386  
   1.387 -lemma exI: "P x ==> EX x::'a. P x"
   1.388 +lemma exI: "P x \<Longrightarrow> \<exists>x::'a. P x"
   1.389  apply (unfold Ex_def)
   1.390  apply (iprover intro: allI allE impI mp)
   1.391  done
   1.392  
   1.393  lemma exE:
   1.394 -  assumes major: "EX x::'a. P(x)"
   1.395 -      and minor: "!!x. P(x) ==> Q"
   1.396 +  assumes major: "\<exists>x::'a. P x"
   1.397 +      and minor: "\<And>x. P x \<Longrightarrow> Q"
   1.398    shows "Q"
   1.399  apply (rule major [unfolded Ex_def, THEN spec, THEN mp])
   1.400  apply (iprover intro: impI [THEN allI] minor)
   1.401 @@ -432,52 +432,52 @@
   1.402  
   1.403  subsubsection \<open>Conjunction\<close>
   1.404  
   1.405 -lemma conjI: "[| P; Q |] ==> P&Q"
   1.406 +lemma conjI: "\<lbrakk>P; Q\<rbrakk> \<Longrightarrow> P \<and> Q"
   1.407  apply (unfold and_def)
   1.408  apply (iprover intro: impI [THEN allI] mp)
   1.409  done
   1.410  
   1.411 -lemma conjunct1: "[| P & Q |] ==> P"
   1.412 +lemma conjunct1: "\<lbrakk>P \<and> Q\<rbrakk> \<Longrightarrow> P"
   1.413  apply (unfold and_def)
   1.414  apply (iprover intro: impI dest: spec mp)
   1.415  done
   1.416  
   1.417 -lemma conjunct2: "[| P & Q |] ==> Q"
   1.418 +lemma conjunct2: "\<lbrakk>P \<and> Q\<rbrakk> \<Longrightarrow> Q"
   1.419  apply (unfold and_def)
   1.420  apply (iprover intro: impI dest: spec mp)
   1.421  done
   1.422  
   1.423  lemma conjE:
   1.424 -  assumes major: "P&Q"
   1.425 -      and minor: "[| P; Q |] ==> R"
   1.426 -  shows "R"
   1.427 +  assumes major: "P \<and> Q"
   1.428 +      and minor: "\<lbrakk>P; Q\<rbrakk> \<Longrightarrow> R"
   1.429 +  shows R
   1.430  apply (rule minor)
   1.431  apply (rule major [THEN conjunct1])
   1.432  apply (rule major [THEN conjunct2])
   1.433  done
   1.434  
   1.435  lemma context_conjI:
   1.436 -  assumes "P" "P ==> Q" shows "P & Q"
   1.437 +  assumes P "P \<Longrightarrow> Q" shows "P \<and> Q"
   1.438  by (iprover intro: conjI assms)
   1.439  
   1.440  
   1.441  subsubsection \<open>Disjunction\<close>
   1.442  
   1.443 -lemma disjI1: "P ==> P|Q"
   1.444 +lemma disjI1: "P \<Longrightarrow> P \<or> Q"
   1.445  apply (unfold or_def)
   1.446  apply (iprover intro: allI impI mp)
   1.447  done
   1.448  
   1.449 -lemma disjI2: "Q ==> P|Q"
   1.450 +lemma disjI2: "Q \<Longrightarrow> P \<or> Q"
   1.451  apply (unfold or_def)
   1.452  apply (iprover intro: allI impI mp)
   1.453  done
   1.454  
   1.455  lemma disjE:
   1.456 -  assumes major: "P|Q"
   1.457 -      and minorP: "P ==> R"
   1.458 -      and minorQ: "Q ==> R"
   1.459 -  shows "R"
   1.460 +  assumes major: "P \<or> Q"
   1.461 +      and minorP: "P \<Longrightarrow> R"
   1.462 +      and minorQ: "Q \<Longrightarrow> R"
   1.463 +  shows R
   1.464  by (iprover intro: minorP minorQ impI
   1.465                   major [unfolded or_def, THEN spec, THEN mp, THEN mp])
   1.466  
   1.467 @@ -485,8 +485,8 @@
   1.468  subsubsection \<open>Classical logic\<close>
   1.469  
   1.470  lemma classical:
   1.471 -  assumes prem: "~P ==> P"
   1.472 -  shows "P"
   1.473 +  assumes prem: "\<not> P \<Longrightarrow> P"
   1.474 +  shows P
   1.475  apply (rule True_or_False [THEN disjE, THEN eqTrueE])
   1.476  apply assumption
   1.477  apply (rule notI [THEN prem, THEN eqTrueI])
   1.478 @@ -496,54 +496,54 @@
   1.479  
   1.480  lemmas ccontr = FalseE [THEN classical]
   1.481  
   1.482 -(*notE with premises exchanged; it discharges ~R so that it can be used to
   1.483 +(*notE with premises exchanged; it discharges \<not> R so that it can be used to
   1.484    make elimination rules*)
   1.485  lemma rev_notE:
   1.486 -  assumes premp: "P"
   1.487 -      and premnot: "~R ==> ~P"
   1.488 -  shows "R"
   1.489 +  assumes premp: P
   1.490 +      and premnot: "\<not> R \<Longrightarrow> \<not> P"
   1.491 +  shows R
   1.492  apply (rule ccontr)
   1.493  apply (erule notE [OF premnot premp])
   1.494  done
   1.495  
   1.496  (*Double negation law*)
   1.497 -lemma notnotD: "~~P ==> P"
   1.498 +lemma notnotD: "\<not>\<not> P \<Longrightarrow> P"
   1.499  apply (rule classical)
   1.500  apply (erule notE)
   1.501  apply assumption
   1.502  done
   1.503  
   1.504  lemma contrapos_pp:
   1.505 -  assumes p1: "Q"
   1.506 -      and p2: "~P ==> ~Q"
   1.507 -  shows "P"
   1.508 +  assumes p1: Q
   1.509 +      and p2: "\<not> P \<Longrightarrow> \<not> Q"
   1.510 +  shows P
   1.511  by (iprover intro: classical p1 p2 notE)
   1.512  
   1.513  
   1.514  subsubsection \<open>Unique existence\<close>
   1.515  
   1.516  lemma ex1I:
   1.517 -  assumes "P a" "!!x. P(x) ==> x=a"
   1.518 -  shows "EX! x. P(x)"
   1.519 +  assumes "P a" "\<And>x. P x \<Longrightarrow> x = a"
   1.520 +  shows "\<exists>!x. P x"
   1.521  by (unfold Ex1_def, iprover intro: assms exI conjI allI impI)
   1.522  
   1.523  text\<open>Sometimes easier to use: the premises have no shared variables.  Safe!\<close>
   1.524  lemma ex_ex1I:
   1.525 -  assumes ex_prem: "EX x. P(x)"
   1.526 -      and eq: "!!x y. [| P(x); P(y) |] ==> x=y"
   1.527 -  shows "EX! x. P(x)"
   1.528 +  assumes ex_prem: "\<exists>x. P x"
   1.529 +      and eq: "\<And>x y. \<lbrakk>P x; P y\<rbrakk> \<Longrightarrow> x = y"
   1.530 +  shows "\<exists>!x. P x"
   1.531  by (iprover intro: ex_prem [THEN exE] ex1I eq)
   1.532  
   1.533  lemma ex1E:
   1.534 -  assumes major: "EX! x. P(x)"
   1.535 -      and minor: "!!x. [| P(x);  ALL y. P(y) --> y=x |] ==> R"
   1.536 -  shows "R"
   1.537 +  assumes major: "\<exists>!x. P x"
   1.538 +      and minor: "\<And>x. \<lbrakk>P x; \<forall>y. P y \<longrightarrow> y = x\<rbrakk> \<Longrightarrow> R"
   1.539 +  shows R
   1.540  apply (rule major [unfolded Ex1_def, THEN exE])
   1.541  apply (erule conjE)
   1.542  apply (iprover intro: minor)
   1.543  done
   1.544  
   1.545 -lemma ex1_implies_ex: "EX! x. P x ==> EX x. P x"
   1.546 +lemma ex1_implies_ex: "\<exists>!x. P x \<Longrightarrow> \<exists>x. P x"
   1.547  apply (erule ex1E)
   1.548  apply (rule exI)
   1.549  apply assumption
   1.550 @@ -553,59 +553,59 @@
   1.551  subsubsection \<open>Classical intro rules for disjunction and existential quantifiers\<close>
   1.552  
   1.553  lemma disjCI:
   1.554 -  assumes "~Q ==> P" shows "P|Q"
   1.555 +  assumes "\<not> Q \<Longrightarrow> P" shows "P \<or> Q"
   1.556  apply (rule classical)
   1.557  apply (iprover intro: assms disjI1 disjI2 notI elim: notE)
   1.558  done
   1.559  
   1.560 -lemma excluded_middle: "~P | P"
   1.561 +lemma excluded_middle: "\<not> P \<or> P"
   1.562  by (iprover intro: disjCI)
   1.563  
   1.564  text \<open>
   1.565    case distinction as a natural deduction rule.
   1.566 -  Note that @{term "~P"} is the second case, not the first
   1.567 +  Note that @{term "\<not> P"} is the second case, not the first
   1.568  \<close>
   1.569  lemma case_split [case_names True False]:
   1.570 -  assumes prem1: "P ==> Q"
   1.571 -      and prem2: "~P ==> Q"
   1.572 -  shows "Q"
   1.573 +  assumes prem1: "P \<Longrightarrow> Q"
   1.574 +      and prem2: "\<not> P \<Longrightarrow> Q"
   1.575 +  shows Q
   1.576  apply (rule excluded_middle [THEN disjE])
   1.577  apply (erule prem2)
   1.578  apply (erule prem1)
   1.579  done
   1.580  
   1.581 -(*Classical implies (-->) elimination. *)
   1.582 +(*Classical implies (\<longrightarrow>) elimination. *)
   1.583  lemma impCE:
   1.584 -  assumes major: "P-->Q"
   1.585 -      and minor: "~P ==> R" "Q ==> R"
   1.586 -  shows "R"
   1.587 +  assumes major: "P \<longrightarrow> Q"
   1.588 +      and minor: "\<not> P \<Longrightarrow> R" "Q \<Longrightarrow> R"
   1.589 +  shows R
   1.590  apply (rule excluded_middle [of P, THEN disjE])
   1.591  apply (iprover intro: minor major [THEN mp])+
   1.592  done
   1.593  
   1.594 -(*This version of --> elimination works on Q before P.  It works best for
   1.595 +(*This version of \<longrightarrow> elimination works on Q before P.  It works best for
   1.596    those cases in which P holds "almost everywhere".  Can't install as
   1.597    default: would break old proofs.*)
   1.598  lemma impCE':
   1.599 -  assumes major: "P-->Q"
   1.600 -      and minor: "Q ==> R" "~P ==> R"
   1.601 -  shows "R"
   1.602 +  assumes major: "P \<longrightarrow> Q"
   1.603 +      and minor: "Q \<Longrightarrow> R" "\<not> P \<Longrightarrow> R"
   1.604 +  shows R
   1.605  apply (rule excluded_middle [of P, THEN disjE])
   1.606  apply (iprover intro: minor major [THEN mp])+
   1.607  done
   1.608  
   1.609  (*Classical <-> elimination. *)
   1.610  lemma iffCE:
   1.611 -  assumes major: "P=Q"
   1.612 -      and minor: "[| P; Q |] ==> R"  "[| ~P; ~Q |] ==> R"
   1.613 -  shows "R"
   1.614 +  assumes major: "P = Q"
   1.615 +      and minor: "\<lbrakk>P; Q\<rbrakk> \<Longrightarrow> R" "\<lbrakk>\<not> P; \<not> Q\<rbrakk> \<Longrightarrow> R"
   1.616 +  shows R
   1.617  apply (rule major [THEN iffE])
   1.618  apply (iprover intro: minor elim: impCE notE)
   1.619  done
   1.620  
   1.621  lemma exCI:
   1.622 -  assumes "ALL x. ~P(x) ==> P(a)"
   1.623 -  shows "EX x. P(x)"
   1.624 +  assumes "\<forall>x. \<not> P x \<Longrightarrow> P a"
   1.625 +  shows "\<exists>x. P x"
   1.626  apply (rule ccontr)
   1.627  apply (iprover intro: assms exI allI notI notE [of "\<exists>x. P x"])
   1.628  done
   1.629 @@ -614,9 +614,9 @@
   1.630  subsubsection \<open>Intuitionistic Reasoning\<close>
   1.631  
   1.632  lemma impE':
   1.633 -  assumes 1: "P --> Q"
   1.634 -    and 2: "Q ==> R"
   1.635 -    and 3: "P --> Q ==> P"
   1.636 +  assumes 1: "P \<longrightarrow> Q"
   1.637 +    and 2: "Q \<Longrightarrow> R"
   1.638 +    and 3: "P \<longrightarrow> Q \<Longrightarrow> P"
   1.639    shows R
   1.640  proof -
   1.641    from 3 and 1 have P .
   1.642 @@ -625,8 +625,8 @@
   1.643  qed
   1.644  
   1.645  lemma allE':
   1.646 -  assumes 1: "ALL x. P x"
   1.647 -    and 2: "P x ==> ALL x. P x ==> Q"
   1.648 +  assumes 1: "\<forall>x. P x"
   1.649 +    and 2: "P x \<Longrightarrow> \<forall>x. P x \<Longrightarrow> Q"
   1.650    shows Q
   1.651  proof -
   1.652    from 1 have "P x" by (rule spec)
   1.653 @@ -634,16 +634,16 @@
   1.654  qed
   1.655  
   1.656  lemma notE':
   1.657 -  assumes 1: "~ P"
   1.658 -    and 2: "~ P ==> P"
   1.659 +  assumes 1: "\<not> P"
   1.660 +    and 2: "\<not> P \<Longrightarrow> P"
   1.661    shows R
   1.662  proof -
   1.663    from 2 and 1 have P .
   1.664    with 1 show R by (rule notE)
   1.665  qed
   1.666  
   1.667 -lemma TrueE: "True ==> P ==> P" .
   1.668 -lemma notFalseE: "~ False ==> P ==> P" .
   1.669 +lemma TrueE: "True \<Longrightarrow> P \<Longrightarrow> P" .
   1.670 +lemma notFalseE: "\<not> False \<Longrightarrow> P \<Longrightarrow> P" .
   1.671  
   1.672  lemmas [Pure.elim!] = disjE iffE FalseE conjE exE TrueE notFalseE
   1.673    and [Pure.intro!] = iffI conjI impI TrueI notI allI refl
   1.674 @@ -660,52 +660,52 @@
   1.675  axiomatization where
   1.676    eq_reflection: "x = y \<Longrightarrow> x \<equiv> y" (*admissible axiom*)
   1.677  
   1.678 -lemma atomize_all [atomize]: "(!!x. P x) == Trueprop (ALL x. P x)"
   1.679 +lemma atomize_all [atomize]: "(\<And>x. P x) \<equiv> Trueprop (\<forall>x. P x)"
   1.680  proof
   1.681 -  assume "!!x. P x"
   1.682 -  then show "ALL x. P x" ..
   1.683 +  assume "\<And>x. P x"
   1.684 +  then show "\<forall>x. P x" ..
   1.685  next
   1.686 -  assume "ALL x. P x"
   1.687 -  then show "!!x. P x" by (rule allE)
   1.688 +  assume "\<forall>x. P x"
   1.689 +  then show "\<And>x. P x" by (rule allE)
   1.690  qed
   1.691  
   1.692 -lemma atomize_imp [atomize]: "(A ==> B) == Trueprop (A --> B)"
   1.693 +lemma atomize_imp [atomize]: "(A \<Longrightarrow> B) \<equiv> Trueprop (A \<longrightarrow> B)"
   1.694  proof
   1.695 -  assume r: "A ==> B"
   1.696 -  show "A --> B" by (rule impI) (rule r)
   1.697 +  assume r: "A \<Longrightarrow> B"
   1.698 +  show "A \<longrightarrow> B" by (rule impI) (rule r)
   1.699  next
   1.700 -  assume "A --> B" and A
   1.701 +  assume "A \<longrightarrow> B" and A
   1.702    then show B by (rule mp)
   1.703  qed
   1.704  
   1.705 -lemma atomize_not: "(A ==> False) == Trueprop (~A)"
   1.706 +lemma atomize_not: "(A \<Longrightarrow> False) \<equiv> Trueprop (\<not> A)"
   1.707  proof
   1.708 -  assume r: "A ==> False"
   1.709 -  show "~A" by (rule notI) (rule r)
   1.710 +  assume r: "A \<Longrightarrow> False"
   1.711 +  show "\<not> A" by (rule notI) (rule r)
   1.712  next
   1.713 -  assume "~A" and A
   1.714 +  assume "\<not> A" and A
   1.715    then show False by (rule notE)
   1.716  qed
   1.717  
   1.718 -lemma atomize_eq [atomize, code]: "(x == y) == Trueprop (x = y)"
   1.719 +lemma atomize_eq [atomize, code]: "(x \<equiv> y) \<equiv> Trueprop (x = y)"
   1.720  proof
   1.721 -  assume "x == y"
   1.722 -  show "x = y" by (unfold \<open>x == y\<close>) (rule refl)
   1.723 +  assume "x \<equiv> y"
   1.724 +  show "x = y" by (unfold \<open>x \<equiv> y\<close>) (rule refl)
   1.725  next
   1.726    assume "x = y"
   1.727 -  then show "x == y" by (rule eq_reflection)
   1.728 +  then show "x \<equiv> y" by (rule eq_reflection)
   1.729  qed
   1.730  
   1.731 -lemma atomize_conj [atomize]: "(A &&& B) == Trueprop (A & B)"
   1.732 +lemma atomize_conj [atomize]: "(A &&& B) \<equiv> Trueprop (A \<and> B)"
   1.733  proof
   1.734    assume conj: "A &&& B"
   1.735 -  show "A & B"
   1.736 +  show "A \<and> B"
   1.737    proof (rule conjI)
   1.738      from conj show A by (rule conjunctionD1)
   1.739      from conj show B by (rule conjunctionD2)
   1.740    qed
   1.741  next
   1.742 -  assume conj: "A & B"
   1.743 +  assume conj: "A \<and> B"
   1.744    show "A &&& B"
   1.745    proof -
   1.746      from conj show A ..
   1.747 @@ -719,16 +719,16 @@
   1.748  
   1.749  subsubsection \<open>Atomizing elimination rules\<close>
   1.750  
   1.751 -lemma atomize_exL[atomize_elim]: "(!!x. P x ==> Q) == ((EX x. P x) ==> Q)"
   1.752 +lemma atomize_exL[atomize_elim]: "(\<And>x. P x \<Longrightarrow> Q) \<equiv> ((\<exists>x. P x) \<Longrightarrow> Q)"
   1.753    by rule iprover+
   1.754  
   1.755 -lemma atomize_conjL[atomize_elim]: "(A ==> B ==> C) == (A & B ==> C)"
   1.756 +lemma atomize_conjL[atomize_elim]: "(A \<Longrightarrow> B \<Longrightarrow> C) \<equiv> (A \<and> B \<Longrightarrow> C)"
   1.757    by rule iprover+
   1.758  
   1.759 -lemma atomize_disjL[atomize_elim]: "((A ==> C) ==> (B ==> C) ==> C) == ((A | B ==> C) ==> C)"
   1.760 +lemma atomize_disjL[atomize_elim]: "((A \<Longrightarrow> C) \<Longrightarrow> (B \<Longrightarrow> C) \<Longrightarrow> C) \<equiv> ((A \<or> B \<Longrightarrow> C) \<Longrightarrow> C)"
   1.761    by rule iprover+
   1.762  
   1.763 -lemma atomize_elimL[atomize_elim]: "(!!B. (A ==> B) ==> B) == Trueprop A" ..
   1.764 +lemma atomize_elimL[atomize_elim]: "(\<And>B. (A \<Longrightarrow> B) \<Longrightarrow> B) \<equiv> Trueprop A" ..
   1.765  
   1.766  
   1.767  subsection \<open>Package setup\<close>
   1.768 @@ -749,14 +749,13 @@
   1.769  
   1.770  subsubsection \<open>Classical Reasoner setup\<close>
   1.771  
   1.772 -lemma imp_elim: "P --> Q ==> (~ R ==> P) ==> (Q ==> R) ==> R"
   1.773 +lemma imp_elim: "P \<longrightarrow> Q \<Longrightarrow> (\<not> R \<Longrightarrow> P) \<Longrightarrow> (Q \<Longrightarrow> R) \<Longrightarrow> R"
   1.774    by (rule classical) iprover
   1.775  
   1.776 -lemma swap: "~ P ==> (~ R ==> P) ==> R"
   1.777 +lemma swap: "\<not> P \<Longrightarrow> (\<not> R \<Longrightarrow> P) \<Longrightarrow> R"
   1.778    by (rule classical) iprover
   1.779  
   1.780 -lemma thin_refl:
   1.781 -  "\<And>X. \<lbrakk> x=x; PROP W \<rbrakk> \<Longrightarrow> PROP W" .
   1.782 +lemma thin_refl: "\<And>X. \<lbrakk>x = x; PROP W\<rbrakk> \<Longrightarrow> PROP W" .
   1.783  
   1.784  ML \<open>
   1.785  structure Hypsubst = Hypsubst
   1.786 @@ -826,7 +825,7 @@
   1.787  
   1.788  ML \<open>val HOL_cs = claset_of @{context}\<close>
   1.789  
   1.790 -lemma contrapos_np: "~ Q ==> (~ P ==> Q) ==> P"
   1.791 +lemma contrapos_np: "\<not> Q \<Longrightarrow> (\<not> P \<Longrightarrow> Q) \<Longrightarrow> P"
   1.792    apply (erule swap)
   1.793    apply (erule (1) meta_mp)
   1.794    done
   1.795 @@ -871,83 +870,83 @@
   1.796  
   1.797  lemma the_equality [intro]:
   1.798    assumes "P a"
   1.799 -      and "!!x. P x ==> x=a"
   1.800 +      and "\<And>x. P x \<Longrightarrow> x = a"
   1.801    shows "(THE x. P x) = a"
   1.802    by (blast intro: assms trans [OF arg_cong [where f=The] the_eq_trivial])
   1.803  
   1.804  lemma theI:
   1.805 -  assumes "P a" and "!!x. P x ==> x=a"
   1.806 +  assumes "P a" and "\<And>x. P x \<Longrightarrow> x = a"
   1.807    shows "P (THE x. P x)"
   1.808  by (iprover intro: assms the_equality [THEN ssubst])
   1.809  
   1.810 -lemma theI': "EX! x. P x ==> P (THE x. P x)"
   1.811 +lemma theI': "\<exists>!x. P x \<Longrightarrow> P (THE x. P x)"
   1.812    by (blast intro: theI)
   1.813  
   1.814  (*Easier to apply than theI: only one occurrence of P*)
   1.815  lemma theI2:
   1.816 -  assumes "P a" "!!x. P x ==> x=a" "!!x. P x ==> Q x"
   1.817 +  assumes "P a" "\<And>x. P x \<Longrightarrow> x = a" "\<And>x. P x \<Longrightarrow> Q x"
   1.818    shows "Q (THE x. P x)"
   1.819  by (iprover intro: assms theI)
   1.820  
   1.821 -lemma the1I2: assumes "EX! x. P x" "\<And>x. P x \<Longrightarrow> Q x" shows "Q (THE x. P x)"
   1.822 +lemma the1I2: assumes "\<exists>!x. P x" "\<And>x. P x \<Longrightarrow> Q x" shows "Q (THE x. P x)"
   1.823  by(iprover intro:assms(2) theI2[where P=P and Q=Q] ex1E[OF assms(1)]
   1.824             elim:allE impE)
   1.825  
   1.826 -lemma the1_equality [elim?]: "[| EX!x. P x; P a |] ==> (THE x. P x) = a"
   1.827 +lemma the1_equality [elim?]: "\<lbrakk>\<exists>!x. P x; P a\<rbrakk> \<Longrightarrow> (THE x. P x) = a"
   1.828    by blast
   1.829  
   1.830 -lemma the_sym_eq_trivial: "(THE y. x=y) = x"
   1.831 +lemma the_sym_eq_trivial: "(THE y. x = y) = x"
   1.832    by blast
   1.833  
   1.834  
   1.835  subsubsection \<open>Simplifier\<close>
   1.836  
   1.837 -lemma eta_contract_eq: "(%s. f s) = f" ..
   1.838 +lemma eta_contract_eq: "(\<lambda>s. f s) = f" ..
   1.839  
   1.840  lemma simp_thms:
   1.841 -  shows not_not: "(~ ~ P) = P"
   1.842 -  and Not_eq_iff: "((~P) = (~Q)) = (P = Q)"
   1.843 +  shows not_not: "(\<not> \<not> P) = P"
   1.844 +  and Not_eq_iff: "((\<not> P) = (\<not> Q)) = (P = Q)"
   1.845    and
   1.846 -    "(P ~= Q) = (P = (~Q))"
   1.847 -    "(P | ~P) = True"    "(~P | P) = True"
   1.848 +    "(P \<noteq> Q) = (P = (\<not> Q))"
   1.849 +    "(P \<or> \<not>P) = True"    "(\<not> P \<or> P) = True"
   1.850      "(x = x) = True"
   1.851    and not_True_eq_False [code]: "(\<not> True) = False"
   1.852    and not_False_eq_True [code]: "(\<not> False) = True"
   1.853    and
   1.854 -    "(~P) ~= P"  "P ~= (~P)"
   1.855 -    "(True=P) = P"
   1.856 +    "(\<not> P) \<noteq> P"  "P \<noteq> (\<not> P)"
   1.857 +    "(True = P) = P"
   1.858    and eq_True: "(P = True) = P"
   1.859 -  and "(False=P) = (~P)"
   1.860 +  and "(False = P) = (\<not> P)"
   1.861    and eq_False: "(P = False) = (\<not> P)"
   1.862    and
   1.863 -    "(True --> P) = P"  "(False --> P) = True"
   1.864 -    "(P --> True) = True"  "(P --> P) = True"
   1.865 -    "(P --> False) = (~P)"  "(P --> ~P) = (~P)"
   1.866 -    "(P & True) = P"  "(True & P) = P"
   1.867 -    "(P & False) = False"  "(False & P) = False"
   1.868 -    "(P & P) = P"  "(P & (P & Q)) = (P & Q)"
   1.869 -    "(P & ~P) = False"    "(~P & P) = False"
   1.870 -    "(P | True) = True"  "(True | P) = True"
   1.871 -    "(P | False) = P"  "(False | P) = P"
   1.872 -    "(P | P) = P"  "(P | (P | Q)) = (P | Q)" and
   1.873 -    "(ALL x. P) = P"  "(EX x. P) = P"  "EX x. x=t"  "EX x. t=x"
   1.874 +    "(True \<longrightarrow> P) = P"  "(False \<longrightarrow> P) = True"
   1.875 +    "(P \<longrightarrow> True) = True"  "(P \<longrightarrow> P) = True"
   1.876 +    "(P \<longrightarrow> False) = (\<not> P)"  "(P \<longrightarrow> \<not> P) = (\<not> P)"
   1.877 +    "(P \<and> True) = P"  "(True \<and> P) = P"
   1.878 +    "(P \<and> False) = False"  "(False \<and> P) = False"
   1.879 +    "(P \<and> P) = P"  "(P \<and> (P \<and> Q)) = (P \<and> Q)"
   1.880 +    "(P \<and> \<not> P) = False"    "(\<not> P \<and> P) = False"
   1.881 +    "(P \<or> True) = True"  "(True \<or> P) = True"
   1.882 +    "(P \<or> False) = P"  "(False \<or> P) = P"
   1.883 +    "(P \<or> P) = P"  "(P \<or> (P \<or> Q)) = (P \<or> Q)" and
   1.884 +    "(\<forall>x. P) = P"  "(\<exists>x. P) = P"  "\<exists>x. x = t"  "\<exists>x. t = x"
   1.885    and
   1.886 -    "!!P. (EX x. x=t & P(x)) = P(t)"
   1.887 -    "!!P. (EX x. t=x & P(x)) = P(t)"
   1.888 -    "!!P. (ALL x. x=t --> P(x)) = P(t)"
   1.889 -    "!!P. (ALL x. t=x --> P(x)) = P(t)"
   1.890 +    "\<And>P. (\<exists>x. x = t \<and> P x) = P t"
   1.891 +    "\<And>P. (\<exists>x. t = x \<and> P x) = P t"
   1.892 +    "\<And>P. (\<forall>x. x = t \<longrightarrow> P x) = P t"
   1.893 +    "\<And>P. (\<forall>x. t = x \<longrightarrow> P x) = P t"
   1.894    by (blast, blast, blast, blast, blast, iprover+)
   1.895  
   1.896 -lemma disj_absorb: "(A | A) = A"
   1.897 +lemma disj_absorb: "(A \<or> A) = A"
   1.898    by blast
   1.899  
   1.900 -lemma disj_left_absorb: "(A | (A | B)) = (A | B)"
   1.901 +lemma disj_left_absorb: "(A \<or> (A \<or> B)) = (A \<or> B)"
   1.902    by blast
   1.903  
   1.904 -lemma conj_absorb: "(A & A) = A"
   1.905 +lemma conj_absorb: "(A \<and> A) = A"
   1.906    by blast
   1.907  
   1.908 -lemma conj_left_absorb: "(A & (A & B)) = (A & B)"
   1.909 +lemma conj_left_absorb: "(A \<and> (A \<and> B)) = (A \<and> B)"
   1.910    by blast
   1.911  
   1.912  lemma eq_ac:
   1.913 @@ -957,83 +956,83 @@
   1.914  lemma neq_commute: "a \<noteq> b \<longleftrightarrow> b \<noteq> a" by iprover
   1.915  
   1.916  lemma conj_comms:
   1.917 -  shows conj_commute: "(P&Q) = (Q&P)"
   1.918 -    and conj_left_commute: "(P&(Q&R)) = (Q&(P&R))" by iprover+
   1.919 -lemma conj_assoc: "((P&Q)&R) = (P&(Q&R))" by iprover
   1.920 +  shows conj_commute: "(P \<and> Q) = (Q \<and> P)"
   1.921 +    and conj_left_commute: "(P \<and> (Q \<and> R)) = (Q \<and> (P \<and> R))" by iprover+
   1.922 +lemma conj_assoc: "((P \<and> Q) \<and> R) = (P \<and> (Q \<and> R))" by iprover
   1.923  
   1.924  lemmas conj_ac = conj_commute conj_left_commute conj_assoc
   1.925  
   1.926  lemma disj_comms:
   1.927 -  shows disj_commute: "(P|Q) = (Q|P)"
   1.928 -    and disj_left_commute: "(P|(Q|R)) = (Q|(P|R))" by iprover+
   1.929 -lemma disj_assoc: "((P|Q)|R) = (P|(Q|R))" by iprover
   1.930 +  shows disj_commute: "(P \<or> Q) = (Q \<or> P)"
   1.931 +    and disj_left_commute: "(P \<or> (Q \<or> R)) = (Q \<or> (P \<or> R))" by iprover+
   1.932 +lemma disj_assoc: "((P \<or> Q) \<or> R) = (P \<or> (Q \<or> R))" by iprover
   1.933  
   1.934  lemmas disj_ac = disj_commute disj_left_commute disj_assoc
   1.935  
   1.936 -lemma conj_disj_distribL: "(P&(Q|R)) = (P&Q | P&R)" by iprover
   1.937 -lemma conj_disj_distribR: "((P|Q)&R) = (P&R | Q&R)" by iprover
   1.938 +lemma conj_disj_distribL: "(P \<and> (Q \<or> R)) = (P \<and> Q \<or> P \<and> R)" by iprover
   1.939 +lemma conj_disj_distribR: "((P \<or> Q) \<and> R) = (P \<and> R \<or> Q \<and> R)" by iprover
   1.940  
   1.941 -lemma disj_conj_distribL: "(P|(Q&R)) = ((P|Q) & (P|R))" by iprover
   1.942 -lemma disj_conj_distribR: "((P&Q)|R) = ((P|R) & (Q|R))" by iprover
   1.943 +lemma disj_conj_distribL: "(P \<or> (Q \<and> R)) = ((P \<or> Q) \<and> (P \<or> R))" by iprover
   1.944 +lemma disj_conj_distribR: "((P \<and> Q) \<or> R) = ((P \<or> R) \<and> (Q \<or> R))" by iprover
   1.945  
   1.946 -lemma imp_conjR: "(P --> (Q&R)) = ((P-->Q) & (P-->R))" by iprover
   1.947 -lemma imp_conjL: "((P&Q) -->R)  = (P --> (Q --> R))" by iprover
   1.948 -lemma imp_disjL: "((P|Q) --> R) = ((P-->R)&(Q-->R))" by iprover
   1.949 +lemma imp_conjR: "(P \<longrightarrow> (Q \<and> R)) = ((P \<longrightarrow> Q) \<and> (P \<longrightarrow> R))" by iprover
   1.950 +lemma imp_conjL: "((P \<and> Q) \<longrightarrow> R) = (P \<longrightarrow> (Q \<longrightarrow> R))" by iprover
   1.951 +lemma imp_disjL: "((P \<or> Q) \<longrightarrow> R) = ((P \<longrightarrow> R) \<and> (Q \<longrightarrow> R))" by iprover
   1.952  
   1.953  text \<open>These two are specialized, but @{text imp_disj_not1} is useful in @{text "Auth/Yahalom"}.\<close>
   1.954 -lemma imp_disj_not1: "(P --> Q | R) = (~Q --> P --> R)" by blast
   1.955 -lemma imp_disj_not2: "(P --> Q | R) = (~R --> P --> Q)" by blast
   1.956 +lemma imp_disj_not1: "(P \<longrightarrow> Q \<or> R) = (\<not> Q \<longrightarrow> P \<longrightarrow> R)" by blast
   1.957 +lemma imp_disj_not2: "(P \<longrightarrow> Q \<or> R) = (\<not> R \<longrightarrow> P \<longrightarrow> Q)" by blast
   1.958  
   1.959 -lemma imp_disj1: "((P-->Q)|R) = (P--> Q|R)" by blast
   1.960 -lemma imp_disj2: "(Q|(P-->R)) = (P--> Q|R)" by blast
   1.961 +lemma imp_disj1: "((P \<longrightarrow> Q) \<or> R) = (P \<longrightarrow> Q \<or> R)" by blast
   1.962 +lemma imp_disj2: "(Q \<or> (P \<longrightarrow> R)) = (P \<longrightarrow> Q \<or> R)" by blast
   1.963  
   1.964 -lemma imp_cong: "(P = P') ==> (P' ==> (Q = Q')) ==> ((P --> Q) = (P' --> Q'))"
   1.965 +lemma imp_cong: "(P = P') \<Longrightarrow> (P' \<Longrightarrow> (Q = Q')) \<Longrightarrow> ((P \<longrightarrow> Q) = (P' \<longrightarrow> Q'))"
   1.966    by iprover
   1.967  
   1.968 -lemma de_Morgan_disj: "(~(P | Q)) = (~P & ~Q)" by iprover
   1.969 -lemma de_Morgan_conj: "(~(P & Q)) = (~P | ~Q)" by blast
   1.970 -lemma not_imp: "(~(P --> Q)) = (P & ~Q)" by blast
   1.971 -lemma not_iff: "(P~=Q) = (P = (~Q))" by blast
   1.972 -lemma disj_not1: "(~P | Q) = (P --> Q)" by blast
   1.973 -lemma disj_not2: "(P | ~Q) = (Q --> P)"  -- \<open>changes orientation :-(\<close>
   1.974 +lemma de_Morgan_disj: "(\<not> (P \<or> Q)) = (\<not> P \<and> \<not> Q)" by iprover
   1.975 +lemma de_Morgan_conj: "(\<not> (P \<and> Q)) = (\<not> P \<or> \<not> Q)" by blast
   1.976 +lemma not_imp: "(\<not> (P \<longrightarrow> Q)) = (P \<and> \<not> Q)" by blast
   1.977 +lemma not_iff: "(P \<noteq> Q) = (P = (\<not> Q))" by blast
   1.978 +lemma disj_not1: "(\<not> P \<or> Q) = (P \<longrightarrow> Q)" by blast
   1.979 +lemma disj_not2: "(P \<or> \<not> Q) = (Q \<longrightarrow> P)"  -- \<open>changes orientation :-(\<close>
   1.980    by blast
   1.981 -lemma imp_conv_disj: "(P --> Q) = ((~P) | Q)" by blast
   1.982 +lemma imp_conv_disj: "(P \<longrightarrow> Q) = ((\<not> P) \<or> Q)" by blast
   1.983  
   1.984 -lemma iff_conv_conj_imp: "(P = Q) = ((P --> Q) & (Q --> P))" by iprover
   1.985 +lemma iff_conv_conj_imp: "(P = Q) = ((P \<longrightarrow> Q) \<and> (Q \<longrightarrow> P))" by iprover
   1.986  
   1.987  
   1.988 -lemma cases_simp: "((P --> Q) & (~P --> Q)) = Q"
   1.989 +lemma cases_simp: "((P \<longrightarrow> Q) \<and> (\<not> P \<longrightarrow> Q)) = Q"
   1.990    -- \<open>Avoids duplication of subgoals after @{text split_if}, when the true and false\<close>
   1.991    -- \<open>cases boil down to the same thing.\<close>
   1.992    by blast
   1.993  
   1.994 -lemma not_all: "(~ (! x. P(x))) = (? x.~P(x))" by blast
   1.995 -lemma imp_all: "((! x. P x) --> Q) = (? x. P x --> Q)" by blast
   1.996 -lemma not_ex: "(~ (? x. P(x))) = (! x.~P(x))" by iprover
   1.997 -lemma imp_ex: "((? x. P x) --> Q) = (! x. P x --> Q)" by iprover
   1.998 -lemma all_not_ex: "(ALL x. P x) = (~ (EX x. ~ P x ))" by blast
   1.999 +lemma not_all: "(\<not> (\<forall>x. P x)) = (\<exists>x. \<not> P x)" by blast
  1.1000 +lemma imp_all: "((\<forall>x. P x) \<longrightarrow> Q) = (\<exists>x. P x \<longrightarrow> Q)" by blast
  1.1001 +lemma not_ex: "(\<not> (\<exists>x. P x)) = (\<forall>x. \<not> P x)" by iprover
  1.1002 +lemma imp_ex: "((\<exists>x. P x) \<longrightarrow> Q) = (\<forall>x. P x \<longrightarrow> Q)" by iprover
  1.1003 +lemma all_not_ex: "(\<forall>x. P x) = (\<not> (\<exists>x. \<not> P x ))" by blast
  1.1004  
  1.1005  declare All_def [no_atp]
  1.1006  
  1.1007 -lemma ex_disj_distrib: "(? x. P(x) | Q(x)) = ((? x. P(x)) | (? x. Q(x)))" by iprover
  1.1008 -lemma all_conj_distrib: "(!x. P(x) & Q(x)) = ((! x. P(x)) & (! x. Q(x)))" by iprover
  1.1009 +lemma ex_disj_distrib: "(\<exists>x. P x \<or> Q x) = ((\<exists>x. P x) \<or> (\<exists>x. Q x))" by iprover
  1.1010 +lemma all_conj_distrib: "(\<forall>x. P x \<and> Q x) = ((\<forall>x. P x) \<and> (\<forall>x. Q x))" by iprover
  1.1011  
  1.1012  text \<open>
  1.1013 -  \medskip The @{text "&"} congruence rule: not included by default!
  1.1014 +  \medskip The @{text "\<and>"} congruence rule: not included by default!
  1.1015    May slow rewrite proofs down by as much as 50\%\<close>
  1.1016  
  1.1017  lemma conj_cong:
  1.1018 -    "(P = P') ==> (P' ==> (Q = Q')) ==> ((P & Q) = (P' & Q'))"
  1.1019 +    "(P = P') \<Longrightarrow> (P' \<Longrightarrow> (Q = Q')) \<Longrightarrow> ((P \<and> Q) = (P' \<and> Q'))"
  1.1020    by iprover
  1.1021  
  1.1022  lemma rev_conj_cong:
  1.1023 -    "(Q = Q') ==> (Q' ==> (P = P')) ==> ((P & Q) = (P' & Q'))"
  1.1024 +    "(Q = Q') \<Longrightarrow> (Q' \<Longrightarrow> (P = P')) \<Longrightarrow> ((P \<and> Q) = (P' \<and> Q'))"
  1.1025    by iprover
  1.1026  
  1.1027  text \<open>The @{text "|"} congruence rule: not included by default!\<close>
  1.1028  
  1.1029  lemma disj_cong:
  1.1030 -    "(P = P') ==> (~P' ==> (Q = Q')) ==> ((P | Q) = (P' | Q'))"
  1.1031 +    "(P = P') \<Longrightarrow> (\<not> P' \<Longrightarrow> (Q = Q')) \<Longrightarrow> ((P \<or> Q) = (P' \<or> Q'))"
  1.1032    by blast
  1.1033  
  1.1034  
  1.1035 @@ -1045,19 +1044,19 @@
  1.1036  lemma if_False [code]: "(if False then x else y) = y"
  1.1037    by (unfold If_def) blast
  1.1038  
  1.1039 -lemma if_P: "P ==> (if P then x else y) = x"
  1.1040 +lemma if_P: "P \<Longrightarrow> (if P then x else y) = x"
  1.1041    by (unfold If_def) blast
  1.1042  
  1.1043 -lemma if_not_P: "~P ==> (if P then x else y) = y"
  1.1044 +lemma if_not_P: "\<not> P \<Longrightarrow> (if P then x else y) = y"
  1.1045    by (unfold If_def) blast
  1.1046  
  1.1047 -lemma split_if: "P (if Q then x else y) = ((Q --> P(x)) & (~Q --> P(y)))"
  1.1048 +lemma split_if: "P (if Q then x else y) = ((Q \<longrightarrow> P x) \<and> (\<not> Q \<longrightarrow> P y))"
  1.1049    apply (rule case_split [of Q])
  1.1050     apply (simplesubst if_P)
  1.1051      prefer 3 apply (simplesubst if_not_P, blast+)
  1.1052    done
  1.1053  
  1.1054 -lemma split_if_asm: "P (if Q then x else y) = (~((Q & ~P x) | (~Q & ~P y)))"
  1.1055 +lemma split_if_asm: "P (if Q then x else y) = (\<not> ((Q \<and> \<not> P x) \<or> (\<not> Q \<and> \<not> P y)))"
  1.1056  by (simplesubst split_if, blast)
  1.1057  
  1.1058  lemmas if_splits [no_atp] = split_if split_if_asm
  1.1059 @@ -1068,24 +1067,23 @@
  1.1060  lemma if_eq_cancel: "(if x = y then y else x) = x"
  1.1061  by (simplesubst split_if, blast)
  1.1062  
  1.1063 -lemma if_bool_eq_conj:
  1.1064 -"(if P then Q else R) = ((P-->Q) & (~P-->R))"
  1.1065 -  -- \<open>This form is useful for expanding @{text "if"}s on the RIGHT of the @{text "==>"} symbol.\<close>
  1.1066 +lemma if_bool_eq_conj: "(if P then Q else R) = ((P \<longrightarrow> Q) \<and> (\<not> P \<longrightarrow> R))"
  1.1067 +  -- \<open>This form is useful for expanding @{text "if"}s on the RIGHT of the @{text "\<Longrightarrow>"} symbol.\<close>
  1.1068    by (rule split_if)
  1.1069  
  1.1070 -lemma if_bool_eq_disj: "(if P then Q else R) = ((P&Q) | (~P&R))"
  1.1071 +lemma if_bool_eq_disj: "(if P then Q else R) = ((P \<and> Q) \<or> (\<not> P \<and> R))"
  1.1072    -- \<open>And this form is useful for expanding @{text "if"}s on the LEFT.\<close>
  1.1073    by (simplesubst split_if) blast
  1.1074  
  1.1075 -lemma Eq_TrueI: "P ==> P == True" by (unfold atomize_eq) iprover
  1.1076 -lemma Eq_FalseI: "~P ==> P == False" by (unfold atomize_eq) iprover
  1.1077 +lemma Eq_TrueI: "P \<Longrightarrow> P \<equiv> True" by (unfold atomize_eq) iprover
  1.1078 +lemma Eq_FalseI: "\<not> P \<Longrightarrow> P \<equiv> False" by (unfold atomize_eq) iprover
  1.1079  
  1.1080  text \<open>\medskip let rules for simproc\<close>
  1.1081  
  1.1082 -lemma Let_folded: "f x \<equiv> g x \<Longrightarrow>  Let x f \<equiv> Let x g"
  1.1083 +lemma Let_folded: "f x \<equiv> g x \<Longrightarrow> Let x f \<equiv> Let x g"
  1.1084    by (unfold Let_def)
  1.1085  
  1.1086 -lemma Let_unfold: "f x \<equiv> g \<Longrightarrow>  Let x f \<equiv> g"
  1.1087 +lemma Let_unfold: "f x \<equiv> g \<Longrightarrow> Let x f \<equiv> g"
  1.1088    by (unfold Let_def)
  1.1089  
  1.1090  text \<open>
  1.1091 @@ -1094,8 +1092,8 @@
  1.1092    its premise.
  1.1093  \<close>
  1.1094  
  1.1095 -definition simp_implies :: "[prop, prop] => prop"  (infixr "=simp=>" 1) where
  1.1096 -  "simp_implies \<equiv> op ==>"
  1.1097 +definition simp_implies :: "[prop, prop] \<Rightarrow> prop"  (infixr "=simp=>" 1) where
  1.1098 +  "simp_implies \<equiv> op \<Longrightarrow>"
  1.1099  
  1.1100  lemma simp_impliesI:
  1.1101    assumes PQ: "(PROP P \<Longrightarrow> PROP Q)"
  1.1102 @@ -1116,9 +1114,9 @@
  1.1103    done
  1.1104  
  1.1105  lemma simp_implies_cong:
  1.1106 -  assumes PP' :"PROP P == PROP P'"
  1.1107 -  and P'QQ': "PROP P' ==> (PROP Q == PROP Q')"
  1.1108 -  shows "(PROP P =simp=> PROP Q) == (PROP P' =simp=> PROP Q')"
  1.1109 +  assumes PP' :"PROP P \<equiv> PROP P'"
  1.1110 +  and P'QQ': "PROP P' \<Longrightarrow> (PROP Q \<equiv> PROP Q')"
  1.1111 +  shows "(PROP P =simp=> PROP Q) \<equiv> (PROP P' =simp=> PROP Q')"
  1.1112  proof (unfold simp_implies_def, rule equal_intr_rule)
  1.1113    assume PQ: "PROP P \<Longrightarrow> PROP Q"
  1.1114    and P': "PROP P'"
  1.1115 @@ -1166,10 +1164,10 @@
  1.1116    Simplifier.method_setup Splitter.split_modifiers
  1.1117  \<close>
  1.1118  
  1.1119 -simproc_setup defined_Ex ("EX x. P x") = \<open>fn _ => Quantifier1.rearrange_ex\<close>
  1.1120 -simproc_setup defined_All ("ALL x. P x") = \<open>fn _ => Quantifier1.rearrange_all\<close>
  1.1121 +simproc_setup defined_Ex ("\<exists>x. P x") = \<open>fn _ => Quantifier1.rearrange_ex\<close>
  1.1122 +simproc_setup defined_All ("\<forall>x. P x") = \<open>fn _ => Quantifier1.rearrange_all\<close>
  1.1123  
  1.1124 -text \<open>Simproc for proving @{text "(y = x) == False"} from premise @{text "~(x = y)"}:\<close>
  1.1125 +text \<open>Simproc for proving @{text "(y = x) \<equiv> False"} from premise @{text "\<not> (x = y)"}:\<close>
  1.1126  
  1.1127  simproc_setup neq ("x = y") = \<open>fn _ =>
  1.1128  let
  1.1129 @@ -1277,22 +1275,22 @@
  1.1130  by(rule swap_prems_eq)
  1.1131  
  1.1132  lemma ex_simps:
  1.1133 -  "!!P Q. (EX x. P x & Q)   = ((EX x. P x) & Q)"
  1.1134 -  "!!P Q. (EX x. P & Q x)   = (P & (EX x. Q x))"
  1.1135 -  "!!P Q. (EX x. P x | Q)   = ((EX x. P x) | Q)"
  1.1136 -  "!!P Q. (EX x. P | Q x)   = (P | (EX x. Q x))"
  1.1137 -  "!!P Q. (EX x. P x --> Q) = ((ALL x. P x) --> Q)"
  1.1138 -  "!!P Q. (EX x. P --> Q x) = (P --> (EX x. Q x))"
  1.1139 +  "\<And>P Q. (\<exists>x. P x \<and> Q)   = ((\<exists>x. P x) \<and> Q)"
  1.1140 +  "\<And>P Q. (\<exists>x. P \<and> Q x)   = (P \<and> (\<exists>x. Q x))"
  1.1141 +  "\<And>P Q. (\<exists>x. P x \<or> Q)   = ((\<exists>x. P x) \<or> Q)"
  1.1142 +  "\<And>P Q. (\<exists>x. P \<or> Q x)   = (P \<or> (\<exists>x. Q x))"
  1.1143 +  "\<And>P Q. (\<exists>x. P x \<longrightarrow> Q) = ((\<forall>x. P x) \<longrightarrow> Q)"
  1.1144 +  "\<And>P Q. (\<exists>x. P \<longrightarrow> Q x) = (P \<longrightarrow> (\<exists>x. Q x))"
  1.1145    -- \<open>Miniscoping: pushing in existential quantifiers.\<close>
  1.1146    by (iprover | blast)+
  1.1147  
  1.1148  lemma all_simps:
  1.1149 -  "!!P Q. (ALL x. P x & Q)   = ((ALL x. P x) & Q)"
  1.1150 -  "!!P Q. (ALL x. P & Q x)   = (P & (ALL x. Q x))"
  1.1151 -  "!!P Q. (ALL x. P x | Q)   = ((ALL x. P x) | Q)"
  1.1152 -  "!!P Q. (ALL x. P | Q x)   = (P | (ALL x. Q x))"
  1.1153 -  "!!P Q. (ALL x. P x --> Q) = ((EX x. P x) --> Q)"
  1.1154 -  "!!P Q. (ALL x. P --> Q x) = (P --> (ALL x. Q x))"
  1.1155 +  "\<And>P Q. (\<forall>x. P x \<and> Q)   = ((\<forall>x. P x) \<and> Q)"
  1.1156 +  "\<And>P Q. (\<forall>x. P \<and> Q x)   = (P \<and> (\<forall>x. Q x))"
  1.1157 +  "\<And>P Q. (\<forall>x. P x \<or> Q)   = ((\<forall>x. P x) \<or> Q)"
  1.1158 +  "\<And>P Q. (\<forall>x. P \<or> Q x)   = (P \<or> (\<forall>x. Q x))"
  1.1159 +  "\<And>P Q. (\<forall>x. P x \<longrightarrow> Q) = ((\<exists>x. P x) \<longrightarrow> Q)"
  1.1160 +  "\<And>P Q. (\<forall>x. P \<longrightarrow> Q x) = (P \<longrightarrow> (\<forall>x. Q x))"
  1.1161    -- \<open>Miniscoping: pushing in universal quantifiers.\<close>
  1.1162    by (iprover | blast)+
  1.1163  
  1.1164 @@ -1308,7 +1306,7 @@
  1.1165    (*In general it seems wrong to add distributive laws by default: they
  1.1166      might cause exponential blow-up.  But imp_disjL has been in for a while
  1.1167      and cannot be removed without affecting existing proofs.  Moreover,
  1.1168 -    rewriting by "(P|Q --> R) = ((P-->R)&(Q-->R))" might be justified on the
  1.1169 +    rewriting by "(P \<or> Q \<longrightarrow> R) = ((P \<longrightarrow> R) \<and> (Q \<longrightarrow> R))" might be justified on the
  1.1170      grounds that it allows simplification of R in the two cases.*)
  1.1171    conj_assoc
  1.1172    disj_assoc
  1.1173 @@ -1332,7 +1330,7 @@
  1.1174  
  1.1175  ML \<open>val HOL_ss = simpset_of @{context}\<close>
  1.1176  
  1.1177 -text \<open>Simplifies x assuming c and y assuming ~c\<close>
  1.1178 +text \<open>Simplifies x assuming c and y assuming \<not> c\<close>
  1.1179  lemma if_cong:
  1.1180    assumes "b = c"
  1.1181        and "c \<Longrightarrow> x = u"
  1.1182 @@ -1458,13 +1456,13 @@
  1.1183    fn _ => Induct.map_simpset (fn ss => ss
  1.1184      addsimprocs
  1.1185        [Simplifier.simproc_global @{theory} "swap_induct_false"
  1.1186 -         ["induct_false ==> PROP P ==> PROP Q"]
  1.1187 +         ["induct_false \<Longrightarrow> PROP P \<Longrightarrow> PROP Q"]
  1.1188           (fn _ =>
  1.1189              (fn _ $ (P as _ $ @{const induct_false}) $ (_ $ Q $ _) =>
  1.1190                    if P <> Q then SOME Drule.swap_prems_eq else NONE
  1.1191                | _ => NONE)),
  1.1192         Simplifier.simproc_global @{theory} "induct_equal_conj_curry"
  1.1193 -         ["induct_conj P Q ==> PROP R"]
  1.1194 +         ["induct_conj P Q \<Longrightarrow> PROP R"]
  1.1195           (fn _ =>
  1.1196              (fn _ $ (_ $ P) $ _ =>
  1.1197                  let
  1.1198 @@ -1589,19 +1587,19 @@
  1.1199  
  1.1200  subsection \<open>Other simple lemmas and lemma duplicates\<close>
  1.1201  
  1.1202 -lemma ex1_eq [iff]: "EX! x. x = t" "EX! x. t = x"
  1.1203 +lemma ex1_eq [iff]: "\<exists>!x. x = t" "\<exists>!x. t = x"
  1.1204    by blast+
  1.1205  
  1.1206 -lemma choice_eq: "(ALL x. EX! y. P x y) = (EX! f. ALL x. P x (f x))"
  1.1207 +lemma choice_eq: "(\<forall>x. \<exists>!y. P x y) = (\<exists>!f. \<forall>x. P x (f x))"
  1.1208    apply (rule iffI)
  1.1209 -  apply (rule_tac a = "%x. THE y. P x y" in ex1I)
  1.1210 +  apply (rule_tac a = "\<lambda>x. THE y. P x y" in ex1I)
  1.1211    apply (fast dest!: theI')
  1.1212    apply (fast intro: the1_equality [symmetric])
  1.1213    apply (erule ex1E)
  1.1214    apply (rule allI)
  1.1215    apply (rule ex1I)
  1.1216    apply (erule spec)
  1.1217 -  apply (erule_tac x = "%z. if z = x then y else f z" in allE)
  1.1218 +  apply (erule_tac x = "\<lambda>z. if z = x then y else f z" in allE)
  1.1219    apply (erule impE)
  1.1220    apply (rule allI)
  1.1221    apply (case_tac "xa = x")
     2.1 --- a/src/HOL/Tools/cnf.ML	Sat Jul 18 22:58:50 2015 +0200
     2.2 +++ b/src/HOL/Tools/cnf.ML	Sun Jul 19 00:03:10 2015 +0200
     2.3 @@ -54,41 +54,41 @@
     2.4  structure CNF : CNF =
     2.5  struct
     2.6  
     2.7 -val clause2raw_notE      = @{lemma "[| P; ~P |] ==> False" by auto};
     2.8 -val clause2raw_not_disj  = @{lemma "[| ~P; ~Q |] ==> ~(P | Q)" by auto};
     2.9 -val clause2raw_not_not   = @{lemma "P ==> ~~P" by auto};
    2.10 +val clause2raw_notE      = @{lemma "\<lbrakk>P; \<not>P\<rbrakk> \<Longrightarrow> False" by auto};
    2.11 +val clause2raw_not_disj  = @{lemma "\<lbrakk>\<not> P; \<not> Q\<rbrakk> \<Longrightarrow> \<not> (P \<or> Q)" by auto};
    2.12 +val clause2raw_not_not   = @{lemma "P \<Longrightarrow> \<not>\<not> P" by auto};
    2.13  
    2.14  val iff_refl             = @{lemma "(P::bool) = P" by auto};
    2.15  val iff_trans            = @{lemma "[| (P::bool) = Q; Q = R |] ==> P = R" by auto};
    2.16 -val conj_cong            = @{lemma "[| P = P'; Q = Q' |] ==> (P & Q) = (P' & Q')" by auto};
    2.17 -val disj_cong            = @{lemma "[| P = P'; Q = Q' |] ==> (P | Q) = (P' | Q')" by auto};
    2.18 +val conj_cong            = @{lemma "[| P = P'; Q = Q' |] ==> (P \<and> Q) = (P' \<and> Q')" by auto};
    2.19 +val disj_cong            = @{lemma "[| P = P'; Q = Q' |] ==> (P \<or> Q) = (P' \<or> Q')" by auto};
    2.20  
    2.21 -val make_nnf_imp         = @{lemma "[| (~P) = P'; Q = Q' |] ==> (P --> Q) = (P' | Q')" by auto};
    2.22 -val make_nnf_iff         = @{lemma "[| P = P'; (~P) = NP; Q = Q'; (~Q) = NQ |] ==> (P = Q) = ((P' | NQ) & (NP | Q'))" by auto};
    2.23 +val make_nnf_imp         = @{lemma "[| (~P) = P'; Q = Q' |] ==> (P \<longrightarrow> Q) = (P' \<or> Q')" by auto};
    2.24 +val make_nnf_iff         = @{lemma "[| P = P'; (~P) = NP; Q = Q'; (~Q) = NQ |] ==> (P = Q) = ((P' \<or> NQ) \<and> (NP \<or> Q'))" by auto};
    2.25  val make_nnf_not_false   = @{lemma "(~False) = True" by auto};
    2.26  val make_nnf_not_true    = @{lemma "(~True) = False" by auto};
    2.27 -val make_nnf_not_conj    = @{lemma "[| (~P) = P'; (~Q) = Q' |] ==> (~(P & Q)) = (P' | Q')" by auto};
    2.28 -val make_nnf_not_disj    = @{lemma "[| (~P) = P'; (~Q) = Q' |] ==> (~(P | Q)) = (P' & Q')" by auto};
    2.29 -val make_nnf_not_imp     = @{lemma "[| P = P'; (~Q) = Q' |] ==> (~(P --> Q)) = (P' & Q')" by auto};
    2.30 -val make_nnf_not_iff     = @{lemma "[| P = P'; (~P) = NP; Q = Q'; (~Q) = NQ |] ==> (~(P = Q)) = ((P' | Q') & (NP | NQ))" by auto};
    2.31 +val make_nnf_not_conj    = @{lemma "[| (~P) = P'; (~Q) = Q' |] ==> (~(P \<and> Q)) = (P' \<or> Q')" by auto};
    2.32 +val make_nnf_not_disj    = @{lemma "[| (~P) = P'; (~Q) = Q' |] ==> (~(P \<or> Q)) = (P' \<and> Q')" by auto};
    2.33 +val make_nnf_not_imp     = @{lemma "[| P = P'; (~Q) = Q' |] ==> (~(P \<longrightarrow> Q)) = (P' \<and> Q')" by auto};
    2.34 +val make_nnf_not_iff     = @{lemma "[| P = P'; (~P) = NP; Q = Q'; (~Q) = NQ |] ==> (~(P = Q)) = ((P' \<or> Q') \<and> (NP \<or> NQ))" by auto};
    2.35  val make_nnf_not_not     = @{lemma "P = P' ==> (~~P) = P'" by auto};
    2.36  
    2.37 -val simp_TF_conj_True_l  = @{lemma "[| P = True; Q = Q' |] ==> (P & Q) = Q'" by auto};
    2.38 -val simp_TF_conj_True_r  = @{lemma "[| P = P'; Q = True |] ==> (P & Q) = P'" by auto};
    2.39 -val simp_TF_conj_False_l = @{lemma "P = False ==> (P & Q) = False" by auto};
    2.40 -val simp_TF_conj_False_r = @{lemma "Q = False ==> (P & Q) = False" by auto};
    2.41 -val simp_TF_disj_True_l  = @{lemma "P = True ==> (P | Q) = True" by auto};
    2.42 -val simp_TF_disj_True_r  = @{lemma "Q = True ==> (P | Q) = True" by auto};
    2.43 -val simp_TF_disj_False_l = @{lemma "[| P = False; Q = Q' |] ==> (P | Q) = Q'" by auto};
    2.44 -val simp_TF_disj_False_r = @{lemma "[| P = P'; Q = False |] ==> (P | Q) = P'" by auto};
    2.45 +val simp_TF_conj_True_l  = @{lemma "[| P = True; Q = Q' |] ==> (P \<and> Q) = Q'" by auto};
    2.46 +val simp_TF_conj_True_r  = @{lemma "[| P = P'; Q = True |] ==> (P \<and> Q) = P'" by auto};
    2.47 +val simp_TF_conj_False_l = @{lemma "P = False ==> (P \<and> Q) = False" by auto};
    2.48 +val simp_TF_conj_False_r = @{lemma "Q = False ==> (P \<and> Q) = False" by auto};
    2.49 +val simp_TF_disj_True_l  = @{lemma "P = True ==> (P \<or> Q) = True" by auto};
    2.50 +val simp_TF_disj_True_r  = @{lemma "Q = True ==> (P \<or> Q) = True" by auto};
    2.51 +val simp_TF_disj_False_l = @{lemma "[| P = False; Q = Q' |] ==> (P \<or> Q) = Q'" by auto};
    2.52 +val simp_TF_disj_False_r = @{lemma "[| P = P'; Q = False |] ==> (P \<or> Q) = P'" by auto};
    2.53  
    2.54 -val make_cnf_disj_conj_l = @{lemma "[| (P | R) = PR; (Q | R) = QR |] ==> ((P & Q) | R) = (PR & QR)" by auto};
    2.55 -val make_cnf_disj_conj_r = @{lemma "[| (P | Q) = PQ; (P | R) = PR |] ==> (P | (Q & R)) = (PQ & PR)" by auto};
    2.56 +val make_cnf_disj_conj_l = @{lemma "[| (P \<or> R) = PR; (Q \<or> R) = QR |] ==> ((P \<and> Q) \<or> R) = (PR \<and> QR)" by auto};
    2.57 +val make_cnf_disj_conj_r = @{lemma "[| (P \<or> Q) = PQ; (P \<or> R) = PR |] ==> (P \<or> (Q \<and> R)) = (PQ \<and> PR)" by auto};
    2.58  
    2.59 -val make_cnfx_disj_ex_l  = @{lemma "((EX (x::bool). P x) | Q) = (EX x. P x | Q)" by auto};
    2.60 -val make_cnfx_disj_ex_r  = @{lemma "(P | (EX (x::bool). Q x)) = (EX x. P | Q x)" by auto};
    2.61 -val make_cnfx_newlit     = @{lemma "(P | Q) = (EX x. (P | x) & (Q | ~x))" by auto};
    2.62 -val make_cnfx_ex_cong    = @{lemma "(ALL (x::bool). P x = Q x) ==> (EX x. P x) = (EX x. Q x)" by auto};
    2.63 +val make_cnfx_disj_ex_l  = @{lemma "((EX (x::bool). P x) \<or> Q) = (EX x. P x \<or> Q)" by auto};
    2.64 +val make_cnfx_disj_ex_r  = @{lemma "(P \<or> (EX (x::bool). Q x)) = (EX x. P \<or> Q x)" by auto};
    2.65 +val make_cnfx_newlit     = @{lemma "(P \<or> Q) = (EX x. (P \<or> x) \<and> (Q \<or> ~x))" by auto};
    2.66 +val make_cnfx_ex_cong    = @{lemma "(ALL (x::bool). P x = Q x) \<Longrightarrow> (EX x. P x) = (EX x. Q x)" by auto};
    2.67  
    2.68  val weakening_thm        = @{lemma "[| P; Q |] ==> Q" by auto};
    2.69