more symbols;
authorwenzelm
Sun Nov 26 21:08:32 2017 +0100 (3 months ago)
changeset 670911393c2340eec
parent 67090 0ec94bb9cec4
child 67092 d7b3876d3ab1
more symbols;
src/HOL/Algebra/AbelCoset.thy
src/HOL/Algebra/Bij.thy
src/HOL/Algebra/Complete_Lattice.thy
src/HOL/Algebra/Congruence.thy
src/HOL/Algebra/Coset.thy
src/HOL/Algebra/FiniteProduct.thy
src/HOL/Algebra/Group.thy
src/HOL/Algebra/IntRing.thy
src/HOL/Algebra/Lattice.thy
src/HOL/Algebra/Order.thy
src/HOL/Algebra/Ring.thy
src/HOL/Algebra/UnivPoly.thy
src/HOL/BNF_Cardinal_Order_Relation.thy
src/HOL/BNF_Composition.thy
src/HOL/BNF_Def.thy
src/HOL/BNF_Fixpoint_Base.thy
src/HOL/BNF_Greatest_Fixpoint.thy
src/HOL/BNF_Least_Fixpoint.thy
src/HOL/BNF_Wellorder_Constructions.thy
src/HOL/BNF_Wellorder_Embedding.thy
src/HOL/Basic_BNFs.thy
src/HOL/Computational_Algebra/Polynomial.thy
src/HOL/Computational_Algebra/Primes.thy
src/HOL/Conditionally_Complete_Lattices.thy
src/HOL/Divides.thy
src/HOL/Enum.thy
src/HOL/Fields.thy
src/HOL/Groebner_Basis.thy
src/HOL/HOL.thy
src/HOL/Library/BNF_Corec.thy
src/HOL/Library/Cardinality.thy
src/HOL/Library/DAList.thy
src/HOL/Library/Diagonal_Subsequence.thy
src/HOL/Library/Extended.thy
src/HOL/Library/Extended_Nat.thy
src/HOL/Library/Extended_Real.thy
src/HOL/Library/FSet.thy
src/HOL/Library/Old_Datatype.thy
src/HOL/Library/Old_Recdef.thy
src/HOL/Library/Option_ord.thy
src/HOL/Library/Predicate_Compile_Alternative_Defs.thy
src/HOL/Library/Product_Order.thy
src/HOL/Library/RBT_Set.thy
src/HOL/Library/Ramsey.thy
src/HOL/Library/Stream.thy
src/HOL/Library/Sublist.thy
src/HOL/Library/Sum_of_Squares/sum_of_squares.ML
src/HOL/Library/While_Combinator.thy
src/HOL/Library/positivstellensatz.ML
src/HOL/Limited_Sequence.thy
src/HOL/Limits.thy
src/HOL/List.thy
src/HOL/MacLaurin.thy
src/HOL/Map.thy
src/HOL/Meson.thy
src/HOL/Nat.thy
src/HOL/Nitpick.thy
src/HOL/Nonstandard_Analysis/HTranscendental.thy
src/HOL/Nonstandard_Analysis/HyperNat.thy
src/HOL/Nonstandard_Analysis/NSCA.thy
src/HOL/Nonstandard_Analysis/NatStar.thy
src/HOL/Number_Theory/Euler_Criterion.thy
src/HOL/Number_Theory/Gauss.thy
src/HOL/Number_Theory/Pocklington.thy
src/HOL/Number_Theory/Residues.thy
src/HOL/Numeral_Simprocs.thy
src/HOL/Option.thy
src/HOL/Orderings.thy
src/HOL/Partial_Function.thy
src/HOL/Predicate.thy
src/HOL/Presburger.thy
src/HOL/Quickcheck_Exhaustive.thy
src/HOL/Quickcheck_Narrowing.thy
src/HOL/Quotient.thy
src/HOL/Random_Pred.thy
src/HOL/Random_Sequence.thy
src/HOL/Record.thy
src/HOL/SMT.thy
src/HOL/Set.thy
src/HOL/Set_Interval.thy
src/HOL/String.thy
src/HOL/Tools/ATP/atp_problem_generate.ML
src/HOL/Tools/ATP/atp_proof_reconstruct.ML
src/HOL/Tools/Argo/argo_real.ML
src/HOL/Tools/Argo/argo_tactic.ML
src/HOL/Tools/BNF/bnf_comp.ML
src/HOL/Tools/BNF/bnf_fp_n2m_tactics.ML
src/HOL/Tools/BNF/bnf_fp_util.ML
src/HOL/Tools/BNF/bnf_gfp.ML
src/HOL/Tools/BNF/bnf_gfp_tactics.ML
src/HOL/Tools/BNF/bnf_lfp.ML
src/HOL/Tools/BNF/bnf_lift.ML
src/HOL/Tools/Meson/meson.ML
src/HOL/Tools/Meson/meson_clausify.ML
src/HOL/Tools/Metis/metis_reconstruct.ML
src/HOL/Tools/Old_Datatype/old_datatype.ML
src/HOL/Tools/Quotient/quotient_tacs.ML
src/HOL/Tools/SMT/conj_disj_perm.ML
src/HOL/Tools/SMT/z3_replay.ML
src/HOL/Tools/SMT/z3_replay_methods.ML
src/HOL/Tools/cnf.ML
src/HOL/Tools/inductive.ML
src/HOL/Tools/rewrite_hol_proof.ML
src/HOL/Tools/sat.ML
src/HOL/Transcendental.thy
     1.1 --- a/src/HOL/Algebra/AbelCoset.thy	Sun Nov 26 13:19:52 2017 +0100
     1.2 +++ b/src/HOL/Algebra/AbelCoset.thy	Sun Nov 26 21:08:32 2017 +0100
     1.3 @@ -290,7 +290,7 @@
     1.4  text\<open>Alternative characterization of normal subgroups\<close>
     1.5  lemma (in abelian_group) a_normal_inv_iff:
     1.6       "(N \<lhd> \<lparr>carrier = carrier G, mult = add G, one = zero G\<rparr>) = 
     1.7 -      (subgroup N \<lparr>carrier = carrier G, mult = add G, one = zero G\<rparr> & (\<forall>x \<in> carrier G. \<forall>h \<in> N. x \<oplus> h \<oplus> (\<ominus> x) \<in> N))"
     1.8 +      (subgroup N \<lparr>carrier = carrier G, mult = add G, one = zero G\<rparr> \<and> (\<forall>x \<in> carrier G. \<forall>h \<in> N. x \<oplus> h \<oplus> (\<ominus> x) \<in> N))"
     1.9        (is "_ = ?rhs")
    1.10  by (rule group.normal_inv_iff [OF a_group,
    1.11      folded a_inv_def, simplified monoid_record_simps])
     2.1 --- a/src/HOL/Algebra/Bij.thy	Sun Nov 26 13:19:52 2017 +0100
     2.2 +++ b/src/HOL/Algebra/Bij.thy	Sun Nov 26 21:08:32 2017 +0100
     2.3 @@ -67,7 +67,7 @@
     2.4   shows "\<lbrakk>h \<in> Bij S;  g \<in> S \<rightarrow> S \<rightarrow> S;  x \<in> S;  y \<in> S\<rbrakk>
     2.5          \<Longrightarrow> inv_into S h (g x y) = g (inv_into S h x) (inv_into S h y)"
     2.6  apply (simp add: Bij_def bij_betw_def)
     2.7 -apply (subgoal_tac "\<exists>x'\<in>S. \<exists>y'\<in>S. x = h x' & y = h y'", clarify)
     2.8 +apply (subgoal_tac "\<exists>x'\<in>S. \<exists>y'\<in>S. x = h x' \<and> y = h y'", clarify)
     2.9   apply (simp add: eq [symmetric] inv_f_f funcset_mem [THEN funcset_mem], blast)
    2.10  done
    2.11  
     3.1 --- a/src/HOL/Algebra/Complete_Lattice.thy	Sun Nov 26 13:19:52 2017 +0100
     3.2 +++ b/src/HOL/Algebra/Complete_Lattice.thy	Sun Nov 26 21:08:32 2017 +0100
     3.3 @@ -14,9 +14,9 @@
     3.4  
     3.5  locale weak_complete_lattice = weak_partial_order +
     3.6    assumes sup_exists:
     3.7 -    "[| A \<subseteq> carrier L |] ==> EX s. least L s (Upper L A)"
     3.8 +    "[| A \<subseteq> carrier L |] ==> \<exists>s. least L s (Upper L A)"
     3.9      and inf_exists:
    3.10 -    "[| A \<subseteq> carrier L |] ==> EX i. greatest L i (Lower L A)"
    3.11 +    "[| A \<subseteq> carrier L |] ==> \<exists>i. greatest L i (Lower L A)"
    3.12  
    3.13  sublocale weak_complete_lattice \<subseteq> weak_lattice
    3.14  proof
    3.15 @@ -32,9 +32,9 @@
    3.16  
    3.17  lemma (in weak_partial_order) weak_complete_latticeI:
    3.18    assumes sup_exists:
    3.19 -    "!!A. [| A \<subseteq> carrier L |] ==> EX s. least L s (Upper L A)"
    3.20 +    "!!A. [| A \<subseteq> carrier L |] ==> \<exists>s. least L s (Upper L A)"
    3.21      and inf_exists:
    3.22 -    "!!A. [| A \<subseteq> carrier L |] ==> EX i. greatest L i (Lower L A)"
    3.23 +    "!!A. [| A \<subseteq> carrier L |] ==> \<exists>i. greatest L i (Lower L A)"
    3.24    shows "weak_complete_lattice L"
    3.25    by standard (auto intro: sup_exists inf_exists)
    3.26  
    3.27 @@ -111,9 +111,9 @@
    3.28  qed
    3.29  
    3.30  theorem (in weak_partial_order) weak_complete_lattice_criterion1:
    3.31 -  assumes top_exists: "EX g. greatest L g (carrier L)"
    3.32 +  assumes top_exists: "\<exists>g. greatest L g (carrier L)"
    3.33      and inf_exists:
    3.34 -      "!!A. [| A \<subseteq> carrier L; A ~= {} |] ==> EX i. greatest L i (Lower L A)"
    3.35 +      "\<And>A. [| A \<subseteq> carrier L; A \<noteq> {} |] ==> \<exists>i. greatest L i (Lower L A)"
    3.36    shows "weak_complete_lattice L"
    3.37  proof (rule weak_complete_latticeI)
    3.38    from top_exists obtain top where top: "greatest L top (carrier L)" ..
    3.39 @@ -121,7 +121,7 @@
    3.40    assume L: "A \<subseteq> carrier L"
    3.41    let ?B = "Upper L A"
    3.42    from L top have "top \<in> ?B" by (fast intro!: Upper_memI intro: greatest_le)
    3.43 -  then have B_non_empty: "?B ~= {}" by fast
    3.44 +  then have B_non_empty: "?B \<noteq> {}" by fast
    3.45    have B_L: "?B \<subseteq> carrier L" by simp
    3.46    from inf_exists [OF B_L B_non_empty]
    3.47    obtain b where b_inf_B: "greatest L b (Lower L ?B)" ..
    3.48 @@ -139,11 +139,11 @@
    3.49   apply (rule L)
    3.50  apply (rule greatest_closed [OF b_inf_B])
    3.51  done
    3.52 -  then show "EX s. least L s (Upper L A)" ..
    3.53 +  then show "\<exists>s. least L s (Upper L A)" ..
    3.54  next
    3.55    fix A
    3.56    assume L: "A \<subseteq> carrier L"
    3.57 -  show "EX i. greatest L i (Lower L A)"
    3.58 +  show "\<exists>i. greatest L i (Lower L A)"
    3.59    proof (cases "A = {}")
    3.60      case True then show ?thesis
    3.61        by (simp add: top_exists)
    3.62 @@ -547,9 +547,9 @@
    3.63  
    3.64  locale complete_lattice = partial_order +
    3.65    assumes sup_exists:
    3.66 -    "[| A \<subseteq> carrier L |] ==> EX s. least L s (Upper L A)"
    3.67 +    "[| A \<subseteq> carrier L |] ==> \<exists>s. least L s (Upper L A)"
    3.68      and inf_exists:
    3.69 -    "[| A \<subseteq> carrier L |] ==> EX i. greatest L i (Lower L A)"
    3.70 +    "[| A \<subseteq> carrier L |] ==> \<exists>i. greatest L i (Lower L A)"
    3.71  
    3.72  sublocale complete_lattice \<subseteq> lattice
    3.73  proof
    3.74 @@ -578,16 +578,16 @@
    3.75  
    3.76  lemma (in partial_order) complete_latticeI:
    3.77    assumes sup_exists:
    3.78 -    "!!A. [| A \<subseteq> carrier L |] ==> EX s. least L s (Upper L A)"
    3.79 +    "!!A. [| A \<subseteq> carrier L |] ==> \<exists>s. least L s (Upper L A)"
    3.80      and inf_exists:
    3.81 -    "!!A. [| A \<subseteq> carrier L |] ==> EX i. greatest L i (Lower L A)"
    3.82 +    "!!A. [| A \<subseteq> carrier L |] ==> \<exists>i. greatest L i (Lower L A)"
    3.83    shows "complete_lattice L"
    3.84    by standard (auto intro: sup_exists inf_exists)
    3.85  
    3.86  theorem (in partial_order) complete_lattice_criterion1:
    3.87 -  assumes top_exists: "EX g. greatest L g (carrier L)"
    3.88 +  assumes top_exists: "\<exists>g. greatest L g (carrier L)"
    3.89      and inf_exists:
    3.90 -      "!!A. [| A \<subseteq> carrier L; A ~= {} |] ==> EX i. greatest L i (Lower L A)"
    3.91 +      "!!A. [| A \<subseteq> carrier L; A \<noteq> {} |] ==> \<exists>i. greatest L i (Lower L A)"
    3.92    shows "complete_lattice L"
    3.93  proof (rule complete_latticeI)
    3.94    from top_exists obtain top where top: "greatest L top (carrier L)" ..
    3.95 @@ -595,7 +595,7 @@
    3.96    assume L: "A \<subseteq> carrier L"
    3.97    let ?B = "Upper L A"
    3.98    from L top have "top \<in> ?B" by (fast intro!: Upper_memI intro: greatest_le)
    3.99 -  then have B_non_empty: "?B ~= {}" by fast
   3.100 +  then have B_non_empty: "?B \<noteq> {}" by fast
   3.101    have B_L: "?B \<subseteq> carrier L" by simp
   3.102    from inf_exists [OF B_L B_non_empty]
   3.103    obtain b where b_inf_B: "greatest L b (Lower L ?B)" ..
   3.104 @@ -613,11 +613,11 @@
   3.105   apply (rule L)
   3.106  apply (rule greatest_closed [OF b_inf_B])
   3.107  done
   3.108 -  then show "EX s. least L s (Upper L A)" ..
   3.109 +  then show "\<exists>s. least L s (Upper L A)" ..
   3.110  next
   3.111    fix A
   3.112    assume L: "A \<subseteq> carrier L"
   3.113 -  show "EX i. greatest L i (Lower L A)"
   3.114 +  show "\<exists>i. greatest L i (Lower L A)"
   3.115    proof (cases "A = {}")
   3.116      case True then show ?thesis
   3.117        by (simp add: top_exists)
   3.118 @@ -1181,7 +1181,7 @@
   3.119    assume "B \<subseteq> carrier ?L"
   3.120    then have "least ?L (\<Union> B) (Upper ?L B)"
   3.121      by (fastforce intro!: least_UpperI simp: Upper_def)
   3.122 -  then show "EX s. least ?L s (Upper ?L B)" ..
   3.123 +  then show "\<exists>s. least ?L s (Upper ?L B)" ..
   3.124  next
   3.125    fix B
   3.126    assume "B \<subseteq> carrier ?L"
   3.127 @@ -1189,7 +1189,7 @@
   3.128      txt \<open>@{term "\<Inter> B"} is not the infimum of @{term B}:
   3.129        @{term "\<Inter> {} = UNIV"} which is in general bigger than @{term "A"}! \<close>
   3.130      by (fastforce intro!: greatest_LowerI simp: Lower_def)
   3.131 -  then show "EX i. greatest ?L i (Lower ?L B)" ..
   3.132 +  then show "\<exists>i. greatest ?L i (Lower ?L B)" ..
   3.133  qed
   3.134  
   3.135  text \<open>Another example, that of the lattice of subgroups of a group,
     4.1 --- a/src/HOL/Algebra/Congruence.thy	Sun Nov 26 13:19:52 2017 +0100
     4.2 +++ b/src/HOL/Algebra/Congruence.thy	Sun Nov 26 21:08:32 2017 +0100
     4.3 @@ -52,15 +52,15 @@
     4.4  
     4.5  abbreviation
     4.6    not_eq :: "_ \<Rightarrow> 'a \<Rightarrow> 'a \<Rightarrow> bool" (infixl ".\<noteq>\<index>" 50)
     4.7 -  where "x .\<noteq>\<^bsub>S\<^esub> y == ~(x .=\<^bsub>S\<^esub> y)"
     4.8 +  where "x .\<noteq>\<^bsub>S\<^esub> y \<equiv> \<not>(x .=\<^bsub>S\<^esub> y)"
     4.9  
    4.10  abbreviation
    4.11    not_elem :: "_ \<Rightarrow> 'a \<Rightarrow> 'a set \<Rightarrow> bool" (infixl ".\<notin>\<index>" 50)
    4.12 -  where "x .\<notin>\<^bsub>S\<^esub> A == ~(x .\<in>\<^bsub>S\<^esub> A)"
    4.13 +  where "x .\<notin>\<^bsub>S\<^esub> A \<equiv> \<not>(x .\<in>\<^bsub>S\<^esub> A)"
    4.14  
    4.15  abbreviation
    4.16    set_not_eq :: "_ \<Rightarrow> 'a set \<Rightarrow> 'a set \<Rightarrow> bool" (infixl "{.\<noteq>}\<index>" 50)
    4.17 -  where "A {.\<noteq>}\<^bsub>S\<^esub> B == ~(A {.=}\<^bsub>S\<^esub> B)"
    4.18 +  where "A {.\<noteq>}\<^bsub>S\<^esub> B \<equiv> \<not>(A {.=}\<^bsub>S\<^esub> B)"
    4.19  
    4.20  locale equivalence =
    4.21    fixes S (structure)
     5.1 --- a/src/HOL/Algebra/Coset.thy	Sun Nov 26 13:19:52 2017 +0100
     5.2 +++ b/src/HOL/Algebra/Coset.thy	Sun Nov 26 21:08:32 2017 +0100
     5.3 @@ -410,7 +410,7 @@
     5.4  text\<open>Alternative characterization of normal subgroups\<close>
     5.5  lemma (in group) normal_inv_iff:
     5.6       "(N \<lhd> G) = 
     5.7 -      (subgroup N G & (\<forall>x \<in> carrier G. \<forall>h \<in> N. x \<otimes> h \<otimes> (inv x) \<in> N))"
     5.8 +      (subgroup N G \<and> (\<forall>x \<in> carrier G. \<forall>h \<in> N. x \<otimes> h \<otimes> (inv x) \<in> N))"
     5.9        (is "_ = ?rhs")
    5.10  proof
    5.11    assume N: "N \<lhd> G"
    5.12 @@ -476,7 +476,7 @@
    5.13    assume "\<exists>h\<in>H. y = x \<otimes> h"
    5.14      and x: "x \<in> carrier G"
    5.15      and sb: "subgroup H G"
    5.16 -  then obtain h' where h': "h' \<in> H & x \<otimes> h' = y" by blast
    5.17 +  then obtain h' where h': "h' \<in> H \<and> x \<otimes> h' = y" by blast
    5.18    show "\<exists>h\<in>H. x = y \<otimes> h"
    5.19    proof
    5.20      show "x = y \<otimes> inv h'" using h' x sb
    5.21 @@ -593,7 +593,7 @@
    5.22  
    5.23  definition
    5.24    r_congruent :: "[('a,'b)monoid_scheme, 'a set] \<Rightarrow> ('a*'a)set"  ("rcong\<index> _")
    5.25 -  where "rcong\<^bsub>G\<^esub> H = {(x,y). x \<in> carrier G & y \<in> carrier G & inv\<^bsub>G\<^esub> x \<otimes>\<^bsub>G\<^esub> y \<in> H}"
    5.26 +  where "rcong\<^bsub>G\<^esub> H = {(x,y). x \<in> carrier G \<and> y \<in> carrier G \<and> inv\<^bsub>G\<^esub> x \<otimes>\<^bsub>G\<^esub> y \<in> H}"
    5.27  
    5.28  
    5.29  lemma (in subgroup) equiv_rcong:
    5.30 @@ -784,7 +784,7 @@
    5.31  lemma (in group) inj_on_f:
    5.32      "\<lbrakk>H \<subseteq> carrier G;  a \<in> carrier G\<rbrakk> \<Longrightarrow> inj_on (\<lambda>y. y \<otimes> inv a) (H #> a)"
    5.33  apply (rule inj_onI)
    5.34 -apply (subgoal_tac "x \<in> carrier G & y \<in> carrier G")
    5.35 +apply (subgoal_tac "x \<in> carrier G \<and> y \<in> carrier G")
    5.36   prefer 2 apply (blast intro: r_coset_subset_G [THEN subsetD])
    5.37  apply (simp add: subsetD)
    5.38  done
    5.39 @@ -898,7 +898,7 @@
    5.40  definition
    5.41    kernel :: "('a, 'm) monoid_scheme \<Rightarrow> ('b, 'n) monoid_scheme \<Rightarrow>  ('a \<Rightarrow> 'b) \<Rightarrow> 'a set"
    5.42      \<comment>\<open>the kernel of a homomorphism\<close>
    5.43 -  where "kernel G H h = {x. x \<in> carrier G & h x = \<one>\<^bsub>H\<^esub>}"
    5.44 +  where "kernel G H h = {x. x \<in> carrier G \<and> h x = \<one>\<^bsub>H\<^esub>}"
    5.45  
    5.46  lemma (in group_hom) subgroup_kernel: "subgroup (kernel G H h) G"
    5.47  apply (rule subgroup.intro) 
     6.1 --- a/src/HOL/Algebra/FiniteProduct.thy	Sun Nov 26 13:19:52 2017 +0100
     6.2 +++ b/src/HOL/Algebra/FiniteProduct.thy	Sun Nov 26 21:08:32 2017 +0100
     6.3 @@ -48,7 +48,7 @@
     6.4  
     6.5  lemma finite_imp_foldSetD:
     6.6    "[| finite A; e \<in> D; !!x y. [| x \<in> A; y \<in> D |] ==> f x y \<in> D |] ==>
     6.7 -   EX x. (A, x) \<in> foldSetD D f e"
     6.8 +   \<exists>x. (A, x) \<in> foldSetD D f e"
     6.9  proof (induct set: finite)
    6.10    case empty then show ?case by auto
    6.11  next
    6.12 @@ -89,7 +89,7 @@
    6.13    by (induct set: foldSetD) auto
    6.14  
    6.15  lemma (in LCD) finite_imp_foldSetD:
    6.16 -  "[| finite A; A \<subseteq> B; e \<in> D |] ==> EX x. (A, x) \<in> foldSetD D f e"
    6.17 +  "[| finite A; A \<subseteq> B; e \<in> D |] ==> \<exists>x. (A, x) \<in> foldSetD D f e"
    6.18  proof (induct set: finite)
    6.19    case empty then show ?case by auto
    6.20  next
    6.21 @@ -102,8 +102,8 @@
    6.22  qed
    6.23  
    6.24  lemma (in LCD) foldSetD_determ_aux:
    6.25 -  "e \<in> D ==> \<forall>A x. A \<subseteq> B & card A < n --> (A, x) \<in> foldSetD D f e -->
    6.26 -    (\<forall>y. (A, y) \<in> foldSetD D f e --> y = x)"
    6.27 +  "e \<in> D \<Longrightarrow> \<forall>A x. A \<subseteq> B \<and> card A < n \<longrightarrow> (A, x) \<in> foldSetD D f e \<longrightarrow>
    6.28 +    (\<forall>y. (A, y) \<in> foldSetD D f e \<longrightarrow> y = x)"
    6.29    apply (induct n)
    6.30     apply (auto simp add: less_Suc_eq) (* slow *)
    6.31    apply (erule foldSetD.cases)
    6.32 @@ -120,7 +120,7 @@
    6.33      prefer 2 apply (blast elim!: equalityE)
    6.34     apply blast
    6.35    txt \<open>case @{prop "xa \<notin> xb"}.\<close>
    6.36 -  apply (subgoal_tac "Aa - {xb} = Ab - {xa} & xb \<in> Aa & xa \<in> Ab")
    6.37 +  apply (subgoal_tac "Aa - {xb} = Ab - {xa} \<and> xb \<in> Aa \<and> xa \<in> Ab")
    6.38     prefer 2 apply (blast elim!: equalityE)
    6.39    apply clarify
    6.40    apply (subgoal_tac "Aa = insert xb Ab - {xa}")
    6.41 @@ -166,9 +166,9 @@
    6.42    by (unfold foldD_def) blast
    6.43  
    6.44  lemma (in LCD) foldD_insert_aux:
    6.45 -  "[| x ~: A; x \<in> B; e \<in> D; A \<subseteq> B |] ==>
    6.46 +  "[| x \<notin> A; x \<in> B; e \<in> D; A \<subseteq> B |] ==>
    6.47      ((insert x A, v) \<in> foldSetD D f e) =
    6.48 -    (EX y. (A, y) \<in> foldSetD D f e & v = f x y)"
    6.49 +    (\<exists>y. (A, y) \<in> foldSetD D f e \<and> v = f x y)"
    6.50    apply auto
    6.51    apply (rule_tac A1 = A in finite_imp_foldSetD [THEN exE])
    6.52       apply (fastforce dest: foldSetD_imp_finite)
    6.53 @@ -291,7 +291,7 @@
    6.54    finprod :: "[('b, 'm) monoid_scheme, 'a => 'b, 'a set] => 'b"
    6.55    where "finprod G f A =
    6.56     (if finite A
    6.57 -    then foldD (carrier G) (mult G o f) \<one>\<^bsub>G\<^esub> A
    6.58 +    then foldD (carrier G) (mult G \<circ> f) \<one>\<^bsub>G\<^esub> A
    6.59      else \<one>\<^bsub>G\<^esub>)"
    6.60  
    6.61  syntax
    6.62 @@ -360,7 +360,7 @@
    6.63    by fast
    6.64  
    6.65  lemma funcset_Un_left [iff]:
    6.66 -  "(f \<in> A Un B \<rightarrow> C) = (f \<in> A \<rightarrow> C & f \<in> B \<rightarrow> C)"
    6.67 +  "(f \<in> A Un B \<rightarrow> C) = (f \<in> A \<rightarrow> C \<and> f \<in> B \<rightarrow> C)"
    6.68    by fast
    6.69  
    6.70  lemma finprod_Un_Int:
     7.1 --- a/src/HOL/Algebra/Group.thy	Sun Nov 26 13:19:52 2017 +0100
     7.2 +++ b/src/HOL/Algebra/Group.thy	Sun Nov 26 21:08:32 2017 +0100
     7.3 @@ -22,12 +22,12 @@
     7.4  
     7.5  definition
     7.6    m_inv :: "('a, 'b) monoid_scheme => 'a => 'a" ("inv\<index> _" [81] 80)
     7.7 -  where "inv\<^bsub>G\<^esub> x = (THE y. y \<in> carrier G & x \<otimes>\<^bsub>G\<^esub> y = \<one>\<^bsub>G\<^esub> & y \<otimes>\<^bsub>G\<^esub> x = \<one>\<^bsub>G\<^esub>)"
     7.8 +  where "inv\<^bsub>G\<^esub> x = (THE y. y \<in> carrier G \<and> x \<otimes>\<^bsub>G\<^esub> y = \<one>\<^bsub>G\<^esub> \<and> y \<otimes>\<^bsub>G\<^esub> x = \<one>\<^bsub>G\<^esub>)"
     7.9  
    7.10  definition
    7.11    Units :: "_ => 'a set"
    7.12    \<comment>\<open>The set of invertible elements\<close>
    7.13 -  where "Units G = {y. y \<in> carrier G & (\<exists>x \<in> carrier G. x \<otimes>\<^bsub>G\<^esub> y = \<one>\<^bsub>G\<^esub> & y \<otimes>\<^bsub>G\<^esub> x = \<one>\<^bsub>G\<^esub>)}"
    7.14 +  where "Units G = {y. y \<in> carrier G \<and> (\<exists>x \<in> carrier G. x \<otimes>\<^bsub>G\<^esub> y = \<one>\<^bsub>G\<^esub> \<and> y \<otimes>\<^bsub>G\<^esub> x = \<one>\<^bsub>G\<^esub>)}"
    7.15  
    7.16  consts
    7.17    pow :: "[('a, 'm) monoid_scheme, 'a, 'b::semiring_1] => 'a"  (infixr "'(^')\<index>" 75)
    7.18 @@ -277,7 +277,7 @@
    7.19      with x xG show "x \<otimes> \<one> = x" by simp
    7.20    qed
    7.21    have inv_ex:
    7.22 -    "!!x. x \<in> carrier G ==> \<exists>y \<in> carrier G. y \<otimes> x = \<one> & x \<otimes> y = \<one>"
    7.23 +    "\<And>x. x \<in> carrier G \<Longrightarrow> \<exists>y \<in> carrier G. y \<otimes> x = \<one> \<and> x \<otimes> y = \<one>"
    7.24    proof -
    7.25      fix x
    7.26      assume x: "x \<in> carrier G"
    7.27 @@ -287,10 +287,10 @@
    7.28        by (simp add: m_assoc [symmetric] l_inv r_one)
    7.29      with x y have r_inv: "x \<otimes> y = \<one>"
    7.30        by simp
    7.31 -    from x y show "\<exists>y \<in> carrier G. y \<otimes> x = \<one> & x \<otimes> y = \<one>"
    7.32 +    from x y show "\<exists>y \<in> carrier G. y \<otimes> x = \<one> \<and> x \<otimes> y = \<one>"
    7.33        by (fast intro: l_inv r_inv)
    7.34    qed
    7.35 -  then have carrier_subset_Units: "carrier G <= Units G"
    7.36 +  then have carrier_subset_Units: "carrier G \<subseteq> Units G"
    7.37      by (unfold Units_def) fast
    7.38    show ?thesis
    7.39      by standard (auto simp: r_one m_assoc carrier_subset_Units)
    7.40 @@ -305,9 +305,9 @@
    7.41  lemma (in group) Units_eq [simp]:
    7.42    "Units G = carrier G"
    7.43  proof
    7.44 -  show "Units G <= carrier G" by fast
    7.45 +  show "Units G \<subseteq> carrier G" by fast
    7.46  next
    7.47 -  show "carrier G <= Units G" by (rule Units)
    7.48 +  show "carrier G \<subseteq> Units G" by (rule Units)
    7.49  qed
    7.50  
    7.51  lemma (in group) inv_closed [intro, simp]:
    7.52 @@ -510,13 +510,13 @@
    7.53    monoid.l_one [simp] monoid.r_one [simp] group.inv_inv [simp]
    7.54  
    7.55  lemma subgroup_nonempty:
    7.56 -  "~ subgroup {} G"
    7.57 +  "\<not> subgroup {} G"
    7.58    by (blast dest: subgroup.one_closed)
    7.59  
    7.60  lemma (in subgroup) finite_imp_card_positive:
    7.61    "finite (carrier G) ==> 0 < card H"
    7.62  proof (rule classical)
    7.63 -  assume "finite (carrier G)" and a: "~ 0 < card H"
    7.64 +  assume "finite (carrier G)" and a: "\<not> 0 < card H"
    7.65    then have "finite H" by (blast intro: finite_subset [OF subset])
    7.66    with is_subgroup a have "subgroup {} G" by simp
    7.67    with subgroup_nonempty show ?thesis by contradiction
    7.68 @@ -591,7 +591,7 @@
    7.69  definition
    7.70    hom :: "_ => _ => ('a => 'b) set" where
    7.71    "hom G H =
    7.72 -    {h. h \<in> carrier G \<rightarrow> carrier H &
    7.73 +    {h. h \<in> carrier G \<rightarrow> carrier H \<and>
    7.74        (\<forall>x \<in> carrier G. \<forall>y \<in> carrier G. h (x \<otimes>\<^bsub>G\<^esub> y) = h x \<otimes>\<^bsub>H\<^esub> h y)}"
    7.75  
    7.76  lemma (in group) hom_compose:
    7.77 @@ -600,9 +600,9 @@
    7.78  
    7.79  definition
    7.80    iso :: "_ => _ => ('a => 'b) set" (infixr "\<cong>" 60)
    7.81 -  where "G \<cong> H = {h. h \<in> hom G H & bij_betw h (carrier G) (carrier H)}"
    7.82 +  where "G \<cong> H = {h. h \<in> hom G H \<and> bij_betw h (carrier G) (carrier H)}"
    7.83  
    7.84 -lemma iso_refl: "(%x. x) \<in> G \<cong> G"
    7.85 +lemma iso_refl: "(\<lambda>x. x) \<in> G \<cong> G"
    7.86  by (simp add: iso_def hom_def inj_on_def bij_betw_def Pi_def)
    7.87  
    7.88  lemma (in group) iso_sym:
    7.89 @@ -798,15 +798,15 @@
    7.90  done
    7.91  
    7.92  theorem (in group) subgroups_Inter:
    7.93 -  assumes subgr: "(!!H. H \<in> A ==> subgroup H G)"
    7.94 -    and not_empty: "A ~= {}"
    7.95 +  assumes subgr: "(\<And>H. H \<in> A \<Longrightarrow> subgroup H G)"
    7.96 +    and not_empty: "A \<noteq> {}"
    7.97    shows "subgroup (\<Inter>A) G"
    7.98  proof (rule subgroupI)
    7.99    from subgr [THEN subgroup.subset] and not_empty
   7.100    show "\<Inter>A \<subseteq> carrier G" by blast
   7.101  next
   7.102    from subgr [THEN subgroup.one_closed]
   7.103 -  show "\<Inter>A ~= {}" by blast
   7.104 +  show "\<Inter>A \<noteq> {}" by blast
   7.105  next
   7.106    fix x assume "x \<in> \<Inter>A"
   7.107    with subgr [THEN subgroup.m_inv_closed]
   7.108 @@ -828,7 +828,7 @@
   7.109    then show "\<exists>G. greatest ?L G (carrier ?L)" ..
   7.110  next
   7.111    fix A
   7.112 -  assume L: "A \<subseteq> carrier ?L" and non_empty: "A ~= {}"
   7.113 +  assume L: "A \<subseteq> carrier ?L" and non_empty: "A \<noteq> {}"
   7.114    then have Int_subgroup: "subgroup (\<Inter>A) G"
   7.115      by (fastforce intro: subgroups_Inter)
   7.116    have "greatest ?L (\<Inter>A) (Lower ?L A)" (is "greatest _ ?Int _")
     8.1 --- a/src/HOL/Algebra/IntRing.thy	Sun Nov 26 13:19:52 2017 +0100
     8.2 +++ b/src/HOL/Algebra/IntRing.thy	Sun Nov 26 21:08:32 2017 +0100
     8.3 @@ -166,7 +166,7 @@
     8.4    "x \<in> UNIV \<longleftrightarrow> True"
     8.5    "A \<subseteq> UNIV \<longleftrightarrow> True"
     8.6    "(\<forall>x \<in> UNIV. P x) \<longleftrightarrow> (\<forall>x. P x)"
     8.7 -  "(EX x : UNIV. P x) \<longleftrightarrow> (EX x. P x)"
     8.8 +  "(\<exists>x \<in> UNIV. P x) \<longleftrightarrow> (\<exists>x. P x)"
     8.9    "(True \<longrightarrow> Q) \<longleftrightarrow> Q"
    8.10    "(True \<Longrightarrow> PROP R) \<equiv> PROP R"
    8.11    by simp_all
    8.12 @@ -247,7 +247,7 @@
    8.13    then show "(\<exists>x. a = x * p) \<or> (\<exists>x. b = x * p)"
    8.14      by (metis dvd_def mult.commute)
    8.15  next
    8.16 -  assume "UNIV = {uu. EX x. uu = x * p}"
    8.17 +  assume "UNIV = {uu. \<exists>x. uu = x * p}"
    8.18    then obtain x where "1 = x * p" by best
    8.19    then have "\<bar>p * x\<bar> = 1" by (simp add: mult.commute)
    8.20    then show False using prime
     9.1 --- a/src/HOL/Algebra/Lattice.thy	Sun Nov 26 13:19:52 2017 +0100
     9.2 +++ b/src/HOL/Algebra/Lattice.thy	Sun Nov 26 21:08:32 2017 +0100
     9.3 @@ -98,11 +98,11 @@
     9.4  
     9.5  locale weak_upper_semilattice = weak_partial_order +
     9.6    assumes sup_of_two_exists:
     9.7 -    "[| x \<in> carrier L; y \<in> carrier L |] ==> EX s. least L s (Upper L {x, y})"
     9.8 +    "[| x \<in> carrier L; y \<in> carrier L |] ==> \<exists>s. least L s (Upper L {x, y})"
     9.9  
    9.10  locale weak_lower_semilattice = weak_partial_order +
    9.11    assumes inf_of_two_exists:
    9.12 -    "[| x \<in> carrier L; y \<in> carrier L |] ==> EX s. greatest L s (Lower L {x, y})"
    9.13 +    "[| x \<in> carrier L; y \<in> carrier L |] ==> \<exists>s. greatest L s (Lower L {x, y})"
    9.14  
    9.15  locale weak_lattice = weak_upper_semilattice + weak_lower_semilattice
    9.16  
    9.17 @@ -250,7 +250,7 @@
    9.18  qed
    9.19  
    9.20  lemma (in weak_upper_semilattice) finite_sup_least:
    9.21 -  "[| finite A; A \<subseteq> carrier L; A ~= {} |] ==> least L (\<Squnion>A) (Upper L A)"
    9.22 +  "[| finite A; A \<subseteq> carrier L; A \<noteq> {} |] ==> least L (\<Squnion>A) (Upper L A)"
    9.23  proof (induct set: finite)
    9.24    case empty
    9.25    then show ?case by simp
    9.26 @@ -284,7 +284,7 @@
    9.27  qed
    9.28  
    9.29  lemma (in weak_upper_semilattice) finite_sup_closed [simp]:
    9.30 -  "[| finite A; A \<subseteq> carrier L; A ~= {} |] ==> \<Squnion>A \<in> carrier L"
    9.31 +  "[| finite A; A \<subseteq> carrier L; A \<noteq> {} |] ==> \<Squnion>A \<in> carrier L"
    9.32  proof (induct set: finite)
    9.33    case empty then show ?case by simp
    9.34  next
    9.35 @@ -495,7 +495,7 @@
    9.36  qed
    9.37  
    9.38  lemma (in weak_lower_semilattice) finite_inf_greatest:
    9.39 -  "[| finite A; A \<subseteq> carrier L; A ~= {} |] ==> greatest L (\<Sqinter>A) (Lower L A)"
    9.40 +  "[| finite A; A \<subseteq> carrier L; A \<noteq> {} |] ==> greatest L (\<Sqinter>A) (Lower L A)"
    9.41  proof (induct set: finite)
    9.42    case empty then show ?case by simp
    9.43  next
    9.44 @@ -528,7 +528,7 @@
    9.45  qed
    9.46  
    9.47  lemma (in weak_lower_semilattice) finite_inf_closed [simp]:
    9.48 -  "[| finite A; A \<subseteq> carrier L; A ~= {} |] ==> \<Sqinter>A \<in> carrier L"
    9.49 +  "[| finite A; A \<subseteq> carrier L; A \<noteq> {} |] ==> \<Sqinter>A \<in> carrier L"
    9.50  proof (induct set: finite)
    9.51    case empty then show ?case by simp
    9.52  next
    9.53 @@ -611,7 +611,7 @@
    9.54  proof
    9.55    fix x y
    9.56    assume L: "x \<in> carrier L"  "y \<in> carrier L"
    9.57 -  show "EX s. least L s (Upper L {x, y})"
    9.58 +  show "\<exists>s. least L s (Upper L {x, y})"
    9.59    proof -
    9.60      note total L
    9.61      moreover
    9.62 @@ -631,7 +631,7 @@
    9.63  next
    9.64    fix x y
    9.65    assume L: "x \<in> carrier L"  "y \<in> carrier L"
    9.66 -  show "EX i. greatest L i (Lower L {x, y})"
    9.67 +  show "\<exists>i. greatest L i (Lower L {x, y})"
    9.68    proof -
    9.69      note total L
    9.70      moreover
    9.71 @@ -687,14 +687,14 @@
    9.72  
    9.73  locale upper_semilattice = partial_order +
    9.74    assumes sup_of_two_exists:
    9.75 -    "[| x \<in> carrier L; y \<in> carrier L |] ==> EX s. least L s (Upper L {x, y})"
    9.76 +    "[| x \<in> carrier L; y \<in> carrier L |] ==> \<exists>s. least L s (Upper L {x, y})"
    9.77  
    9.78  sublocale upper_semilattice \<subseteq> weak?: weak_upper_semilattice
    9.79    by unfold_locales (rule sup_of_two_exists)
    9.80  
    9.81  locale lower_semilattice = partial_order +
    9.82    assumes inf_of_two_exists:
    9.83 -    "[| x \<in> carrier L; y \<in> carrier L |] ==> EX s. greatest L s (Lower L {x, y})"
    9.84 +    "[| x \<in> carrier L; y \<in> carrier L |] ==> \<exists>s. greatest L s (Lower L {x, y})"
    9.85  
    9.86  sublocale lower_semilattice \<subseteq> weak?: weak_lower_semilattice
    9.87    by unfold_locales (rule inf_of_two_exists)
    10.1 --- a/src/HOL/Algebra/Order.thy	Sun Nov 26 13:19:52 2017 +0100
    10.2 +++ b/src/HOL/Algebra/Order.thy	Sun Nov 26 21:08:32 2017 +0100
    10.3 @@ -42,7 +42,7 @@
    10.4  
    10.5  definition
    10.6    lless :: "[_, 'a, 'a] => bool" (infixl "\<sqsubset>\<index>" 50)
    10.7 -  where "x \<sqsubset>\<^bsub>L\<^esub> y \<longleftrightarrow> x \<sqsubseteq>\<^bsub>L\<^esub> y & x .\<noteq>\<^bsub>L\<^esub> y"
    10.8 +  where "x \<sqsubset>\<^bsub>L\<^esub> y \<longleftrightarrow> x \<sqsubseteq>\<^bsub>L\<^esub> y \<and> x .\<noteq>\<^bsub>L\<^esub> y"
    10.9  
   10.10  
   10.11  subsubsection \<open>The order relation\<close>
   10.12 @@ -65,7 +65,7 @@
   10.13  
   10.14  lemma weak_llessI:
   10.15    fixes R (structure)
   10.16 -  assumes "x \<sqsubseteq> y" and "~(x .= y)"
   10.17 +  assumes "x \<sqsubseteq> y" and "\<not>(x .= y)"
   10.18    shows "x \<sqsubset> y"
   10.19    using assms unfolding lless_def by simp
   10.20  
   10.21 @@ -137,11 +137,11 @@
   10.22  
   10.23  definition
   10.24    Upper :: "[_, 'a set] => 'a set"
   10.25 -  where "Upper L A = {u. (ALL x. x \<in> A \<inter> carrier L --> x \<sqsubseteq>\<^bsub>L\<^esub> u)} \<inter> carrier L"
   10.26 +  where "Upper L A = {u. (\<forall>x. x \<in> A \<inter> carrier L \<longrightarrow> x \<sqsubseteq>\<^bsub>L\<^esub> u)} \<inter> carrier L"
   10.27  
   10.28  definition
   10.29    Lower :: "[_, 'a set] => 'a set"
   10.30 -  where "Lower L A = {l. (ALL x. x \<in> A \<inter> carrier L --> l \<sqsubseteq>\<^bsub>L\<^esub> x)} \<inter> carrier L"
   10.31 +  where "Lower L A = {l. (\<forall>x. x \<in> A \<inter> carrier L \<longrightarrow> l \<sqsubseteq>\<^bsub>L\<^esub> x)} \<inter> carrier L"
   10.32  
   10.33  lemma Upper_closed [intro!, simp]:
   10.34    "Upper L A \<subseteq> carrier L"
   10.35 @@ -320,11 +320,11 @@
   10.36  
   10.37  definition
   10.38    least :: "[_, 'a, 'a set] => bool"
   10.39 -  where "least L l A \<longleftrightarrow> A \<subseteq> carrier L & l \<in> A & (ALL x : A. l \<sqsubseteq>\<^bsub>L\<^esub> x)"
   10.40 +  where "least L l A \<longleftrightarrow> A \<subseteq> carrier L \<and> l \<in> A \<and> (\<forall>x\<in>A. l \<sqsubseteq>\<^bsub>L\<^esub> x)"
   10.41  
   10.42  definition
   10.43    greatest :: "[_, 'a, 'a set] => bool"
   10.44 -  where "greatest L g A \<longleftrightarrow> A \<subseteq> carrier L & g \<in> A & (ALL x : A. x \<sqsubseteq>\<^bsub>L\<^esub> g)"
   10.45 +  where "greatest L g A \<longleftrightarrow> A \<subseteq> carrier L \<and> g \<in> A \<and> (\<forall>x\<in>A. x \<sqsubseteq>\<^bsub>L\<^esub> g)"
   10.46  
   10.47  text (in weak_partial_order) \<open>Could weaken these to @{term "l \<in> carrier L \<and> l
   10.48    .\<in> A"} and @{term "g \<in> carrier L \<and> g .\<in> A"}.\<close>
   10.49 @@ -601,7 +601,7 @@
   10.50    using weak_le_antisym unfolding eq_is_equal .
   10.51  
   10.52  lemma lless_eq:
   10.53 -  "x \<sqsubset> y \<longleftrightarrow> x \<sqsubseteq> y & x \<noteq> y"
   10.54 +  "x \<sqsubset> y \<longleftrightarrow> x \<sqsubseteq> y \<and> x \<noteq> y"
   10.55    unfolding lless_def by (simp add: eq_is_equal)
   10.56  
   10.57  lemma set_eq_is_eq: "A {.=} B \<longleftrightarrow> A = B"
    11.1 --- a/src/HOL/Algebra/Ring.thy	Sun Nov 26 13:19:52 2017 +0100
    11.2 +++ b/src/HOL/Algebra/Ring.thy	Sun Nov 26 21:08:32 2017 +0100
    11.3 @@ -238,9 +238,9 @@
    11.4  locale cring = ring + comm_monoid R
    11.5  
    11.6  locale "domain" = cring +
    11.7 -  assumes one_not_zero [simp]: "\<one> ~= \<zero>"
    11.8 +  assumes one_not_zero [simp]: "\<one> \<noteq> \<zero>"
    11.9      and integral: "[| a \<otimes> b = \<zero>; a \<in> carrier R; b \<in> carrier R |] ==>
   11.10 -                  a = \<zero> | b = \<zero>"
   11.11 +                  a = \<zero> \<or> b = \<zero>"
   11.12  
   11.13  locale field = "domain" +
   11.14    assumes field_Units: "Units R = carrier R - {\<zero>}"
   11.15 @@ -427,7 +427,7 @@
   11.16    a_lcomm m_lcomm r_distr l_null r_null l_minus r_minus
   11.17  
   11.18  lemma (in semiring) nat_pow_zero:
   11.19 -  "(n::nat) ~= 0 ==> \<zero> (^) n = \<zero>"
   11.20 +  "(n::nat) \<noteq> 0 \<Longrightarrow> \<zero> (^) n = \<zero>"
   11.21    by (induct n) simp_all
   11.22  
   11.23  context semiring begin
   11.24 @@ -469,7 +469,7 @@
   11.25    fixes R (structure) and S (structure)
   11.26    assumes "ring R" "cring S"
   11.27    assumes RS: "a \<in> carrier R" "b \<in> carrier R" "c \<in> carrier S" "d \<in> carrier S"
   11.28 -  shows "a \<oplus> \<ominus> (a \<oplus> \<ominus> b) = b & c \<otimes>\<^bsub>S\<^esub> d = d \<otimes>\<^bsub>S\<^esub> c"
   11.29 +  shows "a \<oplus> \<ominus> (a \<oplus> \<ominus> b) = b \<and> c \<otimes>\<^bsub>S\<^esub> d = d \<otimes>\<^bsub>S\<^esub> c"
   11.30  proof -
   11.31    interpret ring R by fact
   11.32    interpret cring S by fact
   11.33 @@ -513,27 +513,27 @@
   11.34  context "domain" begin
   11.35  
   11.36  lemma zero_not_one [simp]:
   11.37 -  "\<zero> ~= \<one>"
   11.38 +  "\<zero> \<noteq> \<one>"
   11.39    by (rule not_sym) simp
   11.40  
   11.41  lemma integral_iff: (* not by default a simp rule! *)
   11.42 -  "[| a \<in> carrier R; b \<in> carrier R |] ==> (a \<otimes> b = \<zero>) = (a = \<zero> | b = \<zero>)"
   11.43 +  "[| a \<in> carrier R; b \<in> carrier R |] ==> (a \<otimes> b = \<zero>) = (a = \<zero> \<or> b = \<zero>)"
   11.44  proof
   11.45    assume "a \<in> carrier R" "b \<in> carrier R" "a \<otimes> b = \<zero>"
   11.46 -  then show "a = \<zero> | b = \<zero>" by (simp add: integral)
   11.47 +  then show "a = \<zero> \<or> b = \<zero>" by (simp add: integral)
   11.48  next
   11.49 -  assume "a \<in> carrier R" "b \<in> carrier R" "a = \<zero> | b = \<zero>"
   11.50 +  assume "a \<in> carrier R" "b \<in> carrier R" "a = \<zero> \<or> b = \<zero>"
   11.51    then show "a \<otimes> b = \<zero>" by auto
   11.52  qed
   11.53  
   11.54  lemma m_lcancel:
   11.55 -  assumes prem: "a ~= \<zero>"
   11.56 +  assumes prem: "a \<noteq> \<zero>"
   11.57      and R: "a \<in> carrier R" "b \<in> carrier R" "c \<in> carrier R"
   11.58    shows "(a \<otimes> b = a \<otimes> c) = (b = c)"
   11.59  proof
   11.60    assume eq: "a \<otimes> b = a \<otimes> c"
   11.61    with R have "a \<otimes> (b \<ominus> c) = \<zero>" by algebra
   11.62 -  with R have "a = \<zero> | (b \<ominus> c) = \<zero>" by (simp add: integral_iff)
   11.63 +  with R have "a = \<zero> \<or> (b \<ominus> c) = \<zero>" by (simp add: integral_iff)
   11.64    with prem and R have "b \<ominus> c = \<zero>" by auto 
   11.65    with R have "b = b \<ominus> (b \<ominus> c)" by algebra 
   11.66    also from R have "b \<ominus> (b \<ominus> c) = c" by algebra
   11.67 @@ -543,7 +543,7 @@
   11.68  qed
   11.69  
   11.70  lemma m_rcancel:
   11.71 -  assumes prem: "a ~= \<zero>"
   11.72 +  assumes prem: "a \<noteq> \<zero>"
   11.73      and R: "a \<in> carrier R" "b \<in> carrier R" "c \<in> carrier R"
   11.74    shows conc: "(b \<otimes> a = c \<otimes> a) = (b = c)"
   11.75  proof -
   11.76 @@ -609,9 +609,9 @@
   11.77  definition
   11.78    ring_hom :: "[('a, 'm) ring_scheme, ('b, 'n) ring_scheme] => ('a => 'b) set"
   11.79    where "ring_hom R S =
   11.80 -    {h. h \<in> carrier R \<rightarrow> carrier S &
   11.81 -      (ALL x y. x \<in> carrier R & y \<in> carrier R -->
   11.82 -        h (x \<otimes>\<^bsub>R\<^esub> y) = h x \<otimes>\<^bsub>S\<^esub> h y & h (x \<oplus>\<^bsub>R\<^esub> y) = h x \<oplus>\<^bsub>S\<^esub> h y) &
   11.83 +    {h. h \<in> carrier R \<rightarrow> carrier S \<and>
   11.84 +      (\<forall>x y. x \<in> carrier R \<and> y \<in> carrier R \<longrightarrow>
   11.85 +        h (x \<otimes>\<^bsub>R\<^esub> y) = h x \<otimes>\<^bsub>S\<^esub> h y \<and> h (x \<oplus>\<^bsub>R\<^esub> y) = h x \<oplus>\<^bsub>S\<^esub> h y) \<and>
   11.86        h \<one>\<^bsub>R\<^esub> = \<one>\<^bsub>S\<^esub>}"
   11.87  
   11.88  lemma ring_hom_memI:
   11.89 @@ -675,13 +675,13 @@
   11.90  qed
   11.91  
   11.92  lemma (in ring_hom_cring) hom_finsum [simp]:
   11.93 -  "f \<in> A \<rightarrow> carrier R ==>
   11.94 -  h (finsum R f A) = finsum S (h o f) A"
   11.95 +  "f \<in> A \<rightarrow> carrier R \<Longrightarrow>
   11.96 +  h (finsum R f A) = finsum S (h \<circ> f) A"
   11.97    by (induct A rule: infinite_finite_induct, auto simp: Pi_def)
   11.98  
   11.99  lemma (in ring_hom_cring) hom_finprod:
  11.100 -  "f \<in> A \<rightarrow> carrier R ==>
  11.101 -  h (finprod R f A) = finprod S (h o f) A"
  11.102 +  "f \<in> A \<rightarrow> carrier R \<Longrightarrow>
  11.103 +  h (finprod R f A) = finprod S (h \<circ> f) A"
  11.104    by (induct A rule: infinite_finite_induct, auto simp: Pi_def)
  11.105  
  11.106  declare ring_hom_cring.hom_finprod [simp]
    12.1 --- a/src/HOL/Algebra/UnivPoly.thy	Sun Nov 26 13:19:52 2017 +0100
    12.2 +++ b/src/HOL/Algebra/UnivPoly.thy	Sun Nov 26 21:08:32 2017 +0100
    12.3 @@ -42,7 +42,7 @@
    12.4  lemma bound_below:
    12.5    assumes bound: "bound z m f" and nonzero: "f n \<noteq> z" shows "n \<le> m"
    12.6  proof (rule classical)
    12.7 -  assume "~ ?thesis"
    12.8 +  assume "\<not> ?thesis"
    12.9    then have "m < n" by arith
   12.10    with bound have "f n = z" ..
   12.11    with nonzero show ?thesis by contradiction
   12.12 @@ -54,7 +54,7 @@
   12.13  
   12.14  definition
   12.15    up :: "('a, 'm) ring_scheme => (nat => 'a) set"
   12.16 -  where "up R = {f. f \<in> UNIV \<rightarrow> carrier R & (EX n. bound \<zero>\<^bsub>R\<^esub> n f)}"
   12.17 +  where "up R = {f. f \<in> UNIV \<rightarrow> carrier R \<and> (\<exists>n. bound \<zero>\<^bsub>R\<^esub> n f)}"
   12.18  
   12.19  definition UP :: "('a, 'm) ring_scheme => ('a, nat => 'a) up_ring"
   12.20    where "UP R = \<lparr>
   12.21 @@ -72,7 +72,7 @@
   12.22  \<close>
   12.23  
   12.24  lemma mem_upI [intro]:
   12.25 -  "[| !!n. f n \<in> carrier R; EX n. bound (zero R) n f |] ==> f \<in> up R"
   12.26 +  "[| \<And>n. f n \<in> carrier R; \<exists>n. bound (zero R) n f |] ==> f \<in> up R"
   12.27    by (simp add: up_def Pi_def)
   12.28  
   12.29  lemma mem_upD [dest]:
   12.30 @@ -82,7 +82,7 @@
   12.31  context ring
   12.32  begin
   12.33  
   12.34 -lemma bound_upD [dest]: "f \<in> up R ==> EX n. bound \<zero> n f" by (simp add: up_def)
   12.35 +lemma bound_upD [dest]: "f \<in> up R \<Longrightarrow> \<exists>n. bound \<zero> n f" by (simp add: up_def)
   12.36  
   12.37  lemma up_one_closed: "(\<lambda>n. if n = 0 then \<one> else \<zero>) \<in> up R" using up_def by force
   12.38  
   12.39 @@ -97,7 +97,7 @@
   12.40      by auto
   12.41  next
   12.42    assume UP: "p \<in> up R" "q \<in> up R"
   12.43 -  show "EX n. bound \<zero> n (\<lambda>i. p i \<oplus> q i)"
   12.44 +  show "\<exists>n. bound \<zero> n (\<lambda>i. p i \<oplus> q i)"
   12.45    proof -
   12.46      from UP obtain n where boundn: "bound \<zero> n p" by fast
   12.47      from UP obtain m where boundm: "bound \<zero> m q" by fast
   12.48 @@ -117,7 +117,7 @@
   12.49    assume R: "p \<in> up R"
   12.50    then obtain n where "bound \<zero> n p" by auto
   12.51    then have "bound \<zero> n (\<lambda>i. \<ominus> p i)" by auto
   12.52 -  then show "EX n. bound \<zero> n (\<lambda>i. \<ominus> p i)" by auto
   12.53 +  then show "\<exists>n. bound \<zero> n (\<lambda>i. \<ominus> p i)" by auto
   12.54  qed auto
   12.55  
   12.56  lemma up_minus_closed:
   12.57 @@ -135,7 +135,7 @@
   12.58      by (simp add: mem_upD  funcsetI)
   12.59  next
   12.60    assume UP: "p \<in> up R" "q \<in> up R"
   12.61 -  show "EX n. bound \<zero> n (\<lambda>n. \<Oplus>i \<in> {..n}. p i \<otimes> q (n-i))"
   12.62 +  show "\<exists>n. bound \<zero> n (\<lambda>n. \<Oplus>i \<in> {..n}. p i \<otimes> q (n-i))"
   12.63    proof -
   12.64      from UP obtain n where boundn: "bound \<zero> n p" by fast
   12.65      from UP obtain m where boundm: "bound \<zero> m q" by fast
   12.66 @@ -751,33 +751,33 @@
   12.67  qed
   12.68  
   12.69  lemma deg_belowI:
   12.70 -  assumes non_zero: "n ~= 0 ==> coeff P p n ~= \<zero>"
   12.71 +  assumes non_zero: "n \<noteq> 0 \<Longrightarrow> coeff P p n \<noteq> \<zero>"
   12.72      and R: "p \<in> carrier P"
   12.73 -  shows "n <= deg R p"
   12.74 +  shows "n \<le> deg R p"
   12.75  \<comment> \<open>Logically, this is a slightly stronger version of
   12.76     @{thm [source] deg_aboveD}\<close>
   12.77  proof (cases "n=0")
   12.78    case True then show ?thesis by simp
   12.79  next
   12.80 -  case False then have "coeff P p n ~= \<zero>" by (rule non_zero)
   12.81 -  then have "~ deg R p < n" by (fast dest: deg_aboveD intro: R)
   12.82 +  case False then have "coeff P p n \<noteq> \<zero>" by (rule non_zero)
   12.83 +  then have "\<not> deg R p < n" by (fast dest: deg_aboveD intro: R)
   12.84    then show ?thesis by arith
   12.85  qed
   12.86  
   12.87  lemma lcoeff_nonzero_deg:
   12.88 -  assumes deg: "deg R p ~= 0" and R: "p \<in> carrier P"
   12.89 -  shows "coeff P p (deg R p) ~= \<zero>"
   12.90 +  assumes deg: "deg R p \<noteq> 0" and R: "p \<in> carrier P"
   12.91 +  shows "coeff P p (deg R p) \<noteq> \<zero>"
   12.92  proof -
   12.93 -  from R obtain m where "deg R p <= m" and m_coeff: "coeff P p m ~= \<zero>"
   12.94 +  from R obtain m where "deg R p \<le> m" and m_coeff: "coeff P p m \<noteq> \<zero>"
   12.95    proof -
   12.96 -    have minus: "!!(n::nat) m. n ~= 0 ==> (n - Suc 0 < m) = (n <= m)"
   12.97 +    have minus: "\<And>(n::nat) m. n \<noteq> 0 \<Longrightarrow> (n - Suc 0 < m) = (n \<le> m)"
   12.98        by arith
   12.99      from deg have "deg R p - 1 < (LEAST n. bound \<zero> n (coeff P p))"
  12.100        by (unfold deg_def P_def) simp
  12.101 -    then have "~ bound \<zero> (deg R p - 1) (coeff P p)" by (rule not_less_Least)
  12.102 -    then have "EX m. deg R p - 1 < m & coeff P p m ~= \<zero>"
  12.103 +    then have "\<not> bound \<zero> (deg R p - 1) (coeff P p)" by (rule not_less_Least)
  12.104 +    then have "\<exists>m. deg R p - 1 < m \<and> coeff P p m \<noteq> \<zero>"
  12.105        by (unfold bound_def) fast
  12.106 -    then have "EX m. deg R p <= m & coeff P p m ~= \<zero>" by (simp add: deg minus)
  12.107 +    then have "\<exists>m. deg R p \<le> m \<and> coeff P p m \<noteq> \<zero>" by (simp add: deg minus)
  12.108      then show ?thesis by (auto intro: that)
  12.109    qed
  12.110    with deg_belowI R have "deg R p = m" by fastforce
  12.111 @@ -785,24 +785,24 @@
  12.112  qed
  12.113  
  12.114  lemma lcoeff_nonzero_nonzero:
  12.115 -  assumes deg: "deg R p = 0" and nonzero: "p ~= \<zero>\<^bsub>P\<^esub>" and R: "p \<in> carrier P"
  12.116 -  shows "coeff P p 0 ~= \<zero>"
  12.117 +  assumes deg: "deg R p = 0" and nonzero: "p \<noteq> \<zero>\<^bsub>P\<^esub>" and R: "p \<in> carrier P"
  12.118 +  shows "coeff P p 0 \<noteq> \<zero>"
  12.119  proof -
  12.120 -  have "EX m. coeff P p m ~= \<zero>"
  12.121 +  have "\<exists>m. coeff P p m \<noteq> \<zero>"
  12.122    proof (rule classical)
  12.123 -    assume "~ ?thesis"
  12.124 +    assume "\<not> ?thesis"
  12.125      with R have "p = \<zero>\<^bsub>P\<^esub>" by (auto intro: up_eqI)
  12.126      with nonzero show ?thesis by contradiction
  12.127    qed
  12.128 -  then obtain m where coeff: "coeff P p m ~= \<zero>" ..
  12.129 -  from this and R have "m <= deg R p" by (rule deg_belowI)
  12.130 +  then obtain m where coeff: "coeff P p m \<noteq> \<zero>" ..
  12.131 +  from this and R have "m \<le> deg R p" by (rule deg_belowI)
  12.132    then have "m = 0" by (simp add: deg)
  12.133    with coeff show ?thesis by simp
  12.134  qed
  12.135  
  12.136  lemma lcoeff_nonzero:
  12.137 -  assumes neq: "p ~= \<zero>\<^bsub>P\<^esub>" and R: "p \<in> carrier P"
  12.138 -  shows "coeff P p (deg R p) ~= \<zero>"
  12.139 +  assumes neq: "p \<noteq> \<zero>\<^bsub>P\<^esub>" and R: "p \<in> carrier P"
  12.140 +  shows "coeff P p (deg R p) \<noteq> \<zero>"
  12.141  proof (cases "deg R p = 0")
  12.142    case True with neq R show ?thesis by (simp add: lcoeff_nonzero_nonzero)
  12.143  next
  12.144 @@ -810,55 +810,55 @@
  12.145  qed
  12.146  
  12.147  lemma deg_eqI:
  12.148 -  "[| !!m. n < m ==> coeff P p m = \<zero>;
  12.149 -      !!n. n ~= 0 ==> coeff P p n ~= \<zero>; p \<in> carrier P |] ==> deg R p = n"
  12.150 +  "[| \<And>m. n < m \<Longrightarrow> coeff P p m = \<zero>;
  12.151 +      \<And>n. n \<noteq> 0 \<Longrightarrow> coeff P p n \<noteq> \<zero>; p \<in> carrier P |] ==> deg R p = n"
  12.152  by (fast intro: le_antisym deg_aboveI deg_belowI)
  12.153  
  12.154  text \<open>Degree and polynomial operations\<close>
  12.155  
  12.156  lemma deg_add [simp]:
  12.157    "p \<in> carrier P \<Longrightarrow> q \<in> carrier P \<Longrightarrow>
  12.158 -  deg R (p \<oplus>\<^bsub>P\<^esub> q) <= max (deg R p) (deg R q)"
  12.159 +  deg R (p \<oplus>\<^bsub>P\<^esub> q) \<le> max (deg R p) (deg R q)"
  12.160  by(rule deg_aboveI)(simp_all add: deg_aboveD)
  12.161  
  12.162  lemma deg_monom_le:
  12.163 -  "a \<in> carrier R ==> deg R (monom P a n) <= n"
  12.164 +  "a \<in> carrier R \<Longrightarrow> deg R (monom P a n) \<le> n"
  12.165    by (intro deg_aboveI) simp_all
  12.166  
  12.167  lemma deg_monom [simp]:
  12.168 -  "[| a ~= \<zero>; a \<in> carrier R |] ==> deg R (monom P a n) = n"
  12.169 +  "[| a \<noteq> \<zero>; a \<in> carrier R |] ==> deg R (monom P a n) = n"
  12.170    by (fastforce intro: le_antisym deg_aboveI deg_belowI)
  12.171  
  12.172  lemma deg_const [simp]:
  12.173    assumes R: "a \<in> carrier R" shows "deg R (monom P a 0) = 0"
  12.174  proof (rule le_antisym)
  12.175 -  show "deg R (monom P a 0) <= 0" by (rule deg_aboveI) (simp_all add: R)
  12.176 +  show "deg R (monom P a 0) \<le> 0" by (rule deg_aboveI) (simp_all add: R)
  12.177  next
  12.178 -  show "0 <= deg R (monom P a 0)" by (rule deg_belowI) (simp_all add: R)
  12.179 +  show "0 \<le> deg R (monom P a 0)" by (rule deg_belowI) (simp_all add: R)
  12.180  qed
  12.181  
  12.182  lemma deg_zero [simp]:
  12.183    "deg R \<zero>\<^bsub>P\<^esub> = 0"
  12.184  proof (rule le_antisym)
  12.185 -  show "deg R \<zero>\<^bsub>P\<^esub> <= 0" by (rule deg_aboveI) simp_all
  12.186 +  show "deg R \<zero>\<^bsub>P\<^esub> \<le> 0" by (rule deg_aboveI) simp_all
  12.187  next
  12.188 -  show "0 <= deg R \<zero>\<^bsub>P\<^esub>" by (rule deg_belowI) simp_all
  12.189 +  show "0 \<le> deg R \<zero>\<^bsub>P\<^esub>" by (rule deg_belowI) simp_all
  12.190  qed
  12.191  
  12.192  lemma deg_one [simp]:
  12.193    "deg R \<one>\<^bsub>P\<^esub> = 0"
  12.194  proof (rule le_antisym)
  12.195 -  show "deg R \<one>\<^bsub>P\<^esub> <= 0" by (rule deg_aboveI) simp_all
  12.196 +  show "deg R \<one>\<^bsub>P\<^esub> \<le> 0" by (rule deg_aboveI) simp_all
  12.197  next
  12.198 -  show "0 <= deg R \<one>\<^bsub>P\<^esub>" by (rule deg_belowI) simp_all
  12.199 +  show "0 \<le> deg R \<one>\<^bsub>P\<^esub>" by (rule deg_belowI) simp_all
  12.200  qed
  12.201  
  12.202  lemma deg_uminus [simp]:
  12.203    assumes R: "p \<in> carrier P" shows "deg R (\<ominus>\<^bsub>P\<^esub> p) = deg R p"
  12.204  proof (rule le_antisym)
  12.205 -  show "deg R (\<ominus>\<^bsub>P\<^esub> p) <= deg R p" by (simp add: deg_aboveI deg_aboveD R)
  12.206 +  show "deg R (\<ominus>\<^bsub>P\<^esub> p) \<le> deg R p" by (simp add: deg_aboveI deg_aboveD R)
  12.207  next
  12.208 -  show "deg R p <= deg R (\<ominus>\<^bsub>P\<^esub> p)"
  12.209 +  show "deg R p \<le> deg R (\<ominus>\<^bsub>P\<^esub> p)"
  12.210      by (simp add: deg_belowI lcoeff_nonzero_deg
  12.211        inj_on_eq_iff [OF R.a_inv_inj, of _ "\<zero>", simplified] R)
  12.212  qed
  12.213 @@ -868,7 +868,7 @@
  12.214  
  12.215  lemma deg_smult_ring [simp]:
  12.216    "[| a \<in> carrier R; p \<in> carrier P |] ==>
  12.217 -  deg R (a \<odot>\<^bsub>P\<^esub> p) <= (if a = \<zero> then 0 else deg R p)"
  12.218 +  deg R (a \<odot>\<^bsub>P\<^esub> p) \<le> (if a = \<zero> then 0 else deg R p)"
  12.219    by (cases "a = \<zero>") (simp add: deg_aboveI deg_aboveD)+
  12.220  
  12.221  end
  12.222 @@ -880,10 +880,10 @@
  12.223    assumes R: "a \<in> carrier R" "p \<in> carrier P"
  12.224    shows "deg R (a \<odot>\<^bsub>P\<^esub> p) = (if a = \<zero> then 0 else deg R p)"
  12.225  proof (rule le_antisym)
  12.226 -  show "deg R (a \<odot>\<^bsub>P\<^esub> p) <= (if a = \<zero> then 0 else deg R p)"
  12.227 +  show "deg R (a \<odot>\<^bsub>P\<^esub> p) \<le> (if a = \<zero> then 0 else deg R p)"
  12.228      using R by (rule deg_smult_ring)
  12.229  next
  12.230 -  show "(if a = \<zero> then 0 else deg R p) <= deg R (a \<odot>\<^bsub>P\<^esub> p)"
  12.231 +  show "(if a = \<zero> then 0 else deg R p) \<le> deg R (a \<odot>\<^bsub>P\<^esub> p)"
  12.232    proof (cases "a = \<zero>")
  12.233    qed (simp, simp add: deg_belowI lcoeff_nonzero_deg integral_iff R)
  12.234  qed
  12.235 @@ -895,7 +895,7 @@
  12.236  
  12.237  lemma deg_mult_ring:
  12.238    assumes R: "p \<in> carrier P" "q \<in> carrier P"
  12.239 -  shows "deg R (p \<otimes>\<^bsub>P\<^esub> q) <= deg R p + deg R q"
  12.240 +  shows "deg R (p \<otimes>\<^bsub>P\<^esub> q) \<le> deg R p + deg R q"
  12.241  proof (rule deg_aboveI)
  12.242    fix m
  12.243    assume boundm: "deg R p + deg R q < m"
  12.244 @@ -919,16 +919,16 @@
  12.245  begin
  12.246  
  12.247  lemma deg_mult [simp]:
  12.248 -  "[| p ~= \<zero>\<^bsub>P\<^esub>; q ~= \<zero>\<^bsub>P\<^esub>; p \<in> carrier P; q \<in> carrier P |] ==>
  12.249 +  "[| p \<noteq> \<zero>\<^bsub>P\<^esub>; q \<noteq> \<zero>\<^bsub>P\<^esub>; p \<in> carrier P; q \<in> carrier P |] ==>
  12.250    deg R (p \<otimes>\<^bsub>P\<^esub> q) = deg R p + deg R q"
  12.251  proof (rule le_antisym)
  12.252    assume "p \<in> carrier P" " q \<in> carrier P"
  12.253 -  then show "deg R (p \<otimes>\<^bsub>P\<^esub> q) <= deg R p + deg R q" by (rule deg_mult_ring)
  12.254 +  then show "deg R (p \<otimes>\<^bsub>P\<^esub> q) \<le> deg R p + deg R q" by (rule deg_mult_ring)
  12.255  next
  12.256    let ?s = "(\<lambda>i. coeff P p i \<otimes> coeff P q (deg R p + deg R q - i))"
  12.257 -  assume R: "p \<in> carrier P" "q \<in> carrier P" and nz: "p ~= \<zero>\<^bsub>P\<^esub>" "q ~= \<zero>\<^bsub>P\<^esub>"
  12.258 +  assume R: "p \<in> carrier P" "q \<in> carrier P" and nz: "p \<noteq> \<zero>\<^bsub>P\<^esub>" "q \<noteq> \<zero>\<^bsub>P\<^esub>"
  12.259    have less_add_diff: "!!(k::nat) n m. k < n ==> m < n + m - k" by arith
  12.260 -  show "deg R p + deg R q <= deg R (p \<otimes>\<^bsub>P\<^esub> q)"
  12.261 +  show "deg R p + deg R q \<le> deg R (p \<otimes>\<^bsub>P\<^esub> q)"
  12.262    proof (rule deg_belowI, simp add: R)
  12.263      have "(\<Oplus>i \<in> {.. deg R p + deg R q}. ?s i)
  12.264        = (\<Oplus>i \<in> {..< deg R p} \<union> {deg R p .. deg R p + deg R q}. ?s i)"
  12.265 @@ -942,7 +942,7 @@
  12.266        by (simp cong: R.finsum_cong add: deg_aboveD R Pi_def)
  12.267      finally have "(\<Oplus>i \<in> {.. deg R p + deg R q}. ?s i)
  12.268        = coeff P p (deg R p) \<otimes> coeff P q (deg R q)" .
  12.269 -    with nz show "(\<Oplus>i \<in> {.. deg R p + deg R q}. ?s i) ~= \<zero>"
  12.270 +    with nz show "(\<Oplus>i \<in> {.. deg R p + deg R q}. ?s i) \<noteq> \<zero>"
  12.271        by (simp add: integral_iff lcoeff_nonzero R)
  12.272    qed (simp add: R)
  12.273  qed
  12.274 @@ -969,7 +969,7 @@
  12.275    from R have RR: "!!i. (if i = k then coeff P p i else \<zero>) \<in> carrier R"
  12.276      by simp
  12.277    show "coeff P (\<Oplus>\<^bsub>P\<^esub> i \<in> {..deg R p}. ?s i) k = coeff P p k"
  12.278 -  proof (cases "k <= deg R p")
  12.279 +  proof (cases "k \<le> deg R p")
  12.280      case True
  12.281      hence "coeff P (\<Oplus>\<^bsub>P\<^esub> i \<in> {..deg R p}. ?s i) k =
  12.282            coeff P (\<Oplus>\<^bsub>P\<^esub> i \<in> {..k} \<union> {k<..deg R p}. ?s i) k"
  12.283 @@ -1017,9 +1017,9 @@
  12.284  
  12.285  lemma domainI:
  12.286    assumes cring: "cring R"
  12.287 -    and one_not_zero: "one R ~= zero R"
  12.288 -    and integral: "!!a b. [| mult R a b = zero R; a \<in> carrier R;
  12.289 -      b \<in> carrier R |] ==> a = zero R | b = zero R"
  12.290 +    and one_not_zero: "one R \<noteq> zero R"
  12.291 +    and integral: "\<And>a b. [| mult R a b = zero R; a \<in> carrier R;
  12.292 +      b \<in> carrier R |] ==> a = zero R \<or> b = zero R"
  12.293    shows "domain R"
  12.294    by (auto intro!: domain.intro domain_axioms.intro cring.axioms assms
  12.295      del: disjCI)
  12.296 @@ -1028,7 +1028,7 @@
  12.297  begin
  12.298  
  12.299  lemma UP_one_not_zero:
  12.300 -  "\<one>\<^bsub>P\<^esub> ~= \<zero>\<^bsub>P\<^esub>"
  12.301 +  "\<one>\<^bsub>P\<^esub> \<noteq> \<zero>\<^bsub>P\<^esub>"
  12.302  proof
  12.303    assume "\<one>\<^bsub>P\<^esub> = \<zero>\<^bsub>P\<^esub>"
  12.304    hence "coeff P \<one>\<^bsub>P\<^esub> 0 = (coeff P \<zero>\<^bsub>P\<^esub> 0)" by simp
  12.305 @@ -1037,17 +1037,17 @@
  12.306  qed
  12.307  
  12.308  lemma UP_integral:
  12.309 -  "[| p \<otimes>\<^bsub>P\<^esub> q = \<zero>\<^bsub>P\<^esub>; p \<in> carrier P; q \<in> carrier P |] ==> p = \<zero>\<^bsub>P\<^esub> | q = \<zero>\<^bsub>P\<^esub>"
  12.310 +  "[| p \<otimes>\<^bsub>P\<^esub> q = \<zero>\<^bsub>P\<^esub>; p \<in> carrier P; q \<in> carrier P |] ==> p = \<zero>\<^bsub>P\<^esub> \<or> q = \<zero>\<^bsub>P\<^esub>"
  12.311  proof -
  12.312    fix p q
  12.313    assume pq: "p \<otimes>\<^bsub>P\<^esub> q = \<zero>\<^bsub>P\<^esub>" and R: "p \<in> carrier P" "q \<in> carrier P"
  12.314 -  show "p = \<zero>\<^bsub>P\<^esub> | q = \<zero>\<^bsub>P\<^esub>"
  12.315 +  show "p = \<zero>\<^bsub>P\<^esub> \<or> q = \<zero>\<^bsub>P\<^esub>"
  12.316    proof (rule classical)
  12.317 -    assume c: "~ (p = \<zero>\<^bsub>P\<^esub> | q = \<zero>\<^bsub>P\<^esub>)"
  12.318 +    assume c: "\<not> (p = \<zero>\<^bsub>P\<^esub> \<or> q = \<zero>\<^bsub>P\<^esub>)"
  12.319      with R have "deg R p + deg R q = deg R (p \<otimes>\<^bsub>P\<^esub> q)" by simp
  12.320      also from pq have "... = 0" by simp
  12.321      finally have "deg R p + deg R q = 0" .
  12.322 -    then have f1: "deg R p = 0 & deg R q = 0" by simp
  12.323 +    then have f1: "deg R p = 0 \<and> deg R q = 0" by simp
  12.324      from f1 R have "p = (\<Oplus>\<^bsub>P\<^esub> i \<in> {..0}. monom P (coeff P p i) i)"
  12.325        by (simp only: up_repr_le)
  12.326      also from R have "... = monom P (coeff P p 0) 0" by simp
  12.327 @@ -1059,9 +1059,9 @@
  12.328      from R have "coeff P p 0 \<otimes> coeff P q 0 = coeff P (p \<otimes>\<^bsub>P\<^esub> q) 0" by simp
  12.329      also from pq have "... = \<zero>" by simp
  12.330      finally have "coeff P p 0 \<otimes> coeff P q 0 = \<zero>" .
  12.331 -    with R have "coeff P p 0 = \<zero> | coeff P q 0 = \<zero>"
  12.332 +    with R have "coeff P p 0 = \<zero> \<or> coeff P q 0 = \<zero>"
  12.333        by (simp add: R.integral_iff)
  12.334 -    with p q show "p = \<zero>\<^bsub>P\<^esub> | q = \<zero>\<^bsub>P\<^esub>" by fastforce
  12.335 +    with p q show "p = \<zero>\<^bsub>P\<^esub> \<or> q = \<zero>\<^bsub>P\<^esub>" by fastforce
  12.336    qed
  12.337  qed
  12.338  
  12.339 @@ -1206,8 +1206,8 @@
  12.340    maybe it is not that necessary.\<close>
  12.341  
  12.342  lemma (in ring_hom_ring) hom_finsum [simp]:
  12.343 -  "f \<in> A \<rightarrow> carrier R ==>
  12.344 -  h (finsum R f A) = finsum S (h o f) A"
  12.345 +  "f \<in> A \<rightarrow> carrier R \<Longrightarrow>
  12.346 +  h (finsum R f A) = finsum S (h \<circ> f) A"
  12.347    by (induct A rule: infinite_finite_induct, auto simp: Pi_def)
  12.348  
  12.349  context UP_pre_univ_prop
  12.350 @@ -1429,9 +1429,9 @@
  12.351  
  12.352  theorem UP_universal_property:
  12.353    assumes S: "s \<in> carrier S"
  12.354 -  shows "\<exists>!Phi. Phi \<in> ring_hom P S \<inter> extensional (carrier P) &
  12.355 -    Phi (monom P \<one> 1) = s &
  12.356 -    (ALL r : carrier R. Phi (monom P r 0) = h r)"
  12.357 +  shows "\<exists>!Phi. Phi \<in> ring_hom P S \<inter> extensional (carrier P) \<and>
  12.358 +    Phi (monom P \<one> 1) = s \<and>
  12.359 +    (\<forall>r \<in> carrier R. Phi (monom P r 0) = h r)"
  12.360    using S eval_monom1
  12.361    apply (auto intro: eval_ring_hom eval_const eval_extensional)
  12.362    apply (rule extensionalityI)
  12.363 @@ -1550,14 +1550,14 @@
  12.364  lemma long_div_theorem:
  12.365    assumes g_in_P [simp]: "g \<in> carrier P" and f_in_P [simp]: "f \<in> carrier P"
  12.366    and g_not_zero: "g \<noteq> \<zero>\<^bsub>P\<^esub>"
  12.367 -  shows "\<exists> q r (k::nat). (q \<in> carrier P) \<and> (r \<in> carrier P) \<and> (lcoeff g)(^)\<^bsub>R\<^esub>k \<odot>\<^bsub>P\<^esub> f = g \<otimes>\<^bsub>P\<^esub> q \<oplus>\<^bsub>P\<^esub> r \<and> (r = \<zero>\<^bsub>P\<^esub> | deg R r < deg R g)"
  12.368 +  shows "\<exists>q r (k::nat). (q \<in> carrier P) \<and> (r \<in> carrier P) \<and> (lcoeff g)(^)\<^bsub>R\<^esub>k \<odot>\<^bsub>P\<^esub> f = g \<otimes>\<^bsub>P\<^esub> q \<oplus>\<^bsub>P\<^esub> r \<and> (r = \<zero>\<^bsub>P\<^esub> \<or> deg R r < deg R g)"
  12.369    using f_in_P
  12.370  proof (induct "deg R f" arbitrary: "f" rule: nat_less_induct)
  12.371    case (1 f)
  12.372    note f_in_P [simp] = "1.prems"
  12.373    let ?pred = "(\<lambda> q r (k::nat).
  12.374      (q \<in> carrier P) \<and> (r \<in> carrier P)
  12.375 -    \<and> (lcoeff g)(^)\<^bsub>R\<^esub>k \<odot>\<^bsub>P\<^esub> f = g \<otimes>\<^bsub>P\<^esub> q \<oplus>\<^bsub>P\<^esub> r \<and> (r = \<zero>\<^bsub>P\<^esub> | deg R r < deg R g))"
  12.376 +    \<and> (lcoeff g)(^)\<^bsub>R\<^esub>k \<odot>\<^bsub>P\<^esub> f = g \<otimes>\<^bsub>P\<^esub> q \<oplus>\<^bsub>P\<^esub> r \<and> (r = \<zero>\<^bsub>P\<^esub> \<or> deg R r < deg R g))"
  12.377    let ?lg = "lcoeff g" and ?lf = "lcoeff f"
  12.378    show ?case
  12.379    proof (cases "deg R f < deg R g")
    13.1 --- a/src/HOL/BNF_Cardinal_Order_Relation.thy	Sun Nov 26 13:19:52 2017 +0100
    13.2 +++ b/src/HOL/BNF_Cardinal_Order_Relation.thy	Sun Nov 26 21:08:32 2017 +0100
    13.3 @@ -387,8 +387,8 @@
    13.4  lemma card_of_image:
    13.5  "|f ` A| <=o |A|"
    13.6  proof(cases "A = {}", simp add: card_of_empty)
    13.7 -  assume "A ~= {}"
    13.8 -  hence "f ` A ~= {}" by auto
    13.9 +  assume "A \<noteq> {}"
   13.10 +  hence "f ` A \<noteq> {}" by auto
   13.11    thus "|f ` A| \<le>o |A|"
   13.12    using card_of_ordLeq2[of "f ` A" A] by auto
   13.13  qed
   13.14 @@ -886,7 +886,7 @@
   13.15    moreover have "under r a \<le> Field r"
   13.16    using under_Field .
   13.17    ultimately have "under r a < Field r" by blast
   13.18 -  then obtain b where 1: "b : Field r \<and> ~ (b,a) : r"
   13.19 +  then obtain b where 1: "b \<in> Field r \<and> \<not> (b,a) \<in> r"
   13.20    unfolding under_def by blast
   13.21    moreover have ba: "b \<noteq> a"
   13.22    using 1 r unfolding card_order_on_def well_order_on_def
   13.23 @@ -1100,7 +1100,7 @@
   13.24      using 3 infinite_imp_bij_betw2[of "?Inl ` A"] by auto
   13.25      moreover have "?A' = A <+> B" using Case1 by blast
   13.26      ultimately have "bij_betw g (?Inl ` A) (A <+> B)" by simp
   13.27 -    hence "bij_betw (g o ?Inl) A (A <+> B)"
   13.28 +    hence "bij_betw (g \<circ> ?Inl) A (A <+> B)"
   13.29      using 2 by (auto simp add: bij_betw_trans)
   13.30      thus ?thesis using card_of_ordIso ordIso_symmetric by blast
   13.31    next
   13.32 @@ -1510,11 +1510,11 @@
   13.33  
   13.34  definition regularCard where
   13.35  "regularCard r \<equiv>
   13.36 - ALL K. K \<le> Field r \<and> cofinal K r \<longrightarrow> |K| =o r"
   13.37 + \<forall>K. K \<le> Field r \<and> cofinal K r \<longrightarrow> |K| =o r"
   13.38  
   13.39  definition relChain where
   13.40  "relChain r As \<equiv>
   13.41 - ALL i j. (i,j) \<in> r \<longrightarrow> As i \<le> As j"
   13.42 + \<forall>i j. (i,j) \<in> r \<longrightarrow> As i \<le> As j"
   13.43  
   13.44  lemma regularCard_UNION:
   13.45  assumes r: "Card_order r"   "regularCard r"
   13.46 @@ -1523,17 +1523,17 @@
   13.47  and cardB: "|B| <o r"
   13.48  shows "EX i : Field r. B \<le> As i"
   13.49  proof-
   13.50 -  let ?phi = "%b j. j : Field r \<and> b : As j"
   13.51 -  have "ALL b : B. EX j. ?phi b j" using Bsub by blast
   13.52 +  let ?phi = "\<lambda>b j. j \<in> Field r \<and> b \<in> As j"
   13.53 +  have "\<forall>b\<in>B. \<exists>j. ?phi b j" using Bsub by blast
   13.54    then obtain f where f: "!! b. b : B \<Longrightarrow> ?phi b (f b)"
   13.55    using bchoice[of B ?phi] by blast
   13.56    let ?K = "f ` B"
   13.57 -  {assume 1: "!! i. i : Field r \<Longrightarrow> ~ B \<le> As i"
   13.58 +  {assume 1: "\<And>i. i \<in> Field r \<Longrightarrow> \<not> B \<le> As i"
   13.59     have 2: "cofinal ?K r"
   13.60     unfolding cofinal_def proof auto
   13.61       fix i assume i: "i : Field r"
   13.62       with 1 obtain b where b: "b : B \<and> b \<notin> As i" by blast
   13.63 -     hence "i \<noteq> f b \<and> ~ (f b,i) : r"
   13.64 +     hence "i \<noteq> f b \<and> \<not> (f b,i) \<in> r"
   13.65       using As f unfolding relChain_def by auto
   13.66       hence "i \<noteq> f b \<and> (i, f b) : r" using r
   13.67       unfolding card_order_on_def well_order_on_def linear_order_on_def
    14.1 --- a/src/HOL/BNF_Composition.thy	Sun Nov 26 13:19:52 2017 +0100
    14.2 +++ b/src/HOL/BNF_Composition.thy	Sun Nov 26 21:08:32 2017 +0100
    14.3 @@ -18,13 +18,13 @@
    14.4  lemma ssubst_mem: "\<lbrakk>t = s; s \<in> X\<rbrakk> \<Longrightarrow> t \<in> X"
    14.5    by simp
    14.6  
    14.7 -lemma empty_natural: "(\<lambda>_. {}) o f = image g o (\<lambda>_. {})"
    14.8 +lemma empty_natural: "(\<lambda>_. {}) \<circ> f = image g \<circ> (\<lambda>_. {})"
    14.9    by (rule ext) simp
   14.10  
   14.11 -lemma Union_natural: "Union o image (image f) = image f o Union"
   14.12 +lemma Union_natural: "Union \<circ> image (image f) = image f \<circ> Union"
   14.13    by (rule ext) (auto simp only: comp_apply)
   14.14  
   14.15 -lemma in_Union_o_assoc: "x \<in> (Union o gset o gmap) A \<Longrightarrow> x \<in> (Union o (gset o gmap)) A"
   14.16 +lemma in_Union_o_assoc: "x \<in> (Union \<circ> gset \<circ> gmap) A \<Longrightarrow> x \<in> (Union \<circ> (gset \<circ> gmap)) A"
   14.17    by (unfold comp_assoc)
   14.18  
   14.19  lemma comp_single_set_bd:
   14.20 @@ -66,7 +66,7 @@
   14.21  lemma Union_image_empty: "A \<union> \<Union>(f ` {}) = A"
   14.22    by simp
   14.23  
   14.24 -lemma image_o_collect: "collect ((\<lambda>f. image g o f) ` F) = image g o collect F"
   14.25 +lemma image_o_collect: "collect ((\<lambda>f. image g \<circ> f) ` F) = image g \<circ> collect F"
   14.26    by (rule ext) (auto simp add: collect_def)
   14.27  
   14.28  lemma conj_subset_def: "A \<subseteq> {x. P x \<and> Q x} = (A \<subseteq> {x. P x} \<and> A \<subseteq> {x. Q x})"
   14.29 @@ -91,19 +91,19 @@
   14.30    vimage2p f g R OO vimage2p g h S \<le> vimage2p f h T"
   14.31    unfolding vimage2p_def by auto
   14.32  
   14.33 -lemma type_copy_map_cong0: "M (g x) = N (h x) \<Longrightarrow> (f o M o g) x = (f o N o h) x"
   14.34 +lemma type_copy_map_cong0: "M (g x) = N (h x) \<Longrightarrow> (f \<circ> M \<circ> g) x = (f \<circ> N \<circ> h) x"
   14.35    by auto
   14.36  
   14.37 -lemma type_copy_set_bd: "(\<And>y. |S y| \<le>o bd) \<Longrightarrow> |(S o Rep) x| \<le>o bd"
   14.38 +lemma type_copy_set_bd: "(\<And>y. |S y| \<le>o bd) \<Longrightarrow> |(S \<circ> Rep) x| \<le>o bd"
   14.39    by auto
   14.40  
   14.41  lemma vimage2p_cong: "R = S \<Longrightarrow> vimage2p f g R = vimage2p f g S"
   14.42    by simp
   14.43  
   14.44 -lemma Ball_comp_iff: "(\<lambda>x. Ball (A x) f) o g = (\<lambda>x. Ball ((A o g) x) f)"
   14.45 +lemma Ball_comp_iff: "(\<lambda>x. Ball (A x) f) \<circ> g = (\<lambda>x. Ball ((A \<circ> g) x) f)"
   14.46    unfolding o_def by auto
   14.47  
   14.48 -lemma conj_comp_iff: "(\<lambda>x. P x \<and> Q x) o g = (\<lambda>x. (P o g) x \<and> (Q o g) x)"
   14.49 +lemma conj_comp_iff: "(\<lambda>x. P x \<and> Q x) \<circ> g = (\<lambda>x. (P \<circ> g) x \<and> (Q \<circ> g) x)"
   14.50    unfolding o_def by auto
   14.51  
   14.52  context
   14.53 @@ -111,26 +111,26 @@
   14.54    assumes type_copy: "type_definition Rep Abs UNIV"
   14.55  begin
   14.56  
   14.57 -lemma type_copy_map_id0: "M = id \<Longrightarrow> Abs o M o Rep = id"
   14.58 +lemma type_copy_map_id0: "M = id \<Longrightarrow> Abs \<circ> M \<circ> Rep = id"
   14.59    using type_definition.Rep_inverse[OF type_copy] by auto
   14.60  
   14.61 -lemma type_copy_map_comp0: "M = M1 o M2 \<Longrightarrow> f o M o g = (f o M1 o Rep) o (Abs o M2 o g)"
   14.62 +lemma type_copy_map_comp0: "M = M1 \<circ> M2 \<Longrightarrow> f \<circ> M \<circ> g = (f \<circ> M1 \<circ> Rep) \<circ> (Abs \<circ> M2 \<circ> g)"
   14.63    using type_definition.Abs_inverse[OF type_copy UNIV_I] by auto
   14.64  
   14.65 -lemma type_copy_set_map0: "S o M = image f o S' \<Longrightarrow> (S o Rep) o (Abs o M o g) = image f o (S' o g)"
   14.66 +lemma type_copy_set_map0: "S \<circ> M = image f \<circ> S' \<Longrightarrow> (S \<circ> Rep) \<circ> (Abs \<circ> M \<circ> g) = image f \<circ> (S' \<circ> g)"
   14.67    using type_definition.Abs_inverse[OF type_copy UNIV_I] by (auto simp: o_def fun_eq_iff)
   14.68  
   14.69 -lemma type_copy_wit: "x \<in> (S o Rep) (Abs y) \<Longrightarrow> x \<in> S y"
   14.70 +lemma type_copy_wit: "x \<in> (S \<circ> Rep) (Abs y) \<Longrightarrow> x \<in> S y"
   14.71    using type_definition.Abs_inverse[OF type_copy UNIV_I] by auto
   14.72  
   14.73  lemma type_copy_vimage2p_Grp_Rep: "vimage2p f Rep (Grp (Collect P) h) =
   14.74 -    Grp (Collect (\<lambda>x. P (f x))) (Abs o h o f)"
   14.75 +    Grp (Collect (\<lambda>x. P (f x))) (Abs \<circ> h \<circ> f)"
   14.76    unfolding vimage2p_def Grp_def fun_eq_iff
   14.77    by (auto simp: type_definition.Abs_inverse[OF type_copy UNIV_I]
   14.78     type_definition.Rep_inverse[OF type_copy] dest: sym)
   14.79  
   14.80  lemma type_copy_vimage2p_Grp_Abs:
   14.81 -  "\<And>h. vimage2p g Abs (Grp (Collect P) h) = Grp (Collect (\<lambda>x. P (g x))) (Rep o h o g)"
   14.82 +  "\<And>h. vimage2p g Abs (Grp (Collect P) h) = Grp (Collect (\<lambda>x. P (g x))) (Rep \<circ> h \<circ> g)"
   14.83    unfolding vimage2p_def Grp_def fun_eq_iff
   14.84    by (auto simp: type_definition.Abs_inverse[OF type_copy UNIV_I]
   14.85     type_definition.Rep_inverse[OF type_copy] dest: sym)
    15.1 --- a/src/HOL/BNF_Def.thy	Sun Nov 26 13:19:52 2017 +0100
    15.2 +++ b/src/HOL/BNF_Def.thy	Sun Nov 26 21:08:32 2017 +0100
    15.3 @@ -180,7 +180,7 @@
    15.4  lemma case_sum_o_inj: "case_sum f g \<circ> Inl = f" "case_sum f g \<circ> Inr = g"
    15.5    by auto
    15.6  
    15.7 -lemma map_sum_o_inj: "map_sum f g o Inl = Inl o f" "map_sum f g o Inr = Inr o g"
    15.8 +lemma map_sum_o_inj: "map_sum f g \<circ> Inl = Inl \<circ> f" "map_sum f g \<circ> Inr = Inr \<circ> g"
    15.9    by auto
   15.10  
   15.11  lemma card_order_csum_cone_cexp_def:
   15.12 @@ -262,11 +262,11 @@
   15.13  lemma eq_onp_True: "eq_onp (\<lambda>_. True) = (op =)"
   15.14    unfolding eq_onp_def by simp
   15.15  
   15.16 -lemma Ball_image_comp: "Ball (f ` A) g = Ball A (g o f)"
   15.17 +lemma Ball_image_comp: "Ball (f ` A) g = Ball A (g \<circ> f)"
   15.18    by auto
   15.19  
   15.20  lemma rel_fun_Collect_case_prodD:
   15.21 -  "rel_fun A B f g \<Longrightarrow> X \<subseteq> Collect (case_prod A) \<Longrightarrow> x \<in> X \<Longrightarrow> B ((f o fst) x) ((g o snd) x)"
   15.22 +  "rel_fun A B f g \<Longrightarrow> X \<subseteq> Collect (case_prod A) \<Longrightarrow> x \<in> X \<Longrightarrow> B ((f \<circ> fst) x) ((g \<circ> snd) x)"
   15.23    unfolding rel_fun_def by auto
   15.24  
   15.25  lemma eq_onp_mono_iff: "eq_onp P \<le> eq_onp Q \<longleftrightarrow> P \<le> Q"
    16.1 --- a/src/HOL/BNF_Fixpoint_Base.thy	Sun Nov 26 13:19:52 2017 +0100
    16.2 +++ b/src/HOL/BNF_Fixpoint_Base.thy	Sun Nov 26 21:08:32 2017 +0100
    16.3 @@ -46,7 +46,7 @@
    16.4    fix b
    16.5    have "b = f (g b)"
    16.6    using fg unfolding fun_eq_iff by simp
    16.7 -  thus "EX a. b = f a" by blast
    16.8 +  thus "\<exists>a. b = f a" by blast
    16.9  qed
   16.10  
   16.11  lemma case_sum_step:
   16.12 @@ -248,27 +248,27 @@
   16.13  lemma snd_convol': "snd (\<langle>f, g\<rangle> x) = g x"
   16.14    using snd_convol unfolding convol_def by simp
   16.15  
   16.16 -lemma convol_expand_snd: "fst o f = g \<Longrightarrow> \<langle>g, snd o f\<rangle> = f"
   16.17 +lemma convol_expand_snd: "fst \<circ> f = g \<Longrightarrow> \<langle>g, snd \<circ> f\<rangle> = f"
   16.18    unfolding convol_def by auto
   16.19  
   16.20  lemma convol_expand_snd':
   16.21 -  assumes "(fst o f = g)"
   16.22 -  shows "h = snd o f \<longleftrightarrow> \<langle>g, h\<rangle> = f"
   16.23 +  assumes "(fst \<circ> f = g)"
   16.24 +  shows "h = snd \<circ> f \<longleftrightarrow> \<langle>g, h\<rangle> = f"
   16.25  proof -
   16.26 -  from assms have *: "\<langle>g, snd o f\<rangle> = f" by (rule convol_expand_snd)
   16.27 -  then have "h = snd o f \<longleftrightarrow> h = snd o \<langle>g, snd o f\<rangle>" by simp
   16.28 -  moreover have "\<dots> \<longleftrightarrow> h = snd o f" by (simp add: snd_convol)
   16.29 +  from assms have *: "\<langle>g, snd \<circ> f\<rangle> = f" by (rule convol_expand_snd)
   16.30 +  then have "h = snd \<circ> f \<longleftrightarrow> h = snd \<circ> \<langle>g, snd \<circ> f\<rangle>" by simp
   16.31 +  moreover have "\<dots> \<longleftrightarrow> h = snd \<circ> f" by (simp add: snd_convol)
   16.32    moreover have "\<dots> \<longleftrightarrow> \<langle>g, h\<rangle> = f" by (subst (2) *[symmetric]) (auto simp: convol_def fun_eq_iff)
   16.33    ultimately show ?thesis by simp
   16.34  qed
   16.35  
   16.36 -lemma case_sum_expand_Inr_pointfree: "f o Inl = g \<Longrightarrow> case_sum g (f o Inr) = f"
   16.37 +lemma case_sum_expand_Inr_pointfree: "f \<circ> Inl = g \<Longrightarrow> case_sum g (f \<circ> Inr) = f"
   16.38    by (auto split: sum.splits)
   16.39  
   16.40 -lemma case_sum_expand_Inr': "f o Inl = g \<Longrightarrow> h = f o Inr \<longleftrightarrow> case_sum g h = f"
   16.41 +lemma case_sum_expand_Inr': "f \<circ> Inl = g \<Longrightarrow> h = f \<circ> Inr \<longleftrightarrow> case_sum g h = f"
   16.42    by (rule iffI) (auto simp add: fun_eq_iff split: sum.splits)
   16.43  
   16.44 -lemma case_sum_expand_Inr: "f o Inl = g \<Longrightarrow> f x = case_sum g (f o Inr) x"
   16.45 +lemma case_sum_expand_Inr: "f \<circ> Inl = g \<Longrightarrow> f x = case_sum g (f \<circ> Inr) x"
   16.46    by (auto split: sum.splits)
   16.47  
   16.48  lemma id_transfer: "rel_fun A A id id"
    17.1 --- a/src/HOL/BNF_Greatest_Fixpoint.thy	Sun Nov 26 13:19:52 2017 +0100
    17.2 +++ b/src/HOL/BNF_Greatest_Fixpoint.thy	Sun Nov 26 21:08:32 2017 +0100
    17.3 @@ -36,7 +36,7 @@
    17.4  
    17.5  lemma equiv_proj:
    17.6    assumes e: "equiv A R" and m: "z \<in> R"
    17.7 -  shows "(proj R o fst) z = (proj R o snd) z"
    17.8 +  shows "(proj R \<circ> fst) z = (proj R \<circ> snd) z"
    17.9  proof -
   17.10    from m have z: "(fst z, snd z) \<in> R" by auto
   17.11    with e have "\<And>x. (fst z, x) \<in> R \<Longrightarrow> (snd z, x) \<in> R" "\<And>x. (snd z, x) \<in> R \<Longrightarrow> (fst z, x) \<in> R"
   17.12 @@ -139,10 +139,10 @@
   17.13  lemma fst_diag_id: "(fst \<circ> (\<lambda>x. (x, x))) z = id z" by simp
   17.14  lemma snd_diag_id: "(snd \<circ> (\<lambda>x. (x, x))) z = id z" by simp
   17.15  
   17.16 -lemma fst_diag_fst: "fst o ((\<lambda>x. (x, x)) o fst) = fst" by auto
   17.17 -lemma snd_diag_fst: "snd o ((\<lambda>x. (x, x)) o fst) = fst" by auto
   17.18 -lemma fst_diag_snd: "fst o ((\<lambda>x. (x, x)) o snd) = snd" by auto
   17.19 -lemma snd_diag_snd: "snd o ((\<lambda>x. (x, x)) o snd) = snd" by auto
   17.20 +lemma fst_diag_fst: "fst \<circ> ((\<lambda>x. (x, x)) \<circ> fst) = fst" by auto
   17.21 +lemma snd_diag_fst: "snd \<circ> ((\<lambda>x. (x, x)) \<circ> fst) = fst" by auto
   17.22 +lemma fst_diag_snd: "fst \<circ> ((\<lambda>x. (x, x)) \<circ> snd) = snd" by auto
   17.23 +lemma snd_diag_snd: "snd \<circ> ((\<lambda>x. (x, x)) \<circ> snd) = snd" by auto
   17.24  
   17.25  definition Succ where "Succ Kl kl = {k . kl @ [k] \<in> Kl}"
   17.26  definition Shift where "Shift Kl k = {kl. k # kl \<in> Kl}"
    18.1 --- a/src/HOL/BNF_Least_Fixpoint.thy	Sun Nov 26 13:19:52 2017 +0100
    18.2 +++ b/src/HOL/BNF_Least_Fixpoint.thy	Sun Nov 26 21:08:32 2017 +0100
    18.3 @@ -54,7 +54,7 @@
    18.4    unfolding bij_betw_def inj_on_def by blast
    18.5  
    18.6  lemma surj_fun_eq:
    18.7 -  assumes surj_on: "f ` X = UNIV" and eq_on: "\<forall>x \<in> X. (g1 o f) x = (g2 o f) x"
    18.8 +  assumes surj_on: "f ` X = UNIV" and eq_on: "\<forall>x \<in> X. (g1 \<circ> f) x = (g2 \<circ> f) x"
    18.9    shows "g1 = g2"
   18.10  proof (rule ext)
   18.11    fix y
    19.1 --- a/src/HOL/BNF_Wellorder_Constructions.thy	Sun Nov 26 13:19:52 2017 +0100
    19.2 +++ b/src/HOL/BNF_Wellorder_Constructions.thy	Sun Nov 26 21:08:32 2017 +0100
    19.3 @@ -368,7 +368,7 @@
    19.4    where 1: "Well_order r \<and> Well_order r' \<and> Well_order r''" and
    19.5          "embed r r' f" and "embed r' r'' f'"
    19.6    using * ** unfolding ordLeq_def by blast
    19.7 -  hence "embed r r'' (f' o f)"
    19.8 +  hence "embed r r'' (f' \<circ> f)"
    19.9    using comp_embed[of r r' f r'' f'] by auto
   19.10    thus "r \<le>o r''" unfolding ordLeq_def using 1 by auto
   19.11  qed
   19.12 @@ -389,7 +389,7 @@
   19.13    where 1: "Well_order r \<and> Well_order r' \<and> Well_order r''" and
   19.14          "iso r r' f" and 3: "iso r' r'' f'"
   19.15    using * ** unfolding ordIso_def by auto
   19.16 -  hence "iso r r'' (f' o f)"
   19.17 +  hence "iso r r'' (f' \<circ> f)"
   19.18    using comp_iso[of r r' f r'' f'] by auto
   19.19    thus "r =o r''" unfolding ordIso_def using 1 by auto
   19.20  qed
   19.21 @@ -691,10 +691,10 @@
   19.22    ultimately
   19.23    have "f23 ` (f12 ` ?A1) < f23 ` ?A2" by (simp add: inj_on_strict_subset)
   19.24    moreover
   19.25 -  {have "embed r1 r3 (f23 o f12)"
   19.26 +  {have "embed r1 r3 (f23 \<circ> f12)"
   19.27     using 1 EMB23 0 by (auto simp add: comp_embed)
   19.28     hence "\<forall>a \<in> ?A1. f23(f12 a) = f13 a"
   19.29 -   using EMB13 0 embed_unique[of r1 r3 "f23 o f12" f13] by auto
   19.30 +   using EMB13 0 embed_unique[of r1 r3 "f23 \<circ> f12" f13] by auto
   19.31     hence "f23 ` (f12 ` ?A1) = f13 ` ?A1" by force
   19.32    }
   19.33    ultimately
    20.1 --- a/src/HOL/BNF_Wellorder_Embedding.thy	Sun Nov 26 13:19:52 2017 +0100
    20.2 +++ b/src/HOL/BNF_Wellorder_Embedding.thy	Sun Nov 26 21:08:32 2017 +0100
    20.3 @@ -128,7 +128,7 @@
    20.4  lemma comp_embed:
    20.5  assumes WELL: "Well_order r" and
    20.6          EMB: "embed r r' f" and EMB': "embed r' r'' f'"
    20.7 -shows "embed r r'' (f' o f)"
    20.8 +shows "embed r r'' (f' \<circ> f)"
    20.9  proof(unfold embed_def, auto)
   20.10    fix a assume *: "a \<in> Field r"
   20.11    hence "bij_betw f (under r a) (under r' (f a))"
   20.12 @@ -147,7 +147,7 @@
   20.13  lemma comp_iso:
   20.14  assumes WELL: "Well_order r" and
   20.15          EMB: "iso r r' f" and EMB': "iso r' r'' f'"
   20.16 -shows "iso r r'' (f' o f)"
   20.17 +shows "iso r r'' (f' \<circ> f)"
   20.18  using assms unfolding iso_def
   20.19  by (auto simp add: comp_embed bij_betw_trans)
   20.20  
   20.21 @@ -672,25 +672,25 @@
   20.22    have Well': "wo_rel r'" using WELL' unfolding wo_rel_def .
   20.23    (* Main proof *)
   20.24    obtain H where H_def: "H =
   20.25 -  (\<lambda>h a. if False \<notin> (snd o h)`(underS r a) \<and> (fst o h)`(underS r a) \<noteq> Field r'
   20.26 -                then (wo_rel.suc r' ((fst o h)`(underS r a)), True)
   20.27 +  (\<lambda>h a. if False \<notin> (snd \<circ> h)`(underS r a) \<and> (fst \<circ> h)`(underS r a) \<noteq> Field r'
   20.28 +                then (wo_rel.suc r' ((fst \<circ> h)`(underS r a)), True)
   20.29                  else (undefined, False))" by blast
   20.30    have Adm: "wo_rel.adm_wo r H"
   20.31    using Well
   20.32    proof(unfold wo_rel.adm_wo_def, clarify)
   20.33      fix h1::"'a \<Rightarrow> 'a' * bool" and h2::"'a \<Rightarrow> 'a' * bool" and x
   20.34      assume "\<forall>y\<in>underS r x. h1 y = h2 y"
   20.35 -    hence "\<forall>y\<in>underS r x. (fst o h1) y = (fst o h2) y \<and>
   20.36 -                          (snd o h1) y = (snd o h2) y" by auto
   20.37 -    hence "(fst o h1)`(underS r x) = (fst o h2)`(underS r x) \<and>
   20.38 -           (snd o h1)`(underS r x) = (snd o h2)`(underS r x)"
   20.39 +    hence "\<forall>y\<in>underS r x. (fst \<circ> h1) y = (fst \<circ> h2) y \<and>
   20.40 +                          (snd \<circ> h1) y = (snd \<circ> h2) y" by auto
   20.41 +    hence "(fst \<circ> h1)`(underS r x) = (fst \<circ> h2)`(underS r x) \<and>
   20.42 +           (snd \<circ> h1)`(underS r x) = (snd \<circ> h2)`(underS r x)"
   20.43        by (auto simp add: image_def)
   20.44      thus "H h1 x = H h2 x" by (simp add: H_def del: not_False_in_image_Ball)
   20.45    qed
   20.46    (* More constant definitions:  *)
   20.47    obtain h::"'a \<Rightarrow> 'a' * bool" and f::"'a \<Rightarrow> 'a'" and g::"'a \<Rightarrow> bool"
   20.48    where h_def: "h = wo_rel.worec r H" and
   20.49 -        f_def: "f = fst o h" and g_def: "g = snd o h" by blast
   20.50 +        f_def: "f = fst \<circ> h" and g_def: "g = snd \<circ> h" by blast
   20.51    obtain test where test_def:
   20.52    "test = (\<lambda> a. False \<notin> (g`(underS r a)) \<and> f`(underS r a) \<noteq> Field r')" by blast
   20.53    (*  *)
   20.54 @@ -813,19 +813,19 @@
   20.55          EMB: "embed r r' f" and EMB': "embed r' r f'"
   20.56  shows "(\<forall>a \<in> Field r. f'(f a) = a) \<and> (\<forall>a' \<in> Field r'. f(f' a') = a')"
   20.57  proof-
   20.58 -  have "embed r r (f' o f)" using assms
   20.59 +  have "embed r r (f' \<circ> f)" using assms
   20.60    by(auto simp add: comp_embed)
   20.61    moreover have "embed r r id" using assms
   20.62    by (auto simp add: id_embed)
   20.63    ultimately have "\<forall>a \<in> Field r. f'(f a) = a"
   20.64 -  using assms embed_unique[of r r "f' o f" id] id_def by auto
   20.65 +  using assms embed_unique[of r r "f' \<circ> f" id] id_def by auto
   20.66    moreover
   20.67 -  {have "embed r' r' (f o f')" using assms
   20.68 +  {have "embed r' r' (f \<circ> f')" using assms
   20.69     by(auto simp add: comp_embed)
   20.70     moreover have "embed r' r' id" using assms
   20.71     by (auto simp add: id_embed)
   20.72     ultimately have "\<forall>a' \<in> Field r'. f(f' a') = a'"
   20.73 -   using assms embed_unique[of r' r' "f o f'" id] id_def by auto
   20.74 +   using assms embed_unique[of r' r' "f \<circ> f'" id] id_def by auto
   20.75    }
   20.76    ultimately show ?thesis by blast
   20.77  qed
   20.78 @@ -836,11 +836,11 @@
   20.79  shows "bij_betw f (Field r) (Field r')"
   20.80  proof-
   20.81    let ?A = "Field r"  let ?A' = "Field r'"
   20.82 -  have "embed r r (g o f) \<and> embed r' r' (f o g)"
   20.83 +  have "embed r r (g \<circ> f) \<and> embed r' r' (f \<circ> g)"
   20.84    using assms by (auto simp add: comp_embed)
   20.85    hence 1: "(\<forall>a \<in> ?A. g(f a) = a) \<and> (\<forall>a' \<in> ?A'. f(g a') = a')"
   20.86 -  using WELL id_embed[of r] embed_unique[of r r "g o f" id]
   20.87 -        WELL' id_embed[of r'] embed_unique[of r' r' "f o g" id]
   20.88 +  using WELL id_embed[of r] embed_unique[of r r "g \<circ> f" id]
   20.89 +        WELL' id_embed[of r'] embed_unique[of r' r' "f \<circ> g" id]
   20.90          id_def by auto
   20.91    have 2: "(\<forall>a \<in> ?A. f a \<in> ?A') \<and> (\<forall>a' \<in> ?A'. g a' \<in> ?A)"
   20.92    using assms embed_Field[of r r' f] embed_Field[of r' r g] by blast
   20.93 @@ -883,9 +883,9 @@
   20.94  lemma embedS_comp_embed:
   20.95  assumes WELL: "Well_order r" and WELL': "Well_order r'" and WELL'': "Well_order r''"
   20.96          and  EMB: "embedS r r' f" and EMB': "embed r' r'' f'"
   20.97 -shows "embedS r r'' (f' o f)"
   20.98 +shows "embedS r r'' (f' \<circ> f)"
   20.99  proof-
  20.100 -  let ?g = "(f' o f)"  let ?h = "inv_into (Field r) ?g"
  20.101 +  let ?g = "(f' \<circ> f)"  let ?h = "inv_into (Field r) ?g"
  20.102    have 1: "embed r r' f \<and> \<not> (bij_betw f (Field r) (Field r'))"
  20.103    using EMB by (auto simp add: embedS_def)
  20.104    hence 2: "embed r r'' ?g"
  20.105 @@ -894,7 +894,7 @@
  20.106    {assume "bij_betw ?g (Field r) (Field r'')"
  20.107     hence "embed r'' r ?h" using 2 WELL
  20.108     by (auto simp add: inv_into_Field_embed_bij_betw)
  20.109 -   hence "embed r' r (?h o f')" using WELL' EMB'
  20.110 +   hence "embed r' r (?h \<circ> f')" using WELL' EMB'
  20.111     by (auto simp add: comp_embed)
  20.112     hence "bij_betw f (Field r) (Field r')" using WELL WELL' 1
  20.113     by (auto simp add: embed_bothWays_Field_bij_betw)
  20.114 @@ -906,9 +906,9 @@
  20.115  lemma embed_comp_embedS:
  20.116  assumes WELL: "Well_order r" and WELL': "Well_order r'" and WELL'': "Well_order r''"
  20.117          and  EMB: "embed r r' f" and EMB': "embedS r' r'' f'"
  20.118 -shows "embedS r r'' (f' o f)"
  20.119 +shows "embedS r r'' (f' \<circ> f)"
  20.120  proof-
  20.121 -  let ?g = "(f' o f)"  let ?h = "inv_into (Field r) ?g"
  20.122 +  let ?g = "(f' \<circ> f)"  let ?h = "inv_into (Field r) ?g"
  20.123    have 1: "embed r' r'' f' \<and> \<not> (bij_betw f' (Field r') (Field r''))"
  20.124    using EMB' by (auto simp add: embedS_def)
  20.125    hence 2: "embed r r'' ?g"
  20.126 @@ -917,7 +917,7 @@
  20.127    {assume "bij_betw ?g (Field r) (Field r'')"
  20.128     hence "embed r'' r ?h" using 2 WELL
  20.129     by (auto simp add: inv_into_Field_embed_bij_betw)
  20.130 -   hence "embed r'' r' (f o ?h)" using WELL'' EMB
  20.131 +   hence "embed r'' r' (f \<circ> ?h)" using WELL'' EMB
  20.132     by (auto simp add: comp_embed)
  20.133     hence "bij_betw f' (Field r') (Field r'')" using WELL' WELL'' 1
  20.134     by (auto simp add: embed_bothWays_Field_bij_betw)
  20.135 @@ -929,28 +929,28 @@
  20.136  lemma embed_comp_iso:
  20.137  assumes WELL: "Well_order r" and WELL': "Well_order r'" and WELL'': "Well_order r''"
  20.138          and  EMB: "embed r r' f" and EMB': "iso r' r'' f'"
  20.139 -shows "embed r r'' (f' o f)"
  20.140 +shows "embed r r'' (f' \<circ> f)"
  20.141  using assms unfolding iso_def
  20.142  by (auto simp add: comp_embed)
  20.143  
  20.144  lemma iso_comp_embed:
  20.145  assumes WELL: "Well_order r" and WELL': "Well_order r'" and WELL'': "Well_order r''"
  20.146          and  EMB: "iso r r' f" and EMB': "embed r' r'' f'"
  20.147 -shows "embed r r'' (f' o f)"
  20.148 +shows "embed r r'' (f' \<circ> f)"
  20.149  using assms unfolding iso_def
  20.150  by (auto simp add: comp_embed)
  20.151  
  20.152  lemma embedS_comp_iso:
  20.153  assumes WELL: "Well_order r" and WELL': "Well_order r'" and WELL'': "Well_order r''"
  20.154          and  EMB: "embedS r r' f" and EMB': "iso r' r'' f'"
  20.155 -shows "embedS r r'' (f' o f)"
  20.156 +shows "embedS r r'' (f' \<circ> f)"
  20.157  using assms unfolding iso_def
  20.158  by (auto simp add: embedS_comp_embed)
  20.159  
  20.160  lemma iso_comp_embedS:
  20.161  assumes WELL: "Well_order r" and WELL': "Well_order r'" and WELL'': "Well_order r''"
  20.162          and  EMB: "iso r r' f" and EMB': "embedS r' r'' f'"
  20.163 -shows "embedS r r'' (f' o f)"
  20.164 +shows "embedS r r'' (f' \<circ> f)"
  20.165  using assms unfolding iso_def  using embed_comp_embedS
  20.166  by (auto simp add: embed_comp_embedS)
  20.167  
    21.1 --- a/src/HOL/Basic_BNFs.thy	Sun Nov 26 13:19:52 2017 +0100
    21.2 +++ b/src/HOL/Basic_BNFs.thy	Sun Nov 26 21:08:32 2017 +0100
    21.3 @@ -19,8 +19,8 @@
    21.4    "s = Inr x \<Longrightarrow> x \<in> setr s"
    21.5  
    21.6  lemma sum_set_defs[code]:
    21.7 -  "setl = (\<lambda>x. case x of Inl z => {z} | _ => {})"
    21.8 -  "setr = (\<lambda>x. case x of Inr z => {z} | _ => {})"
    21.9 +  "setl = (\<lambda>x. case x of Inl z \<Rightarrow> {z} | _ \<Rightarrow> {})"
   21.10 +  "setr = (\<lambda>x. case x of Inr z \<Rightarrow> {z} | _ \<Rightarrow> {})"
   21.11    by (auto simp: fun_eq_iff intro: setl.intros setr.intros elim: setl.cases setr.cases split: sum.splits)
   21.12  
   21.13  lemma rel_sum_simps[code, simp]:
   21.14 @@ -52,7 +52,7 @@
   21.15    show "map_sum id id = id" by (rule map_sum.id)
   21.16  next
   21.17    fix f1 :: "'o \<Rightarrow> 's" and f2 :: "'p \<Rightarrow> 't" and g1 :: "'s \<Rightarrow> 'q" and g2 :: "'t \<Rightarrow> 'r"
   21.18 -  show "map_sum (g1 o f1) (g2 o f2) = map_sum g1 g2 o map_sum f1 f2"
   21.19 +  show "map_sum (g1 \<circ> f1) (g2 \<circ> f2) = map_sum g1 g2 \<circ> map_sum f1 f2"
   21.20      by (rule map_sum.comp[symmetric])
   21.21  next
   21.22    fix x and f1 :: "'o \<Rightarrow> 'q" and f2 :: "'p \<Rightarrow> 'r" and g1 g2
   21.23 @@ -66,11 +66,11 @@
   21.24    qed
   21.25  next
   21.26    fix f1 :: "'o \<Rightarrow> 'q" and f2 :: "'p \<Rightarrow> 'r"
   21.27 -  show "setl o map_sum f1 f2 = image f1 o setl"
   21.28 +  show "setl \<circ> map_sum f1 f2 = image f1 \<circ> setl"
   21.29      by (rule ext, unfold o_apply) (simp add: sum_set_defs(1) split: sum.split)
   21.30  next
   21.31    fix f1 :: "'o \<Rightarrow> 'q" and f2 :: "'p \<Rightarrow> 'r"
   21.32 -  show "setr o map_sum f1 f2 = image f2 o setr"
   21.33 +  show "setr \<circ> map_sum f1 f2 = image f2 \<circ> setr"
   21.34      by (rule ext, unfold o_apply) (simp add: sum_set_defs(2) split: sum.split)
   21.35  next
   21.36    show "card_order natLeq" by (rule natLeq_card_order)
   21.37 @@ -149,7 +149,7 @@
   21.38    show "map_prod id id = id" by (rule map_prod.id)
   21.39  next
   21.40    fix f1 f2 g1 g2
   21.41 -  show "map_prod (g1 o f1) (g2 o f2) = map_prod g1 g2 o map_prod f1 f2"
   21.42 +  show "map_prod (g1 \<circ> f1) (g2 \<circ> f2) = map_prod g1 g2 \<circ> map_prod f1 f2"
   21.43      by (rule map_prod.comp[symmetric])
   21.44  next
   21.45    fix x f1 f2 g1 g2
   21.46 @@ -157,11 +157,11 @@
   21.47    thus "map_prod f1 f2 x = map_prod g1 g2 x" by (cases x) simp
   21.48  next
   21.49    fix f1 f2
   21.50 -  show "(\<lambda>x. {fst x}) o map_prod f1 f2 = image f1 o (\<lambda>x. {fst x})"
   21.51 +  show "(\<lambda>x. {fst x}) \<circ> map_prod f1 f2 = image f1 \<circ> (\<lambda>x. {fst x})"
   21.52      by (rule ext, unfold o_apply) simp
   21.53  next
   21.54    fix f1 f2
   21.55 -  show "(\<lambda>x. {snd x}) o map_prod f1 f2 = image f2 o (\<lambda>x. {snd x})"
   21.56 +  show "(\<lambda>x. {snd x}) \<circ> map_prod f1 f2 = image f2 \<circ> (\<lambda>x. {snd x})"
   21.57      by (rule ext, unfold o_apply) simp
   21.58  next
   21.59    show "card_order natLeq" by (rule natLeq_card_order)
    22.1 --- a/src/HOL/Computational_Algebra/Polynomial.thy	Sun Nov 26 13:19:52 2017 +0100
    22.2 +++ b/src/HOL/Computational_Algebra/Polynomial.thy	Sun Nov 26 21:08:32 2017 +0100
    22.3 @@ -1094,7 +1094,7 @@
    22.4  lemma poly_prod: "poly (\<Prod>k\<in>A. p k) x = (\<Prod>k\<in>A. poly (p k) x)"
    22.5    by (induct A rule: infinite_finite_induct) simp_all
    22.6  
    22.7 -lemma degree_prod_sum_le: "finite S \<Longrightarrow> degree (prod f S) \<le> sum (degree o f) S"
    22.8 +lemma degree_prod_sum_le: "finite S \<Longrightarrow> degree (prod f S) \<le> sum (degree \<circ> f) S"
    22.9  proof (induct S rule: finite_induct)
   22.10    case empty
   22.11    then show ?case by simp
    23.1 --- a/src/HOL/Computational_Algebra/Primes.thy	Sun Nov 26 13:19:52 2017 +0100
    23.2 +++ b/src/HOL/Computational_Algebra/Primes.thy	Sun Nov 26 21:08:32 2017 +0100
    23.3 @@ -271,7 +271,7 @@
    23.4  subsubsection \<open>Make prime naively executable\<close>
    23.5  
    23.6  lemma prime_nat_iff':
    23.7 -  "prime (p :: nat) \<longleftrightarrow> p > 1 \<and> (\<forall>n \<in> {2..<p}. ~ n dvd p)"
    23.8 +  "prime (p :: nat) \<longleftrightarrow> p > 1 \<and> (\<forall>n \<in> {2..<p}. \<not> n dvd p)"
    23.9  proof safe
   23.10    assume "p > 1" and *: "\<forall>n\<in>{2..<p}. \<not>n dvd p"
   23.11    show "prime p" unfolding prime_nat_iff
   23.12 @@ -286,7 +286,7 @@
   23.13  qed (auto simp: prime_nat_iff)
   23.14  
   23.15  lemma prime_int_iff':
   23.16 -  "prime (p :: int) \<longleftrightarrow> p > 1 \<and> (\<forall>n \<in> {2..<p}. ~ n dvd p)" (is "?lhs = ?rhs")
   23.17 +  "prime (p :: int) \<longleftrightarrow> p > 1 \<and> (\<forall>n \<in> {2..<p}. \<not> n dvd p)" (is "?lhs = ?rhs")
   23.18  proof
   23.19    assume "?lhs"
   23.20    thus "?rhs"
   23.21 @@ -352,9 +352,9 @@
   23.22  lemma primes_infinite: "\<not> (finite {(p::nat). prime p})"
   23.23  proof
   23.24    assume "finite {(p::nat). prime p}"
   23.25 -  with Max_ge have "(EX b. (ALL x : {(p::nat). prime p}. x <= b))"
   23.26 +  with Max_ge have "(\<exists>b. (\<forall>x \<in> {(p::nat). prime p}. x \<le> b))"
   23.27      by auto
   23.28 -  then obtain b where "ALL (x::nat). prime x \<longrightarrow> x <= b"
   23.29 +  then obtain b where "\<forall>(x::nat). prime x \<longrightarrow> x \<le> b"
   23.30      by auto
   23.31    with bigger_prime [of b] show False
   23.32      by auto
    24.1 --- a/src/HOL/Conditionally_Complete_Lattices.thy	Sun Nov 26 13:19:52 2017 +0100
    24.2 +++ b/src/HOL/Conditionally_Complete_Lattices.thy	Sun Nov 26 21:08:32 2017 +0100
    24.3 @@ -430,7 +430,7 @@
    24.4    assumes "a < b" and "P a" and "\<not> P b"
    24.5    shows "\<exists>c. a \<le> c \<and> c \<le> b \<and> (\<forall>x. a \<le> x \<and> x < c \<longrightarrow> P x) \<and>
    24.6               (\<forall>d. (\<forall>x. a \<le> x \<and> x < d \<longrightarrow> P x) \<longrightarrow> d \<le> c)"
    24.7 -proof (rule exI [where x = "Sup {d. \<forall>x. a \<le> x & x < d --> P x}"], auto)
    24.8 +proof (rule exI [where x = "Sup {d. \<forall>x. a \<le> x \<and> x < d \<longrightarrow> P x}"], auto)
    24.9    show "a \<le> Sup {d. \<forall>c. a \<le> c \<and> c < d \<longrightarrow> P c}"
   24.10      by (rule cSup_upper, auto simp: bdd_above_def)
   24.11         (metis \<open>a < b\<close> \<open>\<not> P b\<close> linear less_le)
   24.12 @@ -439,7 +439,7 @@
   24.13      apply (rule cSup_least)
   24.14      apply auto
   24.15      apply (metis less_le_not_le)
   24.16 -    apply (metis \<open>a<b\<close> \<open>~ P b\<close> linear less_le)
   24.17 +    apply (metis \<open>a<b\<close> \<open>\<not> P b\<close> linear less_le)
   24.18      done
   24.19  next
   24.20    fix x
   24.21 @@ -454,7 +454,7 @@
   24.22      assume 0: "\<forall>x. a \<le> x \<and> x < d \<longrightarrow> P x"
   24.23      thus "d \<le> Sup {d. \<forall>c. a \<le> c \<and> c < d \<longrightarrow> P c}"
   24.24        by (rule_tac cSup_upper, auto simp: bdd_above_def)
   24.25 -         (metis \<open>a<b\<close> \<open>~ P b\<close> linear less_le)
   24.26 +         (metis \<open>a<b\<close> \<open>\<not> P b\<close> linear less_le)
   24.27  qed
   24.28  
   24.29  end
    25.1 --- a/src/HOL/Divides.thy	Sun Nov 26 13:19:52 2017 +0100
    25.2 +++ b/src/HOL/Divides.thy	Sun Nov 26 21:08:32 2017 +0100
    25.3 @@ -673,7 +673,7 @@
    25.4       "(a+b) div (c::int) = a div c + b div c + ((a mod c + b mod c) div c)"
    25.5    by (fact div_add1_eq)
    25.6  
    25.7 -lemma zmod_eq_0_iff: "(m mod d = 0) = (EX q::int. m = d*q)"
    25.8 +lemma zmod_eq_0_iff: "(m mod d = 0) = (\<exists>q::int. m = d*q)"
    25.9  by (simp add: dvd_eq_mod_eq_0 [symmetric] dvd_def)
   25.10  
   25.11  (* REVISIT: should this be generalized to all semiring_div types? *)
   25.12 @@ -769,20 +769,20 @@
   25.13  text\<open>The proofs of the two lemmas below are essentially identical\<close>
   25.14  
   25.15  lemma split_pos_lemma:
   25.16 - "0<k ==>
   25.17 -    P(n div k :: int)(n mod k) = (\<forall>i j. 0\<le>j & j<k & n = k*i + j --> P i j)"
   25.18 + "0<k \<Longrightarrow>
   25.19 +    P(n div k :: int)(n mod k) = (\<forall>i j. 0\<le>j \<and> j<k \<and> n = k*i + j \<longrightarrow> P i j)"
   25.20    by auto
   25.21  
   25.22  lemma split_neg_lemma:
   25.23 - "k<0 ==>
   25.24 -    P(n div k :: int)(n mod k) = (\<forall>i j. k<j & j\<le>0 & n = k*i + j --> P i j)"
   25.25 + "k<0 \<Longrightarrow>
   25.26 +    P(n div k :: int)(n mod k) = (\<forall>i j. k<j \<and> j\<le>0 \<and> n = k*i + j \<longrightarrow> P i j)"
   25.27    by auto
   25.28  
   25.29  lemma split_zdiv:
   25.30   "P(n div k :: int) =
   25.31 -  ((k = 0 --> P 0) &
   25.32 -   (0<k --> (\<forall>i j. 0\<le>j & j<k & n = k*i + j --> P i)) &
   25.33 -   (k<0 --> (\<forall>i j. k<j & j\<le>0 & n = k*i + j --> P i)))"
   25.34 +  ((k = 0 \<longrightarrow> P 0) \<and>
   25.35 +   (0<k \<longrightarrow> (\<forall>i j. 0\<le>j \<and> j<k \<and> n = k*i + j \<longrightarrow> P i)) \<and>
   25.36 +   (k<0 \<longrightarrow> (\<forall>i j. k<j \<and> j\<le>0 \<and> n = k*i + j \<longrightarrow> P i)))"
   25.37    apply (cases "k = 0")
   25.38    apply simp
   25.39  apply (simp only: linorder_neq_iff)
   25.40 @@ -792,9 +792,9 @@
   25.41  
   25.42  lemma split_zmod:
   25.43   "P(n mod k :: int) =
   25.44 -  ((k = 0 --> P n) &
   25.45 -   (0<k --> (\<forall>i j. 0\<le>j & j<k & n = k*i + j --> P j)) &
   25.46 -   (k<0 --> (\<forall>i j. k<j & j\<le>0 & n = k*i + j --> P j)))"
   25.47 +  ((k = 0 \<longrightarrow> P n) \<and>
   25.48 +   (0<k \<longrightarrow> (\<forall>i j. 0\<le>j \<and> j<k \<and> n = k*i + j \<longrightarrow> P j)) \<and>
   25.49 +   (k<0 \<longrightarrow> (\<forall>i j. k<j \<and> j\<le>0 \<and> n = k*i + j \<longrightarrow> P j)))"
   25.50  apply (case_tac "k=0", simp)
   25.51  apply (simp only: linorder_neq_iff)
   25.52  apply (erule disjE)
   25.53 @@ -955,7 +955,7 @@
   25.54  by (simp add: linorder_not_le [symmetric] neg_imp_zdiv_nonneg_iff)
   25.55  
   25.56  lemma nonneg1_imp_zdiv_pos_iff:
   25.57 -  "(0::int) <= a \<Longrightarrow> (a div b > 0) = (a >= b & b>0)"
   25.58 +  "(0::int) \<le> a \<Longrightarrow> (a div b > 0) = (a \<ge> b \<and> b>0)"
   25.59  apply rule
   25.60   apply rule
   25.61    using div_pos_pos_trivial[of a b]apply arith
    26.1 --- a/src/HOL/Enum.thy	Sun Nov 26 13:19:52 2017 +0100
    26.2 +++ b/src/HOL/Enum.thy	Sun Nov 26 21:08:32 2017 +0100
    26.3 @@ -88,7 +88,7 @@
    26.4    [code del]: "enum_the = The"
    26.5  
    26.6  lemma [code]:
    26.7 -  "The P = (case filter P enum of [x] => x | _ => enum_the P)"
    26.8 +  "The P = (case filter P enum of [x] \<Rightarrow> x | _ \<Rightarrow> enum_the P)"
    26.9  proof -
   26.10    {
   26.11      fix a
   26.12 @@ -212,16 +212,16 @@
   26.13    then have "\<exists> n. x : bacc r n"
   26.14    proof (induct x arbitrary: rule: acc.induct)
   26.15      case (accI x)
   26.16 -    then have "\<forall>y. \<exists> n. (y, x) \<in> r --> y : bacc r n" by simp
   26.17 +    then have "\<forall>y. \<exists> n. (y, x) \<in> r \<longrightarrow> y \<in> bacc r n" by simp
   26.18      from choice[OF this] obtain n where n: "\<forall>y. (y, x) \<in> r \<longrightarrow> y \<in> bacc r (n y)" ..
   26.19 -    obtain n where "\<And>y. (y, x) : r \<Longrightarrow> y : bacc r n"
   26.20 +    obtain n where "\<And>y. (y, x) \<in> r \<Longrightarrow> y \<in> bacc r n"
   26.21      proof
   26.22 -      fix y assume y: "(y, x) : r"
   26.23 +      fix y assume y: "(y, x) \<in> r"
   26.24        with n have "y : bacc r (n y)" by auto
   26.25 -      moreover have "n y <= Max ((%(y, x). n y) ` r)"
   26.26 +      moreover have "n y <= Max ((\<lambda>(y, x). n y) ` r)"
   26.27          using y \<open>finite r\<close> by (auto intro!: Max_ge)
   26.28        note bacc_mono[OF this, of r]
   26.29 -      ultimately show "y : bacc r (Max ((%(y, x). n y) ` r))" by auto
   26.30 +      ultimately show "y : bacc r (Max ((\<lambda>(y, x). n y) ` r))" by auto
   26.31      qed
   26.32      then show ?case
   26.33        by (auto simp add: Let_def intro!: exI[of _ "Suc n"])
   26.34 @@ -297,13 +297,13 @@
   26.35  begin
   26.36  
   26.37  definition
   26.38 -  "enum = map (\<lambda>ys. the o map_of (zip (enum::'a list) ys)) (List.n_lists (length (enum::'a::enum list)) enum)"
   26.39 +  "enum = map (\<lambda>ys. the \<circ> map_of (zip (enum::'a list) ys)) (List.n_lists (length (enum::'a::enum list)) enum)"
   26.40  
   26.41  definition
   26.42 -  "enum_all P = all_n_lists (\<lambda>bs. P (the o map_of (zip enum bs))) (length (enum :: 'a list))"
   26.43 +  "enum_all P = all_n_lists (\<lambda>bs. P (the \<circ> map_of (zip enum bs))) (length (enum :: 'a list))"
   26.44  
   26.45  definition
   26.46 -  "enum_ex P = ex_n_lists (\<lambda>bs. P (the o map_of (zip enum bs))) (length (enum :: 'a list))"
   26.47 +  "enum_ex P = ex_n_lists (\<lambda>bs. P (the \<circ> map_of (zip enum bs))) (length (enum :: 'a list))"
   26.48  
   26.49  instance proof
   26.50    show "UNIV = set (enum :: ('a \<Rightarrow> 'b) list)"
   26.51 @@ -368,17 +368,17 @@
   26.52  end
   26.53  
   26.54  lemma enum_fun_code [code]: "enum = (let enum_a = (enum :: 'a::{enum, equal} list)
   26.55 -  in map (\<lambda>ys. the o map_of (zip enum_a ys)) (List.n_lists (length enum_a) enum))"
   26.56 +  in map (\<lambda>ys. the \<circ> map_of (zip enum_a ys)) (List.n_lists (length enum_a) enum))"
   26.57    by (simp add: enum_fun_def Let_def)
   26.58  
   26.59  lemma enum_all_fun_code [code]:
   26.60    "enum_all P = (let enum_a = (enum :: 'a::{enum, equal} list)
   26.61 -   in all_n_lists (\<lambda>bs. P (the o map_of (zip enum_a bs))) (length enum_a))"
   26.62 +   in all_n_lists (\<lambda>bs. P (the \<circ> map_of (zip enum_a bs))) (length enum_a))"
   26.63    by (simp only: enum_all_fun_def Let_def)
   26.64  
   26.65  lemma enum_ex_fun_code [code]:
   26.66    "enum_ex P = (let enum_a = (enum :: 'a::{enum, equal} list)
   26.67 -   in ex_n_lists (\<lambda>bs. P (the o map_of (zip enum_a bs))) (length enum_a))"
   26.68 +   in ex_n_lists (\<lambda>bs. P (the \<circ> map_of (zip enum_a bs))) (length enum_a))"
   26.69    by (simp only: enum_ex_fun_def Let_def)
   26.70  
   26.71  instantiation set :: (enum) enum
    27.1 --- a/src/HOL/Fields.thy	Sun Nov 26 13:19:52 2017 +0100
    27.2 +++ b/src/HOL/Fields.thy	Sun Nov 26 21:08:32 2017 +0100
    27.3 @@ -400,10 +400,10 @@
    27.4  lemma inverse_mult_distrib [simp]:
    27.5    "inverse (a * b) = inverse a * inverse b"
    27.6  proof cases
    27.7 -  assume "a \<noteq> 0 & b \<noteq> 0"
    27.8 +  assume "a \<noteq> 0 \<and> b \<noteq> 0"
    27.9    thus ?thesis by (simp add: nonzero_inverse_mult_distrib ac_simps)
   27.10  next
   27.11 -  assume "~ (a \<noteq> 0 & b \<noteq> 0)"
   27.12 +  assume "\<not> (a \<noteq> 0 \<and> b \<noteq> 0)"
   27.13    thus ?thesis by force
   27.14  qed
   27.15  
   27.16 @@ -596,7 +596,7 @@
   27.17    assumes invle: "inverse a \<le> inverse b" and apos: "0 < a"
   27.18    shows "b \<le> a"
   27.19  proof (rule classical)
   27.20 -  assume "~ b \<le> a"
   27.21 +  assume "\<not> b \<le> a"
   27.22    hence "a < b"  by (simp add: linorder_not_le)
   27.23    hence bpos: "0 < b"  by (blast intro: apos less_trans)
   27.24    hence "a * inverse a \<le> a * inverse b"
   27.25 @@ -649,9 +649,9 @@
   27.26    assumes less: "a < b" and apos:  "0 < a"
   27.27    shows "inverse b < inverse a"
   27.28  proof (rule ccontr)
   27.29 -  assume "~ inverse b < inverse a"
   27.30 +  assume "\<not> inverse b < inverse a"
   27.31    hence "inverse a \<le> inverse b" by simp
   27.32 -  hence "~ (a < b)"
   27.33 +  hence "\<not> (a < b)"
   27.34      by (simp add: not_less inverse_le_imp_le [OF _ apos])
   27.35    thus False by (rule notE [OF _ less])
   27.36  qed
   27.37 @@ -1142,19 +1142,19 @@
   27.38  text\<open>Simplify quotients that are compared with the value 1.\<close>
   27.39  
   27.40  lemma le_divide_eq_1:
   27.41 -  "(1 \<le> b / a) = ((0 < a & a \<le> b) | (a < 0 & b \<le> a))"
   27.42 +  "(1 \<le> b / a) = ((0 < a \<and> a \<le> b) \<or> (a < 0 \<and> b \<le> a))"
   27.43  by (auto simp add: le_divide_eq)
   27.44  
   27.45  lemma divide_le_eq_1:
   27.46 -  "(b / a \<le> 1) = ((0 < a & b \<le> a) | (a < 0 & a \<le> b) | a=0)"
   27.47 +  "(b / a \<le> 1) = ((0 < a \<and> b \<le> a) \<or> (a < 0 \<and> a \<le> b) \<or> a=0)"
   27.48  by (auto simp add: divide_le_eq)
   27.49  
   27.50  lemma less_divide_eq_1:
   27.51 -  "(1 < b / a) = ((0 < a & a < b) | (a < 0 & b < a))"
   27.52 +  "(1 < b / a) = ((0 < a \<and> a < b) \<or> (a < 0 \<and> b < a))"
   27.53  by (auto simp add: less_divide_eq)
   27.54  
   27.55  lemma divide_less_eq_1:
   27.56 -  "(b / a < 1) = ((0 < a & b < a) | (a < 0 & a < b) | a=0)"
   27.57 +  "(b / a < 1) = ((0 < a \<and> b < a) \<or> (a < 0 \<and> a < b) \<or> a=0)"
   27.58  by (auto simp add: divide_less_eq)
   27.59  
   27.60  lemma divide_nonneg_nonneg [simp]:
   27.61 @@ -1208,11 +1208,11 @@
   27.62  by (auto simp add: divide_less_eq)
   27.63  
   27.64  lemma eq_divide_eq_1 [simp]:
   27.65 -  "(1 = b/a) = ((a \<noteq> 0 & a = b))"
   27.66 +  "(1 = b/a) = ((a \<noteq> 0 \<and> a = b))"
   27.67  by (auto simp add: eq_divide_eq)
   27.68  
   27.69  lemma divide_eq_eq_1 [simp]:
   27.70 -  "(b/a = 1) = ((a \<noteq> 0 & a = b))"
   27.71 +  "(b/a = 1) = ((a \<noteq> 0 \<and> a = b))"
   27.72  by (auto simp add: divide_eq_eq)
   27.73  
   27.74  lemma abs_div_pos: "0 < y ==>
   27.75 @@ -1221,10 +1221,10 @@
   27.76    apply (simp add: order_less_imp_le)
   27.77  done
   27.78  
   27.79 -lemma zero_le_divide_abs_iff [simp]: "(0 \<le> a / \<bar>b\<bar>) = (0 \<le> a | b = 0)"
   27.80 +lemma zero_le_divide_abs_iff [simp]: "(0 \<le> a / \<bar>b\<bar>) = (0 \<le> a \<or> b = 0)"
   27.81  by (auto simp: zero_le_divide_iff)
   27.82  
   27.83 -lemma divide_le_0_abs_iff [simp]: "(a / \<bar>b\<bar> \<le> 0) = (a \<le> 0 | b = 0)"
   27.84 +lemma divide_le_0_abs_iff [simp]: "(a / \<bar>b\<bar> \<le> 0) = (a \<le> 0 \<or> b = 0)"
   27.85  by (auto simp: divide_le_0_iff)
   27.86  
   27.87  lemma field_le_mult_one_interval:
    28.1 --- a/src/HOL/Groebner_Basis.thy	Sun Nov 26 13:19:52 2017 +0100
    28.2 +++ b/src/HOL/Groebner_Basis.thy	Sun Nov 26 21:08:32 2017 +0100
    28.3 @@ -19,8 +19,8 @@
    28.4    by blast+
    28.5  
    28.6  lemma dnf:
    28.7 -  "(P & (Q | R)) = ((P&Q) | (P&R))"
    28.8 -  "((Q | R) & P) = ((Q&P) | (R&P))"
    28.9 +  "(P \<and> (Q \<or> R)) = ((P\<and>Q) \<or> (P\<and>R))"
   28.10 +  "((Q \<or> R) \<and> P) = ((Q\<and>P) \<or> (R\<and>P))"
   28.11    "(P \<and> Q) = (Q \<and> P)"
   28.12    "(P \<or> Q) = (Q \<or> P)"
   28.13    by blast+
    29.1 --- a/src/HOL/HOL.thy	Sun Nov 26 13:19:52 2017 +0100
    29.2 +++ b/src/HOL/HOL.thy	Sun Nov 26 21:08:32 2017 +0100
    29.3 @@ -1627,12 +1627,10 @@
    29.4  
    29.5  subsection \<open>Other simple lemmas and lemma duplicates\<close>
    29.6  
    29.7 -lemma all_cong: "(\<And>x. Q x \<Longrightarrow> P x = P' x) \<Longrightarrow>
    29.8 -    (ALL x. Q x \<longrightarrow> P x) = (ALL x. Q x \<longrightarrow> P' x)"
    29.9 +lemma all_cong: "(\<And>x. Q x \<Longrightarrow> P x = P' x) \<Longrightarrow> (\<forall>x. Q x \<longrightarrow> P x) = (\<forall>x. Q x \<longrightarrow> P' x)"
   29.10    by auto
   29.11  
   29.12 -lemma ex_cong: "(\<And>x. Q x \<Longrightarrow> P x = P' x) \<Longrightarrow>
   29.13 -    (EX x. Q x \<and> P x) = (EX x. Q x \<and> P' x)"
   29.14 +lemma ex_cong: "(\<And>x. Q x \<Longrightarrow> P x = P' x) \<Longrightarrow> (\<exists>x. Q x \<and> P x) = (\<exists>x. Q x \<and> P' x)"
   29.15    by auto
   29.16  
   29.17  lemma ex1_eq [iff]: "\<exists>!x. x = t" "\<exists>!x. t = x"
    30.1 --- a/src/HOL/Library/BNF_Corec.thy	Sun Nov 26 13:19:52 2017 +0100
    30.2 +++ b/src/HOL/Library/BNF_Corec.thy	Sun Nov 26 21:08:32 2017 +0100
    30.3 @@ -31,17 +31,17 @@
    30.4    unfolding BNF_Def.Grp_def by auto
    30.5  
    30.6  lemma sum_comp_cases:
    30.7 -  assumes "f o Inl = g o Inl" and "f o Inr = g o Inr"
    30.8 +  assumes "f \<circ> Inl = g \<circ> Inl" and "f \<circ> Inr = g \<circ> Inr"
    30.9    shows "f = g"
   30.10  proof (rule ext)
   30.11    fix a show "f a = g a"
   30.12      using assms unfolding comp_def fun_eq_iff by (cases a) auto
   30.13  qed
   30.14  
   30.15 -lemma case_sum_Inl_Inr_L: "case_sum (f o Inl) (f o Inr) = f"
   30.16 +lemma case_sum_Inl_Inr_L: "case_sum (f \<circ> Inl) (f \<circ> Inr) = f"
   30.17    by (metis case_sum_expand_Inr')
   30.18  
   30.19 -lemma eq_o_InrI: "\<lbrakk>g o Inl = h; case_sum h f = g\<rbrakk> \<Longrightarrow> f = g o Inr"
   30.20 +lemma eq_o_InrI: "\<lbrakk>g \<circ> Inl = h; case_sum h f = g\<rbrakk> \<Longrightarrow> f = g \<circ> Inr"
   30.21    by (auto simp: fun_eq_iff split: sum.splits)
   30.22  
   30.23  lemma id_bnf_o: "BNF_Composition.id_bnf \<circ> f = f"
   30.24 @@ -63,7 +63,7 @@
   30.25  
   30.26  subsection \<open>Coinduction\<close>
   30.27  
   30.28 -lemma eq_comp_compI: "a o b = f o x \<Longrightarrow> x o c = id \<Longrightarrow> f = a o (b o c)"
   30.29 +lemma eq_comp_compI: "a \<circ> b = f \<circ> x \<Longrightarrow> x \<circ> c = id \<Longrightarrow> f = a \<circ> (b \<circ> c)"
   30.30    unfolding fun_eq_iff by simp
   30.31  
   30.32  lemma self_bounded_weaken_left: "(a :: 'a :: semilattice_inf) \<le> inf a b \<Longrightarrow> a \<le> b"
   30.33 @@ -159,7 +159,7 @@
   30.34    by (simp add: antisym cong_gen_cong gen_cong_minimal leq_gen_cong)
   30.35  
   30.36  lemma gen_cong_rho:
   30.37 -  "\<rho> = eval o f \<Longrightarrow> rel (gen_cong R) (f x) (f y) \<Longrightarrow> gen_cong R (\<rho> x) (\<rho> y)"
   30.38 +  "\<rho> = eval \<circ> f \<Longrightarrow> rel (gen_cong R) (f x) (f y) \<Longrightarrow> gen_cong R (\<rho> x) (\<rho> y)"
   30.39    by (simp add: gen_cong_eval)
   30.40  lemma coinduction:
   30.41    assumes coind: "\<forall>R. R \<le> retr R \<longrightarrow> R \<le> op ="
   30.42 @@ -181,7 +181,7 @@
   30.43    fixes rel eval rel' eval' retr emb
   30.44    assumes base: "cong rel eval retr"
   30.45    and step: "cong rel' eval' retr"
   30.46 -  and emb: "eval' o emb = eval"
   30.47 +  and emb: "eval' \<circ> emb = eval"
   30.48    and emb_transfer: "rel_fun (rel R) (rel' R) emb emb"
   30.49  begin
   30.50  
    31.1 --- a/src/HOL/Library/Cardinality.thy	Sun Nov 26 13:19:52 2017 +0100
    31.2 +++ b/src/HOL/Library/Cardinality.thy	Sun Nov 26 21:08:32 2017 +0100
    31.3 @@ -92,7 +92,7 @@
    31.4        unfolding bs[symmetric] distinct_card[OF distb] ..
    31.5      have ca: "CARD('a) = length as"
    31.6        unfolding as[symmetric] distinct_card[OF dista] ..
    31.7 -    let ?xs = "map (\<lambda>ys. the o map_of (zip as ys)) (List.n_lists (length as) bs)"
    31.8 +    let ?xs = "map (\<lambda>ys. the \<circ> map_of (zip as ys)) (List.n_lists (length as) bs)"
    31.9      have "UNIV = set ?xs"
   31.10      proof(rule UNIV_eq_I)
   31.11        fix f :: "'a \<Rightarrow> 'b"
    32.1 --- a/src/HOL/Library/DAList.thy	Sun Nov 26 13:19:52 2017 +0100
    32.2 +++ b/src/HOL/Library/DAList.thy	Sun Nov 26 21:08:32 2017 +0100
    32.3 @@ -22,7 +22,7 @@
    32.4  typedef ('key, 'value) alist = "{xs :: ('key \<times> 'value) list. (distinct \<circ> map fst) xs}"
    32.5    morphisms impl_of Alist
    32.6  proof
    32.7 -  show "[] \<in> {xs. (distinct o map fst) xs}"
    32.8 +  show "[] \<in> {xs. (distinct \<circ> map fst) xs}"
    32.9      by simp
   32.10  qed
   32.11  
    33.1 --- a/src/HOL/Library/Diagonal_Subsequence.thy	Sun Nov 26 13:19:52 2017 +0100
    33.2 +++ b/src/HOL/Library/Diagonal_Subsequence.thy	Sun Nov 26 21:08:32 2017 +0100
    33.3 @@ -8,22 +8,22 @@
    33.4  
    33.5  locale subseqs =
    33.6    fixes P::"nat\<Rightarrow>(nat\<Rightarrow>nat)\<Rightarrow>bool"
    33.7 -  assumes ex_subseq: "\<And>n s. strict_mono (s::nat\<Rightarrow>nat) \<Longrightarrow> \<exists>r'. strict_mono r' \<and> P n (s o r')"
    33.8 +  assumes ex_subseq: "\<And>n s. strict_mono (s::nat\<Rightarrow>nat) \<Longrightarrow> \<exists>r'. strict_mono r' \<and> P n (s \<circ> r')"
    33.9  begin
   33.10  
   33.11 -definition reduce where "reduce s n = (SOME r'::nat\<Rightarrow>nat. strict_mono r' \<and> P n (s o r'))"
   33.12 +definition reduce where "reduce s n = (SOME r'::nat\<Rightarrow>nat. strict_mono r' \<and> P n (s \<circ> r'))"
   33.13  
   33.14  lemma subseq_reduce[intro, simp]:
   33.15    "strict_mono s \<Longrightarrow> strict_mono (reduce s n)"
   33.16    unfolding reduce_def by (rule someI2_ex[OF ex_subseq]) auto
   33.17  
   33.18  lemma reduce_holds:
   33.19 -  "strict_mono s \<Longrightarrow> P n (s o reduce s n)"
   33.20 +  "strict_mono s \<Longrightarrow> P n (s \<circ> reduce s n)"
   33.21    unfolding reduce_def by (rule someI2_ex[OF ex_subseq]) (auto simp: o_def)
   33.22  
   33.23  primrec seqseq :: "nat \<Rightarrow> nat \<Rightarrow> nat" where
   33.24    "seqseq 0 = id"
   33.25 -| "seqseq (Suc n) = seqseq n o reduce (seqseq n) n"
   33.26 +| "seqseq (Suc n) = seqseq n \<circ> reduce (seqseq n) n"
   33.27  
   33.28  lemma subseq_seqseq[intro, simp]: "strict_mono (seqseq n)"
   33.29  proof (induct n)
   33.30 @@ -35,7 +35,7 @@
   33.31  lemma seqseq_holds:
   33.32    "P n (seqseq (Suc n))"
   33.33  proof -
   33.34 -  have "P n (seqseq n o reduce (seqseq n) n)"
   33.35 +  have "P n (seqseq n \<circ> reduce (seqseq n) n)"
   33.36      by (intro reduce_holds subseq_seqseq)
   33.37    thus ?thesis by simp
   33.38  qed
   33.39 @@ -57,14 +57,14 @@
   33.40  
   33.41  primrec fold_reduce where
   33.42    "fold_reduce n 0 = id"
   33.43 -| "fold_reduce n (Suc k) = fold_reduce n k o reduce (seqseq (n + k)) (n + k)"
   33.44 +| "fold_reduce n (Suc k) = fold_reduce n k \<circ> reduce (seqseq (n + k)) (n + k)"
   33.45  
   33.46  lemma subseq_fold_reduce[intro, simp]: "strict_mono (fold_reduce n k)"
   33.47  proof (induct k)
   33.48    case (Suc k) from strict_mono_o[OF this subseq_reduce] show ?case by (simp add: o_def)
   33.49  qed (simp add: strict_mono_def)
   33.50  
   33.51 -lemma ex_subseq_reduce_index: "seqseq (n + k) = seqseq n o fold_reduce n k"
   33.52 +lemma ex_subseq_reduce_index: "seqseq (n + k) = seqseq n \<circ> fold_reduce n k"
   33.53    by (induct k) simp_all
   33.54  
   33.55  lemma seqseq_fold_reduce: "seqseq n = fold_reduce 0 n"
   33.56 @@ -73,20 +73,20 @@
   33.57  lemma diagseq_fold_reduce: "diagseq n = fold_reduce 0 n n"
   33.58    using seqseq_fold_reduce by (simp add: diagseq_def)
   33.59  
   33.60 -lemma fold_reduce_add: "fold_reduce 0 (m + n) = fold_reduce 0 m o fold_reduce m n"
   33.61 +lemma fold_reduce_add: "fold_reduce 0 (m + n) = fold_reduce 0 m \<circ> fold_reduce m n"
   33.62    by (induct n) simp_all
   33.63  
   33.64 -lemma diagseq_add: "diagseq (k + n) = (seqseq k o (fold_reduce k n)) (k + n)"
   33.65 +lemma diagseq_add: "diagseq (k + n) = (seqseq k \<circ> (fold_reduce k n)) (k + n)"
   33.66  proof -
   33.67    have "diagseq (k + n) = fold_reduce 0 (k + n) (k + n)"
   33.68      by (simp add: diagseq_fold_reduce)
   33.69 -  also have "\<dots> = (seqseq k o fold_reduce k n) (k + n)"
   33.70 +  also have "\<dots> = (seqseq k \<circ> fold_reduce k n) (k + n)"
   33.71      unfolding fold_reduce_add seqseq_fold_reduce ..
   33.72    finally show ?thesis .
   33.73  qed
   33.74  
   33.75  lemma diagseq_sub:
   33.76 -  assumes "m \<le> n" shows "diagseq n = (seqseq m o (fold_reduce m (n - m))) n"
   33.77 +  assumes "m \<le> n" shows "diagseq n = (seqseq m \<circ> (fold_reduce m (n - m))) n"
   33.78    using diagseq_add[of m "n - m"] assms by simp
   33.79  
   33.80  lemma subseq_diagonal_rest: "strict_mono (\<lambda>x. fold_reduce k x (k + x))"
   33.81 @@ -100,12 +100,12 @@
   33.82    finally show "?lhs < \<dots>" .
   33.83  qed
   33.84  
   33.85 -lemma diagseq_seqseq: "diagseq o (op + k) = (seqseq k o (\<lambda>x. fold_reduce k x (k + x)))"
   33.86 +lemma diagseq_seqseq: "diagseq \<circ> (op + k) = (seqseq k \<circ> (\<lambda>x. fold_reduce k x (k + x)))"
   33.87    by (auto simp: o_def diagseq_add)
   33.88  
   33.89  lemma diagseq_holds:
   33.90 -  assumes subseq_stable: "\<And>r s n. strict_mono r \<Longrightarrow> P n s \<Longrightarrow> P n (s o r)"
   33.91 -  shows "P k (diagseq o (op + (Suc k)))"
   33.92 +  assumes subseq_stable: "\<And>r s n. strict_mono r \<Longrightarrow> P n s \<Longrightarrow> P n (s \<circ> r)"
   33.93 +  shows "P k (diagseq \<circ> (op + (Suc k)))"
   33.94    unfolding diagseq_seqseq by (intro subseq_stable subseq_diagonal_rest seqseq_holds)
   33.95  
   33.96  end
    34.1 --- a/src/HOL/Library/Extended.thy	Sun Nov 26 13:19:52 2017 +0100
    34.2 +++ b/src/HOL/Library/Extended.thy	Sun Nov 26 21:08:32 2017 +0100
    34.3 @@ -23,7 +23,7 @@
    34.4  case_of_simps less_eq_extended_case: less_eq_extended.simps
    34.5  
    34.6  definition less_extended :: "'a extended \<Rightarrow> 'a extended \<Rightarrow> bool" where
    34.7 -"((x::'a extended) < y) = (x \<le> y & \<not> y \<le> x)"
    34.8 +"((x::'a extended) < y) = (x \<le> y \<and> \<not> y \<le> x)"
    34.9  
   34.10  instance
   34.11    by intro_classes (auto simp: less_extended_def less_eq_extended_case split: extended.splits)
    35.1 --- a/src/HOL/Library/Extended_Nat.thy	Sun Nov 26 13:19:52 2017 +0100
    35.2 +++ b/src/HOL/Library/Extended_Nat.thy	Sun Nov 26 21:08:32 2017 +0100
    35.3 @@ -602,9 +602,9 @@
    35.4  by (induct n) auto
    35.5  
    35.6  lemma enat_less_induct:
    35.7 -  assumes prem: "!!n. \<forall>m::enat. m < n --> P m ==> P n" shows "P n"
    35.8 +  assumes prem: "\<And>n. \<forall>m::enat. m < n \<longrightarrow> P m \<Longrightarrow> P n" shows "P n"
    35.9  proof -
   35.10 -  have P_enat: "!!k. P (enat k)"
   35.11 +  have P_enat: "\<And>k. P (enat k)"
   35.12      apply (rule nat_less_induct)
   35.13      apply (rule prem, clarify)
   35.14      apply (erule less_enatE, simp)
    36.1 --- a/src/HOL/Library/Extended_Real.thy	Sun Nov 26 13:19:52 2017 +0100
    36.2 +++ b/src/HOL/Library/Extended_Real.thy	Sun Nov 26 21:08:32 2017 +0100
    36.3 @@ -1138,7 +1138,7 @@
    36.4    }
    36.5    moreover
    36.6    {
    36.7 -    assume "y = -\<infinity> | y = \<infinity>"
    36.8 +    assume "y = -\<infinity> \<or> y = \<infinity>"
    36.9      then have ?thesis
   36.10        using assms[rule_format, of 1] by (cases x) auto
   36.11    }
   36.12 @@ -2845,7 +2845,7 @@
   36.13  proof -
   36.14    {
   36.15      fix x
   36.16 -    have "(real_of_ereal o ereal) x = id x"
   36.17 +    have "(real_of_ereal \<circ> ereal) x = id x"
   36.18        by auto
   36.19    }
   36.20    then show ?thesis
    37.1 --- a/src/HOL/Library/FSet.thy	Sun Nov 26 13:19:52 2017 +0100
    37.2 +++ b/src/HOL/Library/FSet.thy	Sun Nov 26 21:08:32 2017 +0100
    37.3 @@ -510,7 +510,7 @@
    37.4    by transfer auto
    37.5  
    37.6  lemma pfsubset_ffilter:
    37.7 -  "(\<And>x. x |\<in>| A \<Longrightarrow> P x \<Longrightarrow> Q x) \<Longrightarrow> (x |\<in>| A & \<not> P x & Q x) \<Longrightarrow>
    37.8 +  "(\<And>x. x |\<in>| A \<Longrightarrow> P x \<Longrightarrow> Q x) \<Longrightarrow> (x |\<in>| A \<and> \<not> P x \<and> Q x) \<Longrightarrow>
    37.9      ffilter P A |\<subset>| ffilter Q A"
   37.10    unfolding less_fset_def by (auto simp add: subset_ffilter eq_ffilter)
   37.11  
    38.1 --- a/src/HOL/Library/Old_Datatype.thy	Sun Nov 26 13:19:52 2017 +0100
    38.2 +++ b/src/HOL/Library/Old_Datatype.thy	Sun Nov 26 21:08:32 2017 +0100
    38.3 @@ -15,7 +15,7 @@
    38.4  
    38.5  subsection \<open>The datatype universe\<close>
    38.6  
    38.7 -definition "Node = {p. EX f x k. p = (f :: nat => 'b + nat, x ::'a + nat) & f k = Inr 0}"
    38.8 +definition "Node = {p. \<exists>f x k. p = (f :: nat => 'b + nat, x ::'a + nat) \<and> f k = Inr 0}"
    38.9  
   38.10  typedef ('a, 'b) node = "Node :: ((nat => 'b + nat) * ('a + nat)) set"
   38.11    morphisms Rep_Node Abs_Node
   38.12 @@ -44,9 +44,9 @@
   38.13  
   38.14  (*Leaf nodes, with arbitrary or nat labels*)
   38.15  definition Leaf :: "'a => ('a, 'b) dtree"
   38.16 -  where "Leaf == Atom o Inl"
   38.17 +  where "Leaf == Atom \<circ> Inl"
   38.18  definition Numb :: "nat => ('a, 'b) dtree"
   38.19 -  where "Numb == Atom o Inr"
   38.20 +  where "Numb == Atom \<circ> Inr"
   38.21  
   38.22  (*Injections of the "disjoint sum"*)
   38.23  definition In0 :: "('a, 'b) dtree => ('a, 'b) dtree"
   38.24 @@ -56,13 +56,13 @@
   38.25  
   38.26  (*Function spaces*)
   38.27  definition Lim :: "('b => ('a, 'b) dtree) => ('a, 'b) dtree"
   38.28 -  where "Lim f == \<Union>{z. ? x. z = Push_Node (Inl x) ` (f x)}"
   38.29 +  where "Lim f == \<Union>{z. \<exists>x. z = Push_Node (Inl x) ` (f x)}"
   38.30  
   38.31  (*the set of nodes with depth less than k*)
   38.32  definition ndepth :: "('a, 'b) node => nat"
   38.33    where "ndepth(n) == (%(f,x). LEAST k. f k = Inr 0) (Rep_Node n)"
   38.34  definition ntrunc :: "[nat, ('a, 'b) dtree] => ('a, 'b) dtree"
   38.35 -  where "ntrunc k N == {n. n:N & ndepth(n)<k}"
   38.36 +  where "ntrunc k N == {n. n:N \<and> ndepth(n)<k}"
   38.37  
   38.38  (*products and sums for the "universe"*)
   38.39  definition uprod :: "[('a, 'b) dtree set, ('a, 'b) dtree set]=> ('a, 'b) dtree set"
   38.40 @@ -72,10 +72,10 @@
   38.41  
   38.42  (*the corresponding eliminators*)
   38.43  definition Split :: "[[('a, 'b) dtree, ('a, 'b) dtree]=>'c, ('a, 'b) dtree] => 'c"
   38.44 -  where "Split c M == THE u. EX x y. M = Scons x y & u = c x y"
   38.45 +  where "Split c M == THE u. \<exists>x y. M = Scons x y \<and> u = c x y"
   38.46  
   38.47  definition Case :: "[[('a, 'b) dtree]=>'c, [('a, 'b) dtree]=>'c, ('a, 'b) dtree] => 'c"
   38.48 -  where "Case c d M == THE u. (EX x . M = In0(x) & u = c(x)) | (EX y . M = In1(y) & u = d(y))"
   38.49 +  where "Case c d M == THE u. (\<exists>x . M = In0(x) \<and> u = c(x)) \<or> (\<exists>y . M = In1(y) \<and> u = d(y))"
   38.50  
   38.51  
   38.52  (** equality for the "universe" **)
   38.53 @@ -207,7 +207,7 @@
   38.54      "[| Scons M N = Scons M' N';  [| M=M';  N=N' |] ==> P |] ==> P"
   38.55  by (iprover dest: Scons_inject1 Scons_inject2)
   38.56  
   38.57 -lemma Scons_Scons_eq [iff]: "(Scons M N = Scons M' N') = (M=M' & N=N')"
   38.58 +lemma Scons_Scons_eq [iff]: "(Scons M N = Scons M' N') = (M=M' \<and> N=N')"
   38.59  by (blast elim!: Scons_inject)
   38.60  
   38.61  (*** Distinctness involving Leaf and Numb ***)
   38.62 @@ -241,7 +241,7 @@
   38.63  by (simp add: ndepth_def  Node_K0_I [THEN Abs_Node_inverse] Least_equality)
   38.64  
   38.65  lemma ndepth_Push_Node_aux:
   38.66 -     "case_nat (Inr (Suc i)) f k = Inr 0 --> Suc(LEAST x. f x = Inr 0) <= k"
   38.67 +     "case_nat (Inr (Suc i)) f k = Inr 0 \<longrightarrow> Suc(LEAST x. f x = Inr 0) \<le> k"
   38.68  apply (induct_tac "k", auto)
   38.69  apply (erule Least_le)
   38.70  done
   38.71 @@ -385,7 +385,7 @@
   38.72  done
   38.73  
   38.74  lemma ntrunc_o_equality: 
   38.75 -    "[| !!k. (ntrunc(k) o h1) = (ntrunc(k) o h2) |] ==> h1=h2"
   38.76 +    "[| !!k. (ntrunc(k) \<circ> h1) = (ntrunc(k) \<circ> h2) |] ==> h1=h2"
   38.77  apply (rule ntrunc_equality [THEN ext])
   38.78  apply (simp add: fun_eq_iff) 
   38.79  done
    39.1 --- a/src/HOL/Library/Old_Recdef.thy	Sun Nov 26 13:19:52 2017 +0100
    39.2 +++ b/src/HOL/Library/Old_Recdef.thy	Sun Nov 26 21:08:32 2017 +0100
    39.3 @@ -13,8 +13,8 @@
    39.4  
    39.5  subsection \<open>Lemmas for TFL\<close>
    39.6  
    39.7 -lemma tfl_wf_induct: "ALL R. wf R -->
    39.8 -       (ALL P. (ALL x. (ALL y. (y,x):R --> P y) --> P x) --> (ALL x. P x))"
    39.9 +lemma tfl_wf_induct: "\<forall>R. wf R \<longrightarrow>
   39.10 +       (\<forall>P. (\<forall>x. (\<forall>y. (y,x)\<in>R \<longrightarrow> P y) \<longrightarrow> P x) \<longrightarrow> (\<forall>x. P x))"
   39.11  apply clarify
   39.12  apply (rule_tac r = R and P = P and a = x in wf_induct, assumption, blast)
   39.13  done
   39.14 @@ -22,39 +22,39 @@
   39.15  lemma tfl_cut_def: "cut f r x \<equiv> (\<lambda>y. if (y,x) \<in> r then f y else undefined)"
   39.16    unfolding cut_def .
   39.17  
   39.18 -lemma tfl_cut_apply: "ALL f R. (x,a):R --> (cut f R a)(x) = f(x)"
   39.19 +lemma tfl_cut_apply: "\<forall>f R. (x,a)\<in>R \<longrightarrow> (cut f R a)(x) = f(x)"
   39.20  apply clarify
   39.21  apply (rule cut_apply, assumption)
   39.22  done
   39.23  
   39.24  lemma tfl_wfrec:
   39.25 -     "ALL M R f. (f=wfrec R M) --> wf R --> (ALL x. f x = M (cut f R x) x)"
   39.26 +     "\<forall>M R f. (f=wfrec R M) \<longrightarrow> wf R \<longrightarrow> (\<forall>x. f x = M (cut f R x) x)"
   39.27  apply clarify
   39.28  apply (erule wfrec)
   39.29  done
   39.30  
   39.31 -lemma tfl_eq_True: "(x = True) --> x"
   39.32 +lemma tfl_eq_True: "(x = True) \<longrightarrow> x"
   39.33    by blast
   39.34  
   39.35 -lemma tfl_rev_eq_mp: "(x = y) --> y --> x"
   39.36 +lemma tfl_rev_eq_mp: "(x = y) \<longrightarrow> y \<longrightarrow> x"
   39.37    by blast
   39.38  
   39.39 -lemma tfl_simp_thm: "(x --> y) --> (x = x') --> (x' --> y)"
   39.40 +lemma tfl_simp_thm: "(x \<longrightarrow> y) \<longrightarrow> (x = x') \<longrightarrow> (x' \<longrightarrow> y)"
   39.41    by blast
   39.42  
   39.43 -lemma tfl_P_imp_P_iff_True: "P ==> P = True"
   39.44 +lemma tfl_P_imp_P_iff_True: "P \<Longrightarrow> P = True"
   39.45    by blast
   39.46  
   39.47 -lemma tfl_imp_trans: "(A --> B) ==> (B --> C) ==> (A --> C)"
   39.48 +lemma tfl_imp_trans: "(A \<longrightarrow> B) \<Longrightarrow> (B \<longrightarrow> C) \<Longrightarrow> (A \<longrightarrow> C)"
   39.49    by blast
   39.50  
   39.51 -lemma tfl_disj_assoc: "(a \<or> b) \<or> c == a \<or> (b \<or> c)"
   39.52 +lemma tfl_disj_assoc: "(a \<or> b) \<or> c \<equiv> a \<or> (b \<or> c)"
   39.53    by simp
   39.54  
   39.55 -lemma tfl_disjE: "P \<or> Q ==> P --> R ==> Q --> R ==> R"
   39.56 +lemma tfl_disjE: "P \<or> Q \<Longrightarrow> P \<longrightarrow> R \<Longrightarrow> Q \<longrightarrow> R \<Longrightarrow> R"
   39.57    by blast
   39.58  
   39.59 -lemma tfl_exE: "\<exists>x. P x ==> \<forall>x. P x --> Q ==> Q"
   39.60 +lemma tfl_exE: "\<exists>x. P x \<Longrightarrow> \<forall>x. P x \<longrightarrow> Q \<Longrightarrow> Q"
   39.61    by blast
   39.62  
   39.63  ML_file "old_recdef.ML"
    40.1 --- a/src/HOL/Library/Option_ord.thy	Sun Nov 26 13:19:52 2017 +0100
    40.2 +++ b/src/HOL/Library/Option_ord.thy	Sun Nov 26 21:08:32 2017 +0100
    40.3 @@ -101,12 +101,12 @@
    40.4    fix z :: "'a option"
    40.5    assume H: "\<And>x. (\<And>y. y < x \<Longrightarrow> P y) \<Longrightarrow> P x"
    40.6    have "P None" by (rule H) simp
    40.7 -  then have P_Some [case_names Some]: "P z" if "\<And>x. z = Some x \<Longrightarrow> (P o Some) x" for z
    40.8 +  then have P_Some [case_names Some]: "P z" if "\<And>x. z = Some x \<Longrightarrow> (P \<circ> Some) x" for z
    40.9      using \<open>P None\<close> that by (cases z) simp_all
   40.10    show "P z"
   40.11    proof (cases z rule: P_Some)
   40.12      case (Some w)
   40.13 -    show "(P o Some) w"
   40.14 +    show "(P \<circ> Some) w"
   40.15      proof (induct rule: less_induct)
   40.16        case (less x)
   40.17        have "P (Some x)"
   40.18 @@ -117,7 +117,7 @@
   40.19          proof (cases y rule: P_Some)
   40.20            case (Some v)
   40.21            with \<open>y < Some x\<close> have "v < x" by simp
   40.22 -          with less show "(P o Some) v" .
   40.23 +          with less show "(P \<circ> Some) v" .
   40.24          qed
   40.25        qed
   40.26        then show ?case by simp
    41.1 --- a/src/HOL/Library/Predicate_Compile_Alternative_Defs.thy	Sun Nov 26 13:19:52 2017 +0100
    41.2 +++ b/src/HOL/Library/Predicate_Compile_Alternative_Defs.thy	Sun Nov 26 21:08:32 2017 +0100
    41.3 @@ -15,11 +15,11 @@
    41.4  declare less_bool_def[abs_def, code_pred_inline]
    41.5  declare le_bool_def[abs_def, code_pred_inline]
    41.6  
    41.7 -lemma min_bool_eq [code_pred_inline]: "(min :: bool => bool => bool) == (op &)"
    41.8 +lemma min_bool_eq [code_pred_inline]: "(min :: bool => bool => bool) == (op \<and>)"
    41.9  by (rule eq_reflection) (auto simp add: fun_eq_iff min_def)
   41.10  
   41.11  lemma [code_pred_inline]: 
   41.12 -  "((A::bool) ~= (B::bool)) = ((A & ~ B) | (B & ~ A))"
   41.13 +  "((A::bool) \<noteq> (B::bool)) = ((A \<and> \<not> B) \<or> (B \<and> \<not> A))"
   41.14  by fast
   41.15  
   41.16  setup \<open>Predicate_Compile_Data.ignore_consts [@{const_name Let}]\<close>
   41.17 @@ -45,7 +45,7 @@
   41.18    by (simp add: fun_eq_iff)
   41.19  
   41.20  lemma subset_eq[code_pred_inline]:
   41.21 -  "(P :: 'a => bool) < (Q :: 'a => bool) == ((\<exists>x. Q x \<and> (\<not> P x)) \<and> (\<forall> x. P x --> Q x))"
   41.22 +  "(P :: 'a \<Rightarrow> bool) < (Q :: 'a \<Rightarrow> bool) \<equiv> ((\<exists>x. Q x \<and> (\<not> P x)) \<and> (\<forall>x. P x \<longrightarrow> Q x))"
   41.23    by (rule eq_reflection) (auto simp add: less_fun_def le_fun_def)
   41.24  
   41.25  lemma set_equality[code_pred_inline]:
    42.1 --- a/src/HOL/Library/Product_Order.thy	Sun Nov 26 13:19:52 2017 +0100
    42.2 +++ b/src/HOL/Library/Product_Order.thy	Sun Nov 26 21:08:32 2017 +0100
    42.3 @@ -220,11 +220,11 @@
    42.4  of two complete lattices:\<close>
    42.5  
    42.6  lemma INF_prod_alt_def:
    42.7 -  "INFIMUM A f = (INFIMUM A (fst o f), INFIMUM A (snd o f))"
    42.8 +  "INFIMUM A f = (INFIMUM A (fst \<circ> f), INFIMUM A (snd \<circ> f))"
    42.9    unfolding Inf_prod_def by simp
   42.10  
   42.11  lemma SUP_prod_alt_def:
   42.12 -  "SUPREMUM A f = (SUPREMUM A (fst o f), SUPREMUM A (snd o f))"
   42.13 +  "SUPREMUM A f = (SUPREMUM A (fst \<circ> f), SUPREMUM A (snd \<circ> f))"
   42.14    unfolding Sup_prod_def by simp
   42.15  
   42.16  
    43.1 --- a/src/HOL/Library/RBT_Set.thy	Sun Nov 26 13:19:52 2017 +0100
    43.2 +++ b/src/HOL/Library/RBT_Set.thy	Sun Nov 26 21:08:32 2017 +0100
    43.3 @@ -548,8 +548,8 @@
    43.4  
    43.5  lemma subset_Coset_empty_Set_empty [code]:
    43.6    "Coset t1 \<le> Set t2 \<longleftrightarrow> (case (RBT.impl_of t1, RBT.impl_of t2) of 
    43.7 -    (rbt.Empty, rbt.Empty) => False |
    43.8 -    (_, _) => Code.abort (STR ''non_empty_trees'') (\<lambda>_. Coset t1 \<le> Set t2))"
    43.9 +    (rbt.Empty, rbt.Empty) \<Rightarrow> False |
   43.10 +    (_, _) \<Rightarrow> Code.abort (STR ''non_empty_trees'') (\<lambda>_. Coset t1 \<le> Set t2))"
   43.11  proof -
   43.12    have *: "\<And>t. RBT.impl_of t = rbt.Empty \<Longrightarrow> t = RBT rbt.Empty"
   43.13      by (subst(asm) RBT_inverse[symmetric]) (auto simp: impl_of_inject)
   43.14 @@ -568,7 +568,7 @@
   43.15    by (auto simp add: card.eq_fold intro: finite_fold_fold_keys comp_fun_commute_const)
   43.16  
   43.17  lemma sum_Set [code]:
   43.18 -  "sum f (Set xs) = fold_keys (plus o f) xs 0"
   43.19 +  "sum f (Set xs) = fold_keys (plus \<circ> f) xs 0"
   43.20  proof -
   43.21    have "comp_fun_commute (\<lambda>x. op + (f x))"
   43.22      by standard (auto simp: ac_simps)
    44.1 --- a/src/HOL/Library/Ramsey.thy	Sun Nov 26 13:19:52 2017 +0100
    44.2 +++ b/src/HOL/Library/Ramsey.thy	Sun Nov 26 21:08:32 2017 +0100
    44.3 @@ -27,7 +27,7 @@
    44.4    (is "\<exists>r\<ge>1. ?R m n r")
    44.5  proof (induct k \<equiv> "m + n" arbitrary: m n)
    44.6    case 0
    44.7 -  show ?case (is "EX r. ?Q r")
    44.8 +  show ?case (is "\<exists>r. ?Q r")
    44.9    proof
   44.10      from 0 show "?Q 1"
   44.11        by (clarsimp simp: indep_def) (metis card.empty emptyE empty_subsetI)
   44.12 @@ -35,7 +35,7 @@
   44.13  next
   44.14    case (Suc k)
   44.15    consider "m = 0 \<or> n = 0" | "m \<noteq> 0" "n \<noteq> 0" by auto
   44.16 -  then show ?case (is "EX r. ?Q r")
   44.17 +  then show ?case (is "\<exists>r. ?Q r")
   44.18    proof cases
   44.19      case 1
   44.20      then have "?Q 1"
    45.1 --- a/src/HOL/Library/Stream.thy	Sun Nov 26 13:19:52 2017 +0100
    45.2 +++ b/src/HOL/Library/Stream.thy	Sun Nov 26 21:08:32 2017 +0100
    45.3 @@ -251,7 +251,7 @@
    45.4  
    45.5  lemma sdrop_while_sdrop_LEAST:
    45.6    assumes "\<exists>n. P (s !! n)"
    45.7 -  shows "sdrop_while (Not o P) s = sdrop (LEAST n. P (s !! n)) s"
    45.8 +  shows "sdrop_while (Not \<circ> P) s = sdrop (LEAST n. P (s !! n)) s"
    45.9  proof -
   45.10    from assms obtain m where "P (s !! m)" "\<And>n. P (s !! n) \<Longrightarrow> m \<le> n"
   45.11      and *: "(LEAST n. P (s !! n)) = m" by atomize_elim (auto intro: LeastI Least_le)
   45.12 @@ -266,8 +266,8 @@
   45.13  qed
   45.14  
   45.15  primcorec sfilter where
   45.16 -  "shd (sfilter P s) = shd (sdrop_while (Not o P) s)"
   45.17 -| "stl (sfilter P s) = sfilter P (stl (sdrop_while (Not o P) s))"
   45.18 +  "shd (sfilter P s) = shd (sdrop_while (Not \<circ> P) s)"
   45.19 +| "stl (sfilter P s) = sfilter P (stl (sdrop_while (Not \<circ> P) s))"
   45.20  
   45.21  lemma sfilter_Stream: "sfilter P (x ## s) = (if P x then x ## sfilter P s else sfilter P s)"
   45.22  proof (cases "P x")
    46.1 --- a/src/HOL/Library/Sublist.thy	Sun Nov 26 13:19:52 2017 +0100
    46.2 +++ b/src/HOL/Library/Sublist.thy	Sun Nov 26 21:08:32 2017 +0100
    46.3 @@ -1018,7 +1018,7 @@
    46.4    "subseq (xs @ zs) (ys @ zs) \<longleftrightarrow> subseq xs ys" (is "?l = ?r")
    46.5  proof
    46.6    { fix xs' ys' xs ys zs :: "'a list" assume "subseq xs' ys'"
    46.7 -    then have "xs' = xs @ zs & ys' = ys @ zs \<longrightarrow> subseq xs ys"
    46.8 +    then have "xs' = xs @ zs \<and> ys' = ys @ zs \<longrightarrow> subseq xs ys"
    46.9      proof (induct arbitrary: xs ys zs)
   46.10        case list_emb_Nil show ?case by simp
   46.11      next
    47.1 --- a/src/HOL/Library/Sum_of_Squares/sum_of_squares.ML	Sun Nov 26 13:19:52 2017 +0100
    47.2 +++ b/src/HOL/Library/Sum_of_Squares/sum_of_squares.ML	Sun Nov 26 21:08:32 2017 +0100
    47.3 @@ -1018,8 +1018,8 @@
    47.4            addsimps [@{thm power_divide}]
    47.5          val th =
    47.6            Thm.instantiate' [] [SOME d, SOME (Thm.dest_arg P)]
    47.7 -            (if ord then @{lemma "(d=0 --> P) & (d>0 --> P) & (d<(0::real) --> P) ==> P" by auto}
    47.8 -             else @{lemma "(d=0 --> P) & (d ~= (0::real) --> P) ==> P" by blast})
    47.9 +            (if ord then @{lemma "(d=0 \<longrightarrow> P) \<and> (d>0 \<longrightarrow> P) \<and> (d<(0::real) \<longrightarrow> P) \<Longrightarrow> P" by auto}
   47.10 +             else @{lemma "(d=0 \<longrightarrow> P) \<and> (d \<noteq> (0::real) \<longrightarrow> P) \<Longrightarrow> P" by blast})
   47.11        in resolve_tac ctxt [th] i THEN Simplifier.asm_full_simp_tac simp_ctxt i end));
   47.12  
   47.13  fun elim_denom_tac ctxt i = REPEAT (elim_one_denom_tac ctxt i);
    48.1 --- a/src/HOL/Library/While_Combinator.thy	Sun Nov 26 13:19:52 2017 +0100
    48.2 +++ b/src/HOL/Library/While_Combinator.thy	Sun Nov 26 21:08:32 2017 +0100
    48.3 @@ -12,8 +12,8 @@
    48.4  subsection \<open>Partial version\<close>
    48.5  
    48.6  definition while_option :: "('a \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'a) \<Rightarrow> 'a \<Rightarrow> 'a option" where
    48.7 -"while_option b c s = (if (\<exists>k. ~ b ((c ^^ k) s))
    48.8 -   then Some ((c ^^ (LEAST k. ~ b ((c ^^ k) s))) s)
    48.9 +"while_option b c s = (if (\<exists>k. \<not> b ((c ^^ k) s))
   48.10 +   then Some ((c ^^ (LEAST k. \<not> b ((c ^^ k) s))) s)
   48.11     else None)"
   48.12  
   48.13  theorem while_option_unfold[code]:
   48.14 @@ -21,42 +21,42 @@
   48.15  proof cases
   48.16    assume "b s"
   48.17    show ?thesis
   48.18 -  proof (cases "\<exists>k. ~ b ((c ^^ k) s)")
   48.19 +  proof (cases "\<exists>k. \<not> b ((c ^^ k) s)")
   48.20      case True
   48.21 -    then obtain k where 1: "~ b ((c ^^ k) s)" ..
   48.22 +    then obtain k where 1: "\<not> b ((c ^^ k) s)" ..
   48.23      with \<open>b s\<close> obtain l where "k = Suc l" by (cases k) auto
   48.24 -    with 1 have "~ b ((c ^^ l) (c s))" by (auto simp: funpow_swap1)
   48.25 -    then have 2: "\<exists>l. ~ b ((c ^^ l) (c s))" ..
   48.26 +    with 1 have "\<not> b ((c ^^ l) (c s))" by (auto simp: funpow_swap1)
   48.27 +    then have 2: "\<exists>l. \<not> b ((c ^^ l) (c s))" ..
   48.28      from 1
   48.29 -    have "(LEAST k. ~ b ((c ^^ k) s)) = Suc (LEAST l. ~ b ((c ^^ Suc l) s))"
   48.30 +    have "(LEAST k. \<not> b ((c ^^ k) s)) = Suc (LEAST l. \<not> b ((c ^^ Suc l) s))"
   48.31        by (rule Least_Suc) (simp add: \<open>b s\<close>)
   48.32 -    also have "... = Suc (LEAST l. ~ b ((c ^^ l) (c s)))"
   48.33 +    also have "... = Suc (LEAST l. \<not> b ((c ^^ l) (c s)))"
   48.34        by (simp add: funpow_swap1)
   48.35      finally
   48.36      show ?thesis 
   48.37        using True 2 \<open>b s\<close> by (simp add: funpow_swap1 while_option_def)
   48.38    next
   48.39      case False
   48.40 -    then have "~ (\<exists>l. ~ b ((c ^^ Suc l) s))" by blast
   48.41 -    then have "~ (\<exists>l. ~ b ((c ^^ l) (c s)))"
   48.42 +    then have "\<not> (\<exists>l. \<not> b ((c ^^ Suc l) s))" by blast
   48.43 +    then have "\<not> (\<exists>l. \<not> b ((c ^^ l) (c s)))"
   48.44        by (simp add: funpow_swap1)
   48.45      with False  \<open>b s\<close> show ?thesis by (simp add: while_option_def)
   48.46    qed
   48.47  next
   48.48 -  assume [simp]: "~ b s"
   48.49 -  have least: "(LEAST k. ~ b ((c ^^ k) s)) = 0"
   48.50 +  assume [simp]: "\<not> b s"
   48.51 +  have least: "(LEAST k. \<not> b ((c ^^ k) s)) = 0"
   48.52      by (rule Least_equality) auto
   48.53    moreover 
   48.54 -  have "\<exists>k. ~ b ((c ^^ k) s)" by (rule exI[of _ "0::nat"]) auto
   48.55 +  have "\<exists>k. \<not> b ((c ^^ k) s)" by (rule exI[of _ "0::nat"]) auto
   48.56    ultimately show ?thesis unfolding while_option_def by auto 
   48.57  qed
   48.58  
   48.59  lemma while_option_stop2:
   48.60 - "while_option b c s = Some t \<Longrightarrow> EX k. t = (c^^k) s \<and> \<not> b t"
   48.61 + "while_option b c s = Some t \<Longrightarrow> \<exists>k. t = (c^^k) s \<and> \<not> b t"
   48.62  apply(simp add: while_option_def split: if_splits)
   48.63  by (metis (lifting) LeastI_ex)
   48.64  
   48.65 -lemma while_option_stop: "while_option b c s = Some t \<Longrightarrow> ~ b t"
   48.66 +lemma while_option_stop: "while_option b c s = Some t \<Longrightarrow> \<not> b t"
   48.67  by(metis while_option_stop2)
   48.68  
   48.69  theorem while_option_rule:
   48.70 @@ -65,13 +65,13 @@
   48.71      and init: "P s"
   48.72    shows "P t"
   48.73  proof -
   48.74 -  define k where "k = (LEAST k. ~ b ((c ^^ k) s))"
   48.75 +  define k where "k = (LEAST k. \<not> b ((c ^^ k) s))"
   48.76    from assms have t: "t = (c ^^ k) s"
   48.77      by (simp add: while_option_def k_def split: if_splits)    
   48.78    have 1: "ALL i<k. b ((c ^^ i) s)"
   48.79      by (auto simp: k_def dest: not_less_Least)
   48.80  
   48.81 -  { fix i assume "i <= k" then have "P ((c ^^ i) s)"
   48.82 +  { fix i assume "i \<le> k" then have "P ((c ^^ i) s)"
   48.83        by (induct i) (auto simp: init step 1) }
   48.84    thus "P t" by (auto simp: t)
   48.85  qed
   48.86 @@ -243,8 +243,8 @@
   48.87  
   48.88  theorem wf_while_option_Some:
   48.89    assumes "wf {(t, s). (P s \<and> b s) \<and> t = c s}"
   48.90 -  and "!!s. P s \<Longrightarrow> b s \<Longrightarrow> P(c s)" and "P s"
   48.91 -  shows "EX t. while_option b c s = Some t"
   48.92 +  and "\<And>s. P s \<Longrightarrow> b s \<Longrightarrow> P(c s)" and "P s"
   48.93 +  shows "\<exists>t. while_option b c s = Some t"
   48.94  using assms(1,3)
   48.95  proof (induction s)
   48.96    case less thus ?case using assms(2)
   48.97 @@ -264,8 +264,8 @@
   48.98  qed
   48.99  
  48.100  theorem measure_while_option_Some: fixes f :: "'s \<Rightarrow> nat"
  48.101 -shows "(!!s. P s \<Longrightarrow> b s \<Longrightarrow> P(c s) \<and> f(c s) < f s)
  48.102 -  \<Longrightarrow> P s \<Longrightarrow> EX t. while_option b c s = Some t"
  48.103 +shows "(\<And>s. P s \<Longrightarrow> b s \<Longrightarrow> P(c s) \<and> f(c s) < f s)
  48.104 +  \<Longrightarrow> P s \<Longrightarrow> \<exists>t. while_option b c s = Some t"
  48.105  by(blast intro: wf_while_option_Some[OF wf_if_measure, of P b f])
  48.106  
  48.107  text\<open>Kleene iteration starting from the empty set and assuming some finite
    49.1 --- a/src/HOL/Library/positivstellensatz.ML	Sun Nov 26 13:19:52 2017 +0100
    49.2 +++ b/src/HOL/Library/positivstellensatz.ML	Sun Nov 26 21:08:32 2017 +0100
    49.3 @@ -177,12 +177,12 @@
    49.4    if exists (curry op aconv (Thm.concl_of tha)) (Thm.hyps_of thb)  (* FIXME !? *)
    49.5    then Thm.equal_elim (Thm.symmetric (deduct_antisym_rule tha thb)) tha else thb;
    49.6  
    49.7 -val pth = @{lemma "(((x::real) < y) == (y - x > 0))" and "((x <= y) == (y - x >= 0))" and
    49.8 -     "((x = y) == (x - y = 0))" and "((~(x < y)) == (x - y >= 0))" and
    49.9 -     "((~(x <= y)) == (x - y > 0))" and "((~(x = y)) == (x - y > 0 | -(x - y) > 0))"
   49.10 +val pth = @{lemma "(((x::real) < y) \<equiv> (y - x > 0))" and "((x \<le> y) \<equiv> (y - x \<ge> 0))" and
   49.11 +     "((x = y) \<equiv> (x - y = 0))" and "((\<not>(x < y)) \<equiv> (x - y \<ge> 0))" and
   49.12 +     "((\<not>(x \<le> y)) \<equiv> (x - y > 0))" and "((\<not>(x = y)) \<equiv> (x - y > 0 \<or> -(x - y) > 0))"
   49.13    by (atomize (full), auto simp add: less_diff_eq le_diff_eq not_less)};
   49.14  
   49.15 -val pth_final = @{lemma "(~p ==> False) ==> p" by blast}
   49.16 +val pth_final = @{lemma "(\<not>p \<Longrightarrow> False) \<Longrightarrow> p" by blast}
   49.17  val pth_add =
   49.18    @{lemma "(x = (0::real) ==> y = 0 ==> x + y = 0 )" and "( x = 0 ==> y >= 0 ==> x + y >= 0)" and
   49.19      "(x = 0 ==> y > 0 ==> x + y > 0)" and "(x >= 0 ==> y = 0 ==> x + y >= 0)" and
   49.20 @@ -204,8 +204,8 @@
   49.21  
   49.22  val weak_dnf_simps =
   49.23    List.take (@{thms simp_thms}, 34) @
   49.24 -    @{lemma "((P & (Q | R)) = ((P&Q) | (P&R)))" and "((Q | R) & P) = ((Q&P) | (R&P))" and
   49.25 -      "(P & Q) = (Q & P)" and "((P | Q) = (Q | P))" by blast+};
   49.26 +    @{lemma "((P \<and> (Q \<or> R)) = ((P\<and>Q) \<or> (P\<and>R)))" and "((Q \<or> R) \<and> P) = ((Q\<and>P) \<or> (R\<and>P))" and
   49.27 +      "(P \<and> Q) = (Q \<and> P)" and "((P \<or> Q) = (Q \<or> P))" by blast+};
   49.28  
   49.29  (*
   49.30  val nnfD_simps =
   49.31 @@ -214,65 +214,65 @@
   49.32      "((~(P = Q)) = ((P & ~ Q) | (~P & Q)) )" and "((~ ~(P)) = P)" by blast+};
   49.33  *)
   49.34  
   49.35 -val choice_iff = @{lemma "(ALL x. EX y. P x y) = (EX f. ALL x. P x (f x))" by metis};
   49.36 +val choice_iff = @{lemma "(\<forall>x. \<exists>y. P x y) = (\<exists>f. \<forall>x. P x (f x))" by metis};
   49.37  val prenex_simps =
   49.38    map (fn th => th RS sym)
   49.39      ([@{thm "all_conj_distrib"}, @{thm "ex_disj_distrib"}] @
   49.40        @{thms "HOL.all_simps"(1-4)} @ @{thms "ex_simps"(1-4)});
   49.41  
   49.42  val real_abs_thms1 = @{lemma
   49.43 -  "((-1 * \<bar>x::real\<bar> >= r) = (-1 * x >= r & 1 * x >= r))" and
   49.44 -  "((-1 * \<bar>x\<bar> + a >= r) = (a + -1 * x >= r & a + 1 * x >= r))" and
   49.45 -  "((a + -1 * \<bar>x\<bar> >= r) = (a + -1 * x >= r & a + 1 * x >= r))" and
   49.46 -  "((a + -1 * \<bar>x\<bar> + b >= r) = (a + -1 * x + b >= r & a + 1 * x + b >= r))" and
   49.47 -  "((a + b + -1 * \<bar>x\<bar> >= r) = (a + b + -1 * x >= r & a + b + 1 * x >= r))" and
   49.48 -  "((a + b + -1 * \<bar>x\<bar> + c >= r) = (a + b + -1 * x + c >= r & a + b + 1 * x + c >= r))" and
   49.49 -  "((-1 * max x y >= r) = (-1 * x >= r & -1 * y >= r))" and
   49.50 -  "((-1 * max x y + a >= r) = (a + -1 * x >= r & a + -1 * y >= r))" and
   49.51 -  "((a + -1 * max x y >= r) = (a + -1 * x >= r & a + -1 * y >= r))" and
   49.52 -  "((a + -1 * max x y + b >= r) = (a + -1 * x + b >= r & a + -1 * y  + b >= r))" and
   49.53 -  "((a + b + -1 * max x y >= r) = (a + b + -1 * x >= r & a + b + -1 * y >= r))" and
   49.54 -  "((a + b + -1 * max x y + c >= r) = (a + b + -1 * x + c >= r & a + b + -1 * y  + c >= r))" and
   49.55 -  "((1 * min x y >= r) = (1 * x >= r & 1 * y >= r))" and
   49.56 -  "((1 * min x y + a >= r) = (a + 1 * x >= r & a + 1 * y >= r))" and
   49.57 -  "((a + 1 * min x y >= r) = (a + 1 * x >= r & a + 1 * y >= r))" and
   49.58 -  "((a + 1 * min x y + b >= r) = (a + 1 * x + b >= r & a + 1 * y  + b >= r))" and
   49.59 -  "((a + b + 1 * min x y >= r) = (a + b + 1 * x >= r & a + b + 1 * y >= r))" and
   49.60 -  "((a + b + 1 * min x y + c >= r) = (a + b + 1 * x + c >= r & a + b + 1 * y  + c >= r))" and
   49.61 -  "((min x y >= r) = (x >= r &  y >= r))" and
   49.62 -  "((min x y + a >= r) = (a + x >= r & a + y >= r))" and
   49.63 -  "((a + min x y >= r) = (a + x >= r & a + y >= r))" and
   49.64 -  "((a + min x y + b >= r) = (a + x + b >= r & a + y  + b >= r))" and
   49.65 -  "((a + b + min x y >= r) = (a + b + x >= r & a + b + y >= r))" and
   49.66 -  "((a + b + min x y + c >= r) = (a + b + x + c >= r & a + b + y + c >= r))" and
   49.67 -  "((-1 * \<bar>x\<bar> > r) = (-1 * x > r & 1 * x > r))" and
   49.68 -  "((-1 * \<bar>x\<bar> + a > r) = (a + -1 * x > r & a + 1 * x > r))" and
   49.69 -  "((a + -1 * \<bar>x\<bar> > r) = (a + -1 * x > r & a + 1 * x > r))" and
   49.70 -  "((a + -1 * \<bar>x\<bar> + b > r) = (a + -1 * x + b > r & a + 1 * x + b > r))" and
   49.71 -  "((a + b + -1 * \<bar>x\<bar> > r) = (a + b + -1 * x > r & a + b + 1 * x > r))" and
   49.72 -  "((a + b + -1 * \<bar>x\<bar> + c > r) = (a + b + -1 * x + c > r & a + b + 1 * x + c > r))" and
   49.73 -  "((-1 * max x y > r) = ((-1 * x > r) & -1 * y > r))" and
   49.74 -  "((-1 * max x y + a > r) = (a + -1 * x > r & a + -1 * y > r))" and
   49.75 -  "((a + -1 * max x y > r) = (a + -1 * x > r & a + -1 * y > r))" and
   49.76 -  "((a + -1 * max x y + b > r) = (a + -1 * x + b > r & a + -1 * y  + b > r))" and
   49.77 -  "((a + b + -1 * max x y > r) = (a + b + -1 * x > r & a + b + -1 * y > r))" and
   49.78 -  "((a + b + -1 * max x y + c > r) = (a + b + -1 * x + c > r & a + b + -1 * y  + c > r))" and
   49.79 -  "((min x y > r) = (x > r &  y > r))" and
   49.80 -  "((min x y + a > r) = (a + x > r & a + y > r))" and
   49.81 -  "((a + min x y > r) = (a + x > r & a + y > r))" and
   49.82 -  "((a + min x y + b > r) = (a + x + b > r & a + y  + b > r))" and
   49.83 -  "((a + b + min x y > r) = (a + b + x > r & a + b + y > r))" and
   49.84 -  "((a + b + min x y + c > r) = (a + b + x + c > r & a + b + y + c > r))"
   49.85 +  "((-1 * \<bar>x::real\<bar> \<ge> r) = (-1 * x \<ge> r \<and> 1 * x \<ge> r))" and
   49.86 +  "((-1 * \<bar>x\<bar> + a \<ge> r) = (a + -1 * x \<ge> r \<and> a + 1 * x \<ge> r))" and
   49.87 +  "((a + -1 * \<bar>x\<bar> \<ge> r) = (a + -1 * x \<ge> r \<and> a + 1 * x \<ge> r))" and
   49.88 +  "((a + -1 * \<bar>x\<bar> + b \<ge> r) = (a + -1 * x + b \<ge> r \<and> a + 1 * x + b \<ge> r))" and
   49.89 +  "((a + b + -1 * \<bar>x\<bar> \<ge> r) = (a + b + -1 * x \<ge> r \<and> a + b + 1 * x \<ge> r))" and
   49.90 +  "((a + b + -1 * \<bar>x\<bar> + c \<ge> r) = (a + b + -1 * x + c \<ge> r \<and> a + b + 1 * x + c \<ge> r))" and
   49.91 +  "((-1 * max x y \<ge> r) = (-1 * x \<ge> r \<and> -1 * y \<ge> r))" and
   49.92 +  "((-1 * max x y + a \<ge> r) = (a + -1 * x \<ge> r \<and> a + -1 * y \<ge> r))" and
   49.93 +  "((a + -1 * max x y \<ge> r) = (a + -1 * x \<ge> r \<and> a + -1 * y \<ge> r))" and
   49.94 +  "((a + -1 * max x y + b \<ge> r) = (a + -1 * x + b \<ge> r \<and> a + -1 * y  + b \<ge> r))" and
   49.95 +  "((a + b + -1 * max x y \<ge> r) = (a + b + -1 * x \<ge> r \<and> a + b + -1 * y \<ge> r))" and
   49.96 +  "((a + b + -1 * max x y + c \<ge> r) = (a + b + -1 * x + c \<ge> r \<and> a + b + -1 * y  + c \<ge> r))" and
   49.97 +  "((1 * min x y \<ge> r) = (1 * x \<ge> r \<and> 1 * y \<ge> r))" and
   49.98 +  "((1 * min x y + a \<ge> r) = (a + 1 * x \<ge> r \<and> a + 1 * y \<ge> r))" and
   49.99 +  "((a + 1 * min x y \<ge> r) = (a + 1 * x \<ge> r \<and> a + 1 * y \<ge> r))" and
  49.100 +  "((a + 1 * min x y + b \<ge> r) = (a + 1 * x + b \<ge> r \<and> a + 1 * y  + b \<ge> r))" and
  49.101 +  "((a + b + 1 * min x y \<ge> r) = (a + b + 1 * x \<ge> r \<and> a + b + 1 * y \<ge> r))" and
  49.102 +  "((a + b + 1 * min x y + c \<ge> r) = (a + b + 1 * x + c \<ge> r \<and> a + b + 1 * y  + c \<ge> r))" and
  49.103 +  "((min x y \<ge> r) = (x \<ge> r \<and> y \<ge> r))" and
  49.104 +  "((min x y + a \<ge> r) = (a + x \<ge> r \<and> a + y \<ge> r))" and
  49.105 +  "((a + min x y \<ge> r) = (a + x \<ge> r \<and> a + y \<ge> r))" and
  49.106 +  "((a + min x y + b \<ge> r) = (a + x + b \<ge> r \<and> a + y  + b \<ge> r))" and
  49.107 +  "((a + b + min x y \<ge> r) = (a + b + x \<ge> r \<and> a + b + y \<ge> r))" and
  49.108 +  "((a + b + min x y + c \<ge> r) = (a + b + x + c \<ge> r \<and> a + b + y + c \<ge> r))" and
  49.109 +  "((-1 * \<bar>x\<bar> > r) = (-1 * x > r \<and> 1 * x > r))" and
  49.110 +  "((-1 * \<bar>x\<bar> + a > r) = (a + -1 * x > r \<and> a + 1 * x > r))" and
  49.111 +  "((a + -1 * \<bar>x\<bar> > r) = (a + -1 * x > r \<and> a + 1 * x > r))" and
  49.112 +  "((a + -1 * \<bar>x\<bar> + b > r) = (a + -1 * x + b > r \<and> a + 1 * x + b > r))" and
  49.113 +  "((a + b + -1 * \<bar>x\<bar> > r) = (a + b + -1 * x > r \<and> a + b + 1 * x > r))" and
  49.114 +  "((a + b + -1 * \<bar>x\<bar> + c > r) = (a + b + -1 * x + c > r \<and> a + b + 1 * x + c > r))" and
  49.115 +  "((-1 * max x y > r) = ((-1 * x > r) \<and> -1 * y > r))" and
  49.116 +  "((-1 * max x y + a > r) = (a + -1 * x > r \<and> a + -1 * y > r))" and
  49.117 +  "((a + -1 * max x y > r) = (a + -1 * x > r \<and> a + -1 * y > r))" and
  49.118 +  "((a + -1 * max x y + b > r) = (a + -1 * x + b > r \<and> a + -1 * y  + b > r))" and
  49.119 +  "((a + b + -1 * max x y > r) = (a + b + -1 * x > r \<and> a + b + -1 * y > r))" and
  49.120 +  "((a + b + -1 * max x y + c > r) = (a + b + -1 * x + c > r \<and> a + b + -1 * y  + c > r))" and
  49.121 +  "((min x y > r) = (x > r \<and> y > r))" and
  49.122 +  "((min x y + a > r) = (a + x > r \<and> a + y > r))" and
  49.123 +  "((a + min x y > r) = (a + x > r \<and> a + y > r))" and
  49.124 +  "((a + min x y + b > r) = (a + x + b > r \<and> a + y  + b > r))" and
  49.125 +  "((a + b + min x y > r) = (a + b + x > r \<and> a + b + y > r))" and
  49.126 +  "((a + b + min x y + c > r) = (a + b + x + c > r \<and> a + b + y + c > r))"
  49.127    by auto};
  49.128  
  49.129 -val abs_split' = @{lemma "P \<bar>x::'a::linordered_idom\<bar> == (x >= 0 & P x | x < 0 & P (-x))"
  49.130 +val abs_split' = @{lemma "P \<bar>x::'a::linordered_idom\<bar> == (x \<ge> 0 \<and> P x \<or> x < 0 \<and> P (-x))"
  49.131    by (atomize (full)) (auto split: abs_split)};
  49.132  
  49.133 -val max_split = @{lemma "P (max x y) == ((x::'a::linorder) <= y & P y | x > y & P x)"
  49.134 -  by (atomize (full)) (cases "x <= y", auto simp add: max_def)};
  49.135 +val max_split = @{lemma "P (max x y) \<equiv> ((x::'a::linorder) \<le> y \<and> P y \<or> x > y \<and> P x)"
  49.136 +  by (atomize (full)) (cases "x \<le> y", auto simp add: max_def)};
  49.137  
  49.138 -val min_split = @{lemma "P (min x y) == ((x::'a::linorder) <= y & P x | x > y & P y)"
  49.139 -  by (atomize (full)) (cases "x <= y", auto simp add: min_def)};
  49.140 +val min_split = @{lemma "P (min x y) \<equiv> ((x::'a::linorder) \<le> y \<and> P x \<or> x > y \<and> P y)"
  49.141 +  by (atomize (full)) (cases "x \<le> y", auto simp add: min_def)};
  49.142  
  49.143  
  49.144           (* Miscellaneous *)
    50.1 --- a/src/HOL/Limited_Sequence.thy	Sun Nov 26 13:19:52 2017 +0100
    50.2 +++ b/src/HOL/Limited_Sequence.thy	Sun Nov 26 21:08:32 2017 +0100
    50.3 @@ -171,8 +171,8 @@
    50.4  definition neg_not_seq :: "unit pos_dseq \<Rightarrow> unit neg_dseq"
    50.5  where
    50.6    "neg_not_seq x = (\<lambda>i. case Lazy_Sequence.yield (x i) of
    50.7 -    None => Lazy_Sequence.hb_single ()
    50.8 -  | Some ((), xq) => Lazy_Sequence.empty)"
    50.9 +    None \<Rightarrow> Lazy_Sequence.hb_single ()
   50.10 +  | Some ((), xq) \<Rightarrow> Lazy_Sequence.empty)"
   50.11  
   50.12  
   50.13  ML \<open>
    51.1 --- a/src/HOL/Limits.thy	Sun Nov 26 13:19:52 2017 +0100
    51.2 +++ b/src/HOL/Limits.thy	Sun Nov 26 21:08:32 2017 +0100
    51.3 @@ -2365,7 +2365,7 @@
    51.4    
    51.5  lemma uniformly_continuous_imp_Cauchy_continuous:
    51.6    fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space"
    51.7 -  shows "\<lbrakk>uniformly_continuous_on S f; Cauchy \<sigma>; \<And>n. (\<sigma> n) \<in> S\<rbrakk> \<Longrightarrow> Cauchy(f o \<sigma>)"
    51.8 +  shows "\<lbrakk>uniformly_continuous_on S f; Cauchy \<sigma>; \<And>n. (\<sigma> n) \<in> S\<rbrakk> \<Longrightarrow> Cauchy(f \<circ> \<sigma>)"
    51.9    by (simp add: uniformly_continuous_on_def Cauchy_def) meson
   51.10  
   51.11  lemma (in bounded_linear) isUCont: "isUCont f"
    52.1 --- a/src/HOL/List.thy	Sun Nov 26 13:19:52 2017 +0100
    52.2 +++ b/src/HOL/List.thy	Sun Nov 26 21:08:32 2017 +0100
    52.3 @@ -147,7 +147,7 @@
    52.4  primrec zip :: "'a list \<Rightarrow> 'b list \<Rightarrow> ('a \<times> 'b) list" where
    52.5  "zip xs [] = []" |
    52.6  zip_Cons: "zip xs (y # ys) =
    52.7 -  (case xs of [] => [] | z # zs => (z, y) # zip zs ys)"
    52.8 +  (case xs of [] \<Rightarrow> [] | z # zs \<Rightarrow> (z, y) # zip zs ys)"
    52.9    \<comment> \<open>Warning: simpset does not contain this definition, but separate
   52.10         theorems for \<open>xs = []\<close> and \<open>xs = z # zs\<close>\<close>
   52.11  
   52.12 @@ -182,7 +182,7 @@
   52.13  "find P (x#xs) = (if P x then Some x else find P xs)"
   52.14  
   52.15  text \<open>In the context of multisets, \<open>count_list\<close> is equivalent to
   52.16 -  @{term "count o mset"} and it it advisable to use the latter.\<close>
   52.17 +  @{term "count \<circ> mset"} and it it advisable to use the latter.\<close>
   52.18  primrec count_list :: "'a list \<Rightarrow> 'a \<Rightarrow> nat" where
   52.19  "count_list [] y = 0" |
   52.20  "count_list (x#xs) y = (if x=y then count_list xs y + 1 else count_list xs y)"
   52.21 @@ -190,9 +190,9 @@
   52.22  definition
   52.23     "extract" :: "('a \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> ('a list * 'a * 'a list) option"
   52.24  where "extract P xs =
   52.25 -  (case dropWhile (Not o P) xs of
   52.26 +  (case dropWhile (Not \<circ> P) xs of
   52.27       [] \<Rightarrow> None |
   52.28 -     y#ys \<Rightarrow> Some(takeWhile (Not o P) xs, y, ys))"
   52.29 +     y#ys \<Rightarrow> Some(takeWhile (Not \<circ> P) xs, y, ys))"
   52.30  
   52.31  hide_const (open) "extract"
   52.32  
   52.33 @@ -783,10 +783,10 @@
   52.34  lemma neq_Nil_conv: "(xs \<noteq> []) = (\<exists>y ys. xs = y # ys)"
   52.35  by (induct xs) auto
   52.36  
   52.37 -lemma tl_Nil: "tl xs = [] \<longleftrightarrow> xs = [] \<or> (EX x. xs = [x])"
   52.38 +lemma tl_Nil: "tl xs = [] \<longleftrightarrow> xs = [] \<or> (\<exists>x. xs = [x])"
   52.39  by (cases xs) auto
   52.40  
   52.41 -lemma Nil_tl: "[] = tl xs \<longleftrightarrow> xs = [] \<or> (EX x. xs = [x])"
   52.42 +lemma Nil_tl: "[] = tl xs \<longleftrightarrow> xs = [] \<or> (\<exists>x. xs = [x])"
   52.43  by (cases xs) auto
   52.44  
   52.45  lemma length_induct:
   52.46 @@ -987,7 +987,7 @@
   52.47  done
   52.48  
   52.49  lemma append_eq_append_conv2: "(xs @ ys = zs @ ts) =
   52.50 -  (EX us. xs = zs @ us & us @ ys = ts | xs @ us = zs & ys = us@ ts)"
   52.51 +  (\<exists>us. xs = zs @ us \<and> us @ ys = ts \<or> xs @ us = zs \<and> ys = us @ ts)"
   52.52  apply (induct xs arbitrary: ys zs ts)
   52.53   apply fastforce
   52.54  apply(case_tac zs)
   52.55 @@ -1019,7 +1019,7 @@
   52.56  lemma hd_append2 [simp]: "xs \<noteq> [] ==> hd (xs @ ys) = hd xs"
   52.57  by (simp add: hd_append split: list.split)
   52.58  
   52.59 -lemma tl_append: "tl (xs @ ys) = (case xs of [] => tl ys | z#zs => zs @ ys)"
   52.60 +lemma tl_append: "tl (xs @ ys) = (case xs of [] \<Rightarrow> tl ys | z#zs \<Rightarrow> zs @ ys)"
   52.61  by (simp split: list.split)
   52.62  
   52.63  lemma tl_append2 [simp]: "xs \<noteq> [] ==> tl (xs @ ys) = tl xs @ ys"
   52.64 @@ -1027,11 +1027,11 @@
   52.65  
   52.66  
   52.67  lemma Cons_eq_append_conv: "x#xs = ys@zs =
   52.68 - (ys = [] & x#xs = zs | (EX ys'. x#ys' = ys & xs = ys'@zs))"
   52.69 + (ys = [] \<and> x#xs = zs \<or> (\<exists>ys'. x#ys' = ys \<and> xs = ys'@zs))"
   52.70  by(cases ys) auto
   52.71  
   52.72  lemma append_eq_Cons_conv: "(ys@zs = x#xs) =
   52.73 - (ys = [] & zs = x#xs | (EX ys'. ys = x#ys' & ys'@zs = xs))"
   52.74 + (ys = [] \<and> zs = x#xs \<or> (\<exists>ys'. ys = x#ys' \<and> ys'@zs = xs))"
   52.75  by(cases ys) auto
   52.76  
   52.77  lemma longest_common_prefix:
   52.78 @@ -1112,7 +1112,7 @@
   52.79  lemma map_tl: "map f (tl xs) = tl (map f xs)"
   52.80  by (cases xs) simp_all
   52.81  
   52.82 -lemma map_ext: "(!!x. x : set xs --> f x = g x) ==> map f xs = map g xs"
   52.83 +lemma map_ext: "(\<And>x. x \<in> set xs \<longrightarrow> f x = g x) ==> map f xs = map g xs"
   52.84  by (induct xs) simp_all
   52.85  
   52.86  lemma map_ident [simp]: "map (\<lambda>x. x) = (\<lambda>xs. xs)"
   52.87 @@ -1124,7 +1124,7 @@
   52.88  lemma map_map [simp]: "map f (map g xs) = map (f \<circ> g) xs"
   52.89  by (induct xs) auto
   52.90  
   52.91 -lemma map_comp_map[simp]: "((map f) o (map g)) = map(f o g)"
   52.92 +lemma map_comp_map[simp]: "((map f) \<circ> (map g)) = map(f \<circ> g)"
   52.93  by (rule ext) simp
   52.94  
   52.95  lemma rev_map: "rev (map f xs) = map f (rev xs)"
   52.96 @@ -1156,7 +1156,7 @@
   52.97  declare map_eq_Cons_D [dest!]  Cons_eq_map_D [dest!]
   52.98  
   52.99  lemma ex_map_conv:
  52.100 -  "(EX xs. ys = map f xs) = (ALL y : set ys. EX x. y = f x)"
  52.101 +  "(\<exists>xs. ys = map f xs) = (\<forall>y \<in> set ys. \<exists>x. y = f x)"
  52.102  by(induct ys, auto simp add: Cons_eq_map_conv)
  52.103  
  52.104  lemma map_eq_imp_length_eq:
  52.105 @@ -1380,7 +1380,7 @@
  52.106    "(x : set xs) = (\<exists>ys zs. xs = ys @ x # zs \<and> x \<notin> set zs)"
  52.107    by (auto dest!: split_list_last)
  52.108  
  52.109 -lemma split_list_prop: "\<exists>x \<in> set xs. P x \<Longrightarrow> \<exists>ys x zs. xs = ys @ x # zs & P x"
  52.110 +lemma split_list_prop: "\<exists>x \<in> set xs. P x \<Longrightarrow> \<exists>ys x zs. xs = ys @ x # zs \<and> P x"
  52.111  proof (induct xs)
  52.112    case Nil thus ?case by simp
  52.113  next
  52.114 @@ -1450,7 +1450,7 @@
  52.115    by rule (erule split_list_last_prop, auto)
  52.116  
  52.117  
  52.118 -lemma finite_list: "finite A ==> EX xs. set xs = A"
  52.119 +lemma finite_list: "finite A \<Longrightarrow> \<exists>xs. set xs = A"
  52.120    by (erule finite_induct) (auto simp add: list.set(2)[symmetric] simp del: list.set(2))
  52.121  
  52.122  lemma card_length: "card (set xs) \<le> length xs"
  52.123 @@ -1481,7 +1481,7 @@
  52.124  by (induct xs) (auto simp add: le_SucI)
  52.125  
  52.126  lemma sum_length_filter_compl:
  52.127 -  "length(filter P xs) + length(filter (%x. ~P x) xs) = length xs"
  52.128 +  "length(filter P xs) + length(filter (\<lambda>x. \<not>P x) xs) = length xs"
  52.129  by(induct xs) simp_all
  52.130  
  52.131  lemma filter_True [simp]: "\<forall>x \<in> set xs. P x ==> filter P xs = xs"
  52.132 @@ -1500,18 +1500,18 @@
  52.133  apply simp
  52.134  done
  52.135  
  52.136 -lemma filter_map: "filter P (map f xs) = map f (filter (P o f) xs)"
  52.137 +lemma filter_map: "filter P (map f xs) = map f (filter (P \<circ> f) xs)"
  52.138  by (induct xs) simp_all
  52.139  
  52.140  lemma length_filter_map[simp]:
  52.141 -  "length (filter P (map f xs)) = length(filter (P o f) xs)"
  52.142 +  "length (filter P (map f xs)) = length(filter (P \<circ> f) xs)"
  52.143  by (simp add:filter_map)
  52.144  
  52.145  lemma filter_is_subset [simp]: "set (filter P xs) \<le> set xs"
  52.146  by auto
  52.147  
  52.148  lemma length_filter_less:
  52.149 -  "\<lbrakk> x : set xs; ~ P x \<rbrakk> \<Longrightarrow> length(filter P xs) < length xs"
  52.150 +  "\<lbrakk> x \<in> set xs; \<not> P x \<rbrakk> \<Longrightarrow> length(filter P xs) < length xs"
  52.151  proof (induct xs)
  52.152    case Nil thus ?case by simp
  52.153  next
  52.154 @@ -1522,12 +1522,12 @@
  52.155  qed
  52.156  
  52.157  lemma length_filter_conv_card:
  52.158 -  "length(filter p xs) = card{i. i < length xs & p(xs!i)}"
  52.159 +  "length(filter p xs) = card{i. i < length xs \<and> p(xs!i)}"
  52.160  proof (induct xs)
  52.161    case Nil thus ?case by simp
  52.162  next
  52.163    case (Cons x xs)
  52.164 -  let ?S = "{i. i < length xs & p(xs!i)}"
  52.165 +  let ?S = "{i. i < length xs \<and> p(xs!i)}"
  52.166    have fin: "finite ?S" by(fast intro: bounded_nat_set_is_finite)
  52.167    show ?case (is "?l = card ?S'")
  52.168    proof (cases)
  52.169 @@ -1621,7 +1621,7 @@
  52.170  lemma partition_filter1: "fst (partition P xs) = filter P xs"
  52.171  by (induct xs) (auto simp add: Let_def split_def)
  52.172  
  52.173 -lemma partition_filter2: "snd (partition P xs) = filter (Not o P) xs"
  52.174 +lemma partition_filter2: "snd (partition P xs) = filter (Not \<circ> P) xs"
  52.175  by (induct xs) (auto simp add: Let_def split_def)
  52.176  
  52.177  lemma partition_P:
  52.178 @@ -1643,7 +1643,7 @@
  52.179  qed
  52.180  
  52.181  lemma partition_filter_conv[simp]:
  52.182 -  "partition f xs = (filter f xs,filter (Not o f) xs)"
  52.183 +  "partition f xs = (filter f xs,filter (Not \<circ> f) xs)"
  52.184  unfolding partition_filter2[symmetric]
  52.185  unfolding partition_filter1[symmetric] by simp
  52.186  
  52.187 @@ -1784,7 +1784,7 @@
  52.188  by (auto simp add: set_conv_nth)
  52.189  
  52.190  lemma all_set_conv_all_nth:
  52.191 -  "(\<forall>x \<in> set xs. P x) = (\<forall>i. i < length xs --> P (xs ! i))"
  52.192 +  "(\<forall>x \<in> set xs. P x) = (\<forall>i. i < length xs \<longrightarrow> P (xs ! i))"
  52.193  by (auto simp add: set_conv_nth)
  52.194  
  52.195  lemma rev_nth:
  52.196 @@ -1808,18 +1808,18 @@
  52.197  qed
  52.198  
  52.199  lemma Skolem_list_nth:
  52.200 -  "(ALL i<k. EX x. P i x) = (EX xs. size xs = k & (ALL i<k. P i (xs!i)))"
  52.201 -  (is "_ = (EX xs. ?P k xs)")
  52.202 +  "(\<forall>i<k. \<exists>x. P i x) = (\<exists>xs. size xs = k \<and> (\<forall>i<k. P i (xs!i)))"
  52.203 +  (is "_ = (\<exists>xs. ?P k xs)")
  52.204  proof(induct k)
  52.205    case 0 show ?case by simp
  52.206  next
  52.207    case (Suc k)
  52.208 -  show ?case (is "?L = ?R" is "_ = (EX xs. ?P' xs)")
  52.209 +  show ?case (is "?L = ?R" is "_ = (\<exists>xs. ?P' xs)")
  52.210    proof
  52.211      assume "?R" thus "?L" using Suc by auto
  52.212    next
  52.213      assume "?L"
  52.214 -    with Suc obtain x xs where "?P k xs & P k x" by (metis less_Suc_eq)
  52.215 +    with Suc obtain x xs where "?P k xs \<and> P k x" by (metis less_Suc_eq)
  52.216      hence "?P'(xs@[x])" by(simp add:nth_append less_Suc_eq)
  52.217      thus "?R" ..
  52.218    qed
  52.219 @@ -1967,7 +1967,7 @@
  52.220  by (induct xs) (auto split: if_split_asm)
  52.221  
  52.222  lemma in_set_butlast_appendI:
  52.223 -  "x : set (butlast xs) | x : set (butlast ys) ==> x : set (butlast (xs @ ys))"
  52.224 +  "x \<in> set (butlast xs) \<or> x \<in> set (butlast ys) \<Longrightarrow> x \<in> set (butlast (xs @ ys))"
  52.225  by (auto dest: in_set_butlastD simp add: butlast_append)
  52.226  
  52.227  lemma last_drop[simp]: "n < length xs \<Longrightarrow> last (drop n xs) = last xs"
  52.228 @@ -2004,7 +2004,7 @@
  52.229  by (induct xs) simp_all
  52.230  
  52.231  lemma snoc_eq_iff_butlast:
  52.232 -  "xs @ [x] = ys \<longleftrightarrow> (ys \<noteq> [] & butlast ys = xs & last ys = x)"
  52.233 +  "xs @ [x] = ys \<longleftrightarrow> (ys \<noteq> [] \<and> butlast ys = xs \<and> last ys = x)"
  52.234  by fastforce
  52.235  
  52.236  corollary longest_common_suffix:
  52.237 @@ -2036,7 +2036,7 @@
  52.238  
  52.239  declare take_Cons [simp del] and drop_Cons [simp del]
  52.240  
  52.241 -lemma take_Suc: "xs ~= [] ==> take (Suc n) xs = hd xs # take n (tl xs)"
  52.242 +lemma take_Suc: "xs \<noteq> [] \<Longrightarrow> take (Suc n) xs = hd xs # take n (tl xs)"
  52.243  by(clarsimp simp add:neq_Nil_conv)
  52.244  
  52.245  lemma drop_Suc: "drop (Suc n) xs = drop n (tl xs)"
  52.246 @@ -2285,7 +2285,7 @@
  52.247  by (induct xs) auto
  52.248  
  52.249  lemma takeWhile_append1 [simp]:
  52.250 -  "[| x:set xs; ~P(x)|] ==> takeWhile P (xs @ ys) = takeWhile P xs"
  52.251 +  "\<lbrakk>x \<in> set xs; \<not>P(x)\<rbrakk> \<Longrightarrow> takeWhile P (xs @ ys) = takeWhile P xs"
  52.252  by (induct xs) auto
  52.253  
  52.254  lemma takeWhile_append2 [simp]:
  52.255 @@ -2306,7 +2306,7 @@
  52.256  by (induct xs) auto
  52.257  
  52.258  lemma dropWhile_append1 [simp]:
  52.259 -  "[| x : set xs; ~P(x)|] ==> dropWhile P (xs @ ys) = (dropWhile P xs)@ys"
  52.260 +  "\<lbrakk>x \<in> set xs; \<not>P(x)\<rbrakk> \<Longrightarrow> dropWhile P (xs @ ys) = (dropWhile P xs)@ys"
  52.261  by (induct xs) auto
  52.262  
  52.263  lemma dropWhile_append2 [simp]:
  52.264 @@ -2336,7 +2336,7 @@
  52.265  by(induct xs, auto)
  52.266  
  52.267  lemma dropWhile_eq_Cons_conv:
  52.268 -  "(dropWhile P xs = y#ys) = (xs = takeWhile P xs @ y # ys & \<not> P y)"
  52.269 +  "(dropWhile P xs = y#ys) = (xs = takeWhile P xs @ y # ys \<and> \<not> P y)"
  52.270  by(induct xs, auto)
  52.271  
  52.272  lemma distinct_takeWhile[simp]: "distinct xs ==> distinct (takeWhile P xs)"
  52.273 @@ -2693,7 +2693,7 @@
  52.274  
  52.275  lemma list_all2_append1:
  52.276    "list_all2 P (xs @ ys) zs =
  52.277 -  (EX us vs. zs = us @ vs \<and> length us = length xs \<and> length vs = length ys \<and>
  52.278 +  (\<exists>us vs. zs = us @ vs \<and> length us = length xs \<and> length vs = length ys \<and>
  52.279      list_all2 P xs us \<and> list_all2 P ys vs)"
  52.280  apply (simp add: list_all2_iff zip_append1)
  52.281  apply (rule iffI)
  52.282 @@ -2705,7 +2705,7 @@
  52.283  
  52.284  lemma list_all2_append2:
  52.285    "list_all2 P xs (ys @ zs) =
  52.286 -  (EX us vs. xs = us @ vs \<and> length us = length ys \<and> length vs = length zs \<and>
  52.287 +  (\<exists>us vs. xs = us @ vs \<and> length us = length ys \<and> length vs = length zs \<and>
  52.288      list_all2 P us ys \<and> list_all2 P vs zs)"
  52.289  apply (simp add: list_all2_iff zip_append2)
  52.290  apply (rule iffI)
  52.291 @@ -2904,7 +2904,7 @@
  52.292  lemma fold_append [simp]: "fold f (xs @ ys) = fold f ys \<circ> fold f xs"
  52.293  by (induct xs) simp_all
  52.294  
  52.295 -lemma fold_map [code_unfold]: "fold g (map f xs) = fold (g o f) xs"
  52.296 +lemma fold_map [code_unfold]: "fold g (map f xs) = fold (g \<circ> f) xs"
  52.297  by (induct xs) simp_all
  52.298  
  52.299  lemma fold_filter:
  52.300 @@ -3044,7 +3044,7 @@
  52.301  lemma foldl_append [simp]: "foldl f a (xs @ ys) = foldl f (foldl f a xs) ys"
  52.302  by (simp add: foldl_conv_fold)
  52.303  
  52.304 -lemma foldr_map [code_unfold]: "foldr g (map f xs) a = foldr (g o f) xs a"
  52.305 +lemma foldr_map [code_unfold]: "foldr g (map f xs) a = foldr (g \<circ> f) xs a"
  52.306  by (simp add: foldr_conv_fold fold_map rev_map)
  52.307  
  52.308  lemma foldr_filter:
  52.309 @@ -3075,7 +3075,7 @@
  52.310  by(induct j)simp_all
  52.311  
  52.312  lemma upt_eq_Cons_conv:
  52.313 - "([i..<j] = x#xs) = (i < j & i = x & [i+1..<j] = xs)"
  52.314 + "([i..<j] = x#xs) = (i < j \<and> i = x \<and> [i+1..<j] = xs)"
  52.315  apply(induct j arbitrary: x xs)
  52.316   apply simp
  52.317  apply(clarsimp simp add: append_eq_Cons_conv)
  52.318 @@ -3147,8 +3147,8 @@
  52.319  
  52.320  
  52.321  lemma nth_take_lemma:
  52.322 -  "k <= length xs ==> k <= length ys ==>
  52.323 -     (!!i. i < k --> xs!i = ys!i) ==> take k xs = take k ys"
  52.324 +  "k \<le> length xs \<Longrightarrow> k \<le> length ys \<Longrightarrow>
  52.325 +     (\<And>i. i < k \<longrightarrow> xs!i = ys!i) \<Longrightarrow> take k xs = take k ys"
  52.326  apply (atomize, induct k arbitrary: xs ys)
  52.327  apply (simp_all add: less_Suc_eq_0_disj all_conj_distrib, clarify)
  52.328  txt \<open>Both lists must be non-empty\<close>
  52.329 @@ -3294,7 +3294,7 @@
  52.330  lemma remdups_id_iff_distinct [simp]: "remdups xs = xs \<longleftrightarrow> distinct xs"
  52.331  by (metis distinct_remdups distinct_remdups_id)
  52.332  
  52.333 -lemma finite_distinct_list: "finite A \<Longrightarrow> EX xs. set xs = A & distinct xs"
  52.334 +lemma finite_distinct_list: "finite A \<Longrightarrow> \<exists>xs. set xs = A \<and> distinct xs"
  52.335  by (metis distinct_remdups finite_list set_remdups)
  52.336  
  52.337  lemma remdups_eq_nil_iff [simp]: "(remdups x = []) = (x = [])"
  52.338 @@ -3319,7 +3319,7 @@
  52.339  by (induct xs) auto
  52.340  
  52.341  lemma distinct_map:
  52.342 -  "distinct(map f xs) = (distinct xs & inj_on f (set xs))"
  52.343 +  "distinct(map f xs) = (distinct xs \<and> inj_on f (set xs))"
  52.344  by (induct xs) auto
  52.345  
  52.346  lemma distinct_map_filter:
  52.347 @@ -3379,7 +3379,7 @@
  52.348  sometimes it is useful.\<close>
  52.349  
  52.350  lemma distinct_conv_nth:
  52.351 -"distinct xs = (\<forall>i < size xs. \<forall>j < size xs. i \<noteq> j --> xs!i \<noteq> xs!j)"
  52.352 +"distinct xs = (\<forall>i < size xs. \<forall>j < size xs. i \<noteq> j \<longrightarrow> xs!i \<noteq> xs!j)"
  52.353  apply (induct xs, simp, simp)
  52.354  apply (rule iffI, clarsimp)
  52.355   apply (case_tac i)
  52.356 @@ -3451,7 +3451,7 @@
  52.357  lemma distinct_length_filter: "distinct xs \<Longrightarrow> length (filter P xs) = card ({x. P x} Int set xs)"
  52.358  by (induct xs) (auto)
  52.359  
  52.360 -lemma not_distinct_decomp: "~ distinct ws ==> EX xs ys zs y. ws = xs@[y]@ys@[y]@zs"
  52.361 +lemma not_distinct_decomp: "\<not> distinct ws \<Longrightarrow> \<exists>xs ys zs y. ws = xs@[y]@ys@[y]@zs"
  52.362  apply (induct n == "length ws" arbitrary:ws) apply simp
  52.363  apply(case_tac ws) apply simp
  52.364  apply (simp split:if_split_asm)
  52.365 @@ -3563,7 +3563,7 @@
  52.366  by force
  52.367  
  52.368  lemma remdups_adj_altdef: "(remdups_adj xs = ys) \<longleftrightarrow>
  52.369 -  (\<exists>f::nat => nat. mono f & f ` {0 ..< size xs} = {0 ..< size ys}
  52.370 +  (\<exists>f::nat => nat. mono f \<and> f ` {0 ..< size xs} = {0 ..< size ys}
  52.371      \<and> (\<forall>i < size xs. xs!i = ys!(f i))
  52.372      \<and> (\<forall>i. i + 1 < size xs \<longrightarrow> (xs!i = xs!(i+1) \<longleftrightarrow> f i = f(i+1))))" (is "?L \<longleftrightarrow> (\<exists>f. ?p f xs ys)")
  52.373  proof
  52.374 @@ -3645,7 +3645,7 @@
  52.375      proof cases
  52.376        assume "x1 = x2"
  52.377  
  52.378 -      let ?f' = "f o Suc"
  52.379 +      let ?f' = "f \<circ> Suc"
  52.380  
  52.381        have "remdups_adj (x1 # xs) = ys"
  52.382        proof (intro "3.hyps" exI conjI impI allI)
  52.383 @@ -4114,15 +4114,15 @@
  52.384  lemma set_replicate_conv_if: "set (replicate n x) = (if n = 0 then {} else {x})"
  52.385  by auto
  52.386  
  52.387 -lemma in_set_replicate[simp]: "(x : set (replicate n y)) = (x = y & n \<noteq> 0)"
  52.388 +lemma in_set_replicate[simp]: "(x \<in> set (replicate n y)) = (x = y \<and> n \<noteq> 0)"
  52.389  by (simp add: set_replicate_conv_if)
  52.390  
  52.391  lemma Ball_set_replicate[simp]:
  52.392 -  "(ALL x : set(replicate n a). P x) = (P a | n=0)"
  52.393 +  "(\<forall>x \<in> set(replicate n a). P x) = (P a \<or> n=0)"
  52.394  by(simp add: set_replicate_conv_if)
  52.395  
  52.396  lemma Bex_set_replicate[simp]:
  52.397 -  "(EX x : set(replicate n a). P x) = (P a & n\<noteq>0)"
  52.398 +  "(\<exists>x \<in> set(replicate n a). P x) = (P a \<and> n\<noteq>0)"
  52.399  by(simp add: set_replicate_conv_if)
  52.400  
  52.401  lemma replicate_append_same:
  52.402 @@ -4144,7 +4144,7 @@
  52.403  by (induct n) auto
  52.404  
  52.405  lemma replicate_eq_replicate[simp]:
  52.406 -  "(replicate m x = replicate n y) \<longleftrightarrow> (m=n & (m\<noteq>0 \<longrightarrow> x=y))"
  52.407 +  "(replicate m x = replicate n y) \<longleftrightarrow> (m=n \<and> (m\<noteq>0 \<longrightarrow> x=y))"
  52.408  apply(induct m arbitrary: n)
  52.409   apply simp
  52.410  apply(induct_tac n)
  52.411 @@ -4306,7 +4306,7 @@
  52.412  by(simp add:rotate_def)
  52.413  
  52.414  lemma rotate_add:
  52.415 -  "rotate (m+n) = rotate m o rotate n"
  52.416 +  "rotate (m+n) = rotate m \<circ> rotate n"
  52.417  by(simp add:rotate_def funpow_add)
  52.418  
  52.419  lemma rotate_rotate: "rotate m (rotate n xs) = rotate (m+n) xs"
  52.420 @@ -4469,7 +4469,7 @@
  52.421    case Nil thus ?case by simp
  52.422  next
  52.423    case (Cons a xs)
  52.424 -  then have "!x. x: set xs \<longrightarrow> x \<noteq> a" by auto
  52.425 +  then have "\<forall>x. x \<in> set xs \<longrightarrow> x \<noteq> a" by auto
  52.426    with Cons show ?case by(simp add: nths_Cons cong:filter_cong)
  52.427  qed
  52.428  
  52.429 @@ -4809,7 +4809,7 @@
  52.430  subsubsection \<open>(In)finiteness\<close>
  52.431  
  52.432  lemma finite_maxlen:
  52.433 -  "finite (M::'a list set) ==> EX n. ALL s:M. size s < n"
  52.434 +  "finite (M::'a list set) \<Longrightarrow> \<exists>n. \<forall>s\<in>M. size s < n"
  52.435  proof (induct rule: finite.induct)
  52.436    case emptyI show ?case by simp
  52.437  next
  52.438 @@ -4891,7 +4891,7 @@
  52.439    from this show ?thesis by (rule card_lists_distinct_length_eq)
  52.440  qed
  52.441  
  52.442 -lemma infinite_UNIV_listI: "~ finite(UNIV::'a list set)"
  52.443 +lemma infinite_UNIV_listI: "\<not> finite(UNIV::'a list set)"
  52.444  apply (rule notI)
  52.445  apply (drule finite_maxlen)
  52.446  apply clarsimp
  52.447 @@ -4977,7 +4977,7 @@
  52.448  by (cases xs) (simp_all add: sorted_Cons)
  52.449  
  52.450  lemma sorted_append:
  52.451 -  "sorted (xs@ys) = (sorted xs & sorted ys & (\<forall>x \<in> set xs. \<forall>y \<in> set ys. x\<le>y))"
  52.452 +  "sorted (xs@ys) = (sorted xs \<and> sorted ys \<and> (\<forall>x \<in> set xs. \<forall>y \<in> set ys. x\<le>y))"
  52.453  by (induct xs) (auto simp add:sorted_Cons)
  52.454  
  52.455  lemma sorted_nth_mono:
  52.456 @@ -5878,8 +5878,8 @@
  52.457  by (unfold lenlex_def) blast
  52.458  
  52.459  lemma lenlex_conv:
  52.460 -    "lenlex r = {(xs,ys). length xs < length ys |
  52.461 -                 length xs = length ys \<and> (xs, ys) : lex r}"
  52.462 +    "lenlex r = {(xs,ys). length xs < length ys \<or>
  52.463 +                 length xs = length ys \<and> (xs, ys) \<in> lex r}"
  52.464  by (simp add: lenlex_def Id_on_def lex_prod_def inv_image_def)
  52.465  
  52.466  lemma Nil_notin_lex [iff]: "([], ys) \<notin> lex r"
  52.467 @@ -5889,8 +5889,8 @@
  52.468  by (simp add:lex_conv)
  52.469  
  52.470  lemma Cons_in_lex [simp]:
  52.471 -    "((x # xs, y # ys) : lex r) =
  52.472 -      ((x, y) : r \<and> length xs = length ys | x = y \<and> (xs, ys) : lex r)"
  52.473 +    "((x # xs, y # ys) \<in> lex r) =
  52.474 +      ((x, y) \<in> r \<and> length xs = length ys \<or> x = y \<and> (xs, ys) \<in> lex r)"
  52.475  apply (simp add: lex_conv)
  52.476  apply (rule iffI)
  52.477   prefer 2 apply (blast intro: Cons_eq_appendI, clarify)
  52.478 @@ -5944,7 +5944,7 @@
  52.479  by (unfold lexord_def, induct_tac x, auto)
  52.480  
  52.481  lemma lexord_cons_cons[simp]:
  52.482 -     "((a # x, b # y) \<in> lexord r) = ((a,b)\<in> r | (a = b & (x,y)\<in> lexord r))"
  52.483 +     "((a # x, b # y) \<in> lexord r) = ((a,b)\<in> r \<or> (a = b \<and> (x,y)\<in> lexord r))"
  52.484    apply (unfold lexord_def, safe, simp_all)
  52.485    apply (case_tac u, simp, simp)
  52.486    apply (case_tac u, simp, clarsimp, blast, blast, clarsimp)
  52.487 @@ -5964,13 +5964,13 @@
  52.488  by (induct x, auto)
  52.489  
  52.490  lemma lexord_append_leftD:
  52.491 -     "\<lbrakk> (x @ u, x @ v) \<in> lexord r; (! a. (a,a) \<notin> r) \<rbrakk> \<Longrightarrow> (u,v) \<in> lexord r"
  52.492 +     "\<lbrakk> (x @ u, x @ v) \<in> lexord r; (\<forall>a. (a,a) \<notin> r) \<rbrakk> \<Longrightarrow> (u,v) \<in> lexord r"
  52.493  by (erule rev_mp, induct_tac x, auto)
  52.494  
  52.495  lemma lexord_take_index_conv:
  52.496 -   "((x,y) : lexord r) =
  52.497 +   "((x,y) \<in> lexord r) =
  52.498      ((length x < length y \<and> take (length x) y = x) \<or>
  52.499 -     (\<exists>i. i < min(length x)(length y) & take i x = take i y & (x!i,y!i) \<in> r))"
  52.500 +     (\<exists>i. i < min(length x)(length y) \<and> take i x = take i y \<and> (x!i,y!i) \<in> r))"
  52.501    apply (unfold lexord_def Let_def, clarsimp)
  52.502    apply (rule_tac f = "(% a b. a \<or> b)" in arg_cong2)
  52.503    apply auto
  52.504 @@ -5992,7 +5992,7 @@
  52.505    apply (induct_tac x, clarsimp)
  52.506    by (clarify, case_tac x, simp, force)
  52.507  
  52.508 -lemma lexord_irreflexive: "ALL x. (x,x) \<notin> r \<Longrightarrow> (xs,xs) \<notin> lexord r"
  52.509 +lemma lexord_irreflexive: "\<forall>x. (x,x) \<notin> r \<Longrightarrow> (xs,xs) \<notin> lexord r"
  52.510  by (induct xs) auto
  52.511  
  52.512  text\<open>By Ren\'e Thiemann:\<close>
  52.513 @@ -6033,7 +6033,7 @@
  52.514  lemma lexord_transI:  "trans r \<Longrightarrow> trans (lexord r)"
  52.515  by (rule transI, drule lexord_trans, blast)
  52.516  
  52.517 -lemma lexord_linear: "(! a b. (a,b)\<in> r | a = b | (b,a) \<in> r) \<Longrightarrow> (x,y) : lexord r | x = y | (y,x) : lexord r"
  52.518 +lemma lexord_linear: "(\<forall>a b. (a,b)\<in> r \<or> a = b \<or> (b,a) \<in> r) \<Longrightarrow> (x,y) \<in> lexord r \<or> x = y \<or> (y,x) \<in> lexord r"
  52.519    apply (rule_tac x = y in spec)
  52.520    apply (induct_tac x, rule allI)
  52.521    apply (case_tac x, simp, simp)
  52.522 @@ -6427,8 +6427,8 @@
  52.523  lemma listrel_eq_len:  "(xs, ys) \<in> listrel r \<Longrightarrow> length xs = length ys"
  52.524  by(induct rule: listrel.induct) auto
  52.525  
  52.526 -lemma listrel_iff_zip [code_unfold]: "(xs,ys) : listrel r \<longleftrightarrow>
  52.527 -  length xs = length ys & (\<forall>(x,y) \<in> set(zip xs ys). (x,y) \<in> r)" (is "?L \<longleftrightarrow> ?R")
  52.528 +lemma listrel_iff_zip [code_unfold]: "(xs,ys) \<in> listrel r \<longleftrightarrow>
  52.529 +  length xs = length ys \<and> (\<forall>(x,y) \<in> set(zip xs ys). (x,y) \<in> r)" (is "?L \<longleftrightarrow> ?R")
  52.530  proof
  52.531    assume ?L thus ?R by induct (auto intro: listrel_eq_len)
  52.532  next
  52.533 @@ -6437,8 +6437,8 @@
  52.534      by (induct rule: list_induct2) (auto intro: listrel.intros)
  52.535  qed
  52.536  
  52.537 -lemma listrel_iff_nth: "(xs,ys) : listrel r \<longleftrightarrow>
  52.538 -  length xs = length ys & (\<forall>n < length xs. (xs!n, ys!n) \<in> r)" (is "?L \<longleftrightarrow> ?R")
  52.539 +lemma listrel_iff_nth: "(xs,ys) \<in> listrel r \<longleftrightarrow>
  52.540 +  length xs = length ys \<and> (\<forall>n < length xs. (xs!n, ys!n) \<in> r)" (is "?L \<longleftrightarrow> ?R")
  52.541  by (auto simp add: all_set_conv_all_nth listrel_iff_zip)
  52.542  
  52.543  
  52.544 @@ -6579,7 +6579,7 @@
  52.545    "x \<in> set xs \<Longrightarrow> y \<le> f x \<Longrightarrow> y \<le> size_list f xs"
  52.546  by (induct xs) auto
  52.547  
  52.548 -lemma size_list_map[simp]: "size_list f (map g xs) = size_list (f o g) xs"
  52.549 +lemma size_list_map[simp]: "size_list f (map g xs) = size_list (f \<circ> g) xs"
  52.550  by (induct xs) auto
  52.551  
  52.552  lemma size_list_append[simp]: "size_list f (xs @ ys) = size_list f xs + size_list f ys"
  52.553 @@ -6757,7 +6757,7 @@
  52.554  lemma [code]:
  52.555    "lexordp r xs [] = False"
  52.556    "lexordp r [] (y#ys) = True"
  52.557 -  "lexordp r (x # xs) (y # ys) = (r x y | (x = y & lexordp r xs ys))"
  52.558 +  "lexordp r (x # xs) (y # ys) = (r x y \<or> (x = y \<and> lexordp r xs ys))"
  52.559  unfolding lexordp_def by auto
  52.560  
  52.561  text \<open>Bounded quantification and summation over nats.\<close>
    53.1 --- a/src/HOL/MacLaurin.thy	Sun Nov 26 13:19:52 2017 +0100
    53.2 +++ b/src/HOL/MacLaurin.thy	Sun Nov 26 21:08:32 2017 +0100
    53.3 @@ -209,7 +209,7 @@
    53.4    fixes n :: nat and h :: real
    53.5    shows
    53.6      "h < 0 \<and> n > 0 \<and> diff 0 = f \<and>
    53.7 -      (\<forall>m t. m < n & h \<le> t & t \<le> 0 --> DERIV (diff m) t :> diff (Suc m) t) \<longrightarrow>
    53.8 +      (\<forall>m t. m < n \<and> h \<le> t \<and> t \<le> 0 \<longrightarrow> DERIV (diff m) t :> diff (Suc m) t) \<longrightarrow>
    53.9      (\<exists>t. h < t \<and> t < 0 \<and> f h = (\<Sum>m<n. diff m 0 / fact m * h ^ m) + diff n t / fact n * h ^ n)"
   53.10    by (blast intro: Maclaurin_minus)
   53.11  
   53.12 @@ -373,7 +373,7 @@
   53.13  
   53.14  subsection \<open>Version for Sine Function\<close>
   53.15  
   53.16 -lemma mod_exhaust_less_4: "m mod 4 = 0 | m mod 4 = 1 | m mod 4 = 2 | m mod 4 = 3"
   53.17 +lemma mod_exhaust_less_4: "m mod 4 = 0 \<or> m mod 4 = 1 \<or> m mod 4 = 2 \<or> m mod 4 = 3"
   53.18    for m :: nat
   53.19    by auto
   53.20  
    54.1 --- a/src/HOL/Map.thy	Sun Nov 26 13:19:52 2017 +0100
    54.2 +++ b/src/HOL/Map.thy	Sun Nov 26 21:08:32 2017 +0100
    54.3 @@ -258,11 +258,11 @@
    54.4  
    54.5  subsection \<open>@{const map_option} related\<close>
    54.6  
    54.7 -lemma map_option_o_empty [simp]: "map_option f o empty = empty"
    54.8 +lemma map_option_o_empty [simp]: "map_option f \<circ> empty = empty"
    54.9  by (rule ext) simp
   54.10  
   54.11  lemma map_option_o_map_upd [simp]:
   54.12 -  "map_option f o m(a\<mapsto>b) = (map_option f o m)(a\<mapsto>f b)"
   54.13 +  "map_option f \<circ> m(a\<mapsto>b) = (map_option f \<circ> m)(a\<mapsto>f b)"
   54.14  by (rule ext) simp
   54.15  
   54.16  
   54.17 @@ -299,7 +299,7 @@
   54.18  by (rule ext) (simp add: map_add_def split: option.split)
   54.19  
   54.20  lemma map_add_Some_iff:
   54.21 -  "((m ++ n) k = Some x) = (n k = Some x | n k = None & m k = Some x)"
   54.22 +  "((m ++ n) k = Some x) = (n k = Some x \<or> n k = None \<and> m k = Some x)"
   54.23  by (simp add: map_add_def split: option.split)
   54.24  
   54.25  lemma map_add_SomeD [dest!]:
   54.26 @@ -309,7 +309,7 @@
   54.27  lemma map_add_find_right [simp]: "n k = Some xx \<Longrightarrow> (m ++ n) k = Some xx"
   54.28  by (subst map_add_Some_iff) fast
   54.29  
   54.30 -lemma map_add_None [iff]: "((m ++ n) k = None) = (n k = None & m k = None)"
   54.31 +lemma map_add_None [iff]: "((m ++ n) k = None) = (n k = None \<and> m k = None)"
   54.32  by (simp add: map_add_def split: option.split)
   54.33  
   54.34  lemma map_add_upd[simp]: "f ++ g(x\<mapsto>y) = (f ++ g)(x\<mapsto>y)"
    55.1 --- a/src/HOL/Meson.thy	Sun Nov 26 13:19:52 2017 +0100
    55.2 +++ b/src/HOL/Meson.thy	Sun Nov 26 21:08:32 2017 +0100
    55.3 @@ -15,21 +15,21 @@
    55.4  
    55.5  text \<open>de Morgan laws\<close>
    55.6  
    55.7 -lemma not_conjD: "~(P&Q) ==> ~P | ~Q"
    55.8 -  and not_disjD: "~(P|Q) ==> ~P & ~Q"
    55.9 -  and not_notD: "~~P ==> P"
   55.10 -  and not_allD: "!!P. ~(\<forall>x. P(x)) ==> \<exists>x. ~P(x)"
   55.11 -  and not_exD: "!!P. ~(\<exists>x. P(x)) ==> \<forall>x. ~P(x)"
   55.12 +lemma not_conjD: "\<not>(P\<and>Q) \<Longrightarrow> \<not>P \<or> \<not>Q"
   55.13 +  and not_disjD: "\<not>(P\<or>Q) \<Longrightarrow> \<not>P \<and> \<not>Q"
   55.14 +  and not_notD: "\<not>\<not>P \<Longrightarrow> P"
   55.15 +  and not_allD: "\<And>P. \<not>(\<forall>x. P(x)) \<Longrightarrow> \<exists>x. \<not>P(x)"
   55.16 +  and not_exD: "\<And>P. \<not>(\<exists>x. P(x)) \<Longrightarrow> \<forall>x. \<not>P(x)"
   55.17    by fast+
   55.18  
   55.19  text \<open>Removal of \<open>\<longrightarrow>\<close> and \<open>\<longleftrightarrow>\<close> (positive and negative occurrences)\<close>
   55.20  
   55.21 -lemma imp_to_disjD: "P-->Q ==> ~P | Q"
   55.22 -  and not_impD: "~(P-->Q) ==> P & ~Q"
   55.23 -  and iff_to_disjD: "P=Q ==> (~P | Q) & (~Q | P)"
   55.24 -  and not_iffD: "~(P=Q) ==> (P | Q) & (~P | ~Q)"
   55.25 -    \<comment> \<open>Much more efficient than @{prop "(P & ~Q) | (Q & ~P)"} for computing CNF\<close>
   55.26 -  and not_refl_disj_D: "x ~= x | P ==> P"
   55.27 +lemma imp_to_disjD: "P\<longrightarrow>Q \<Longrightarrow> \<not>P \<or> Q"
   55.28 +  and not_impD: "\<not>(P\<longrightarrow>Q) \<Longrightarrow> P \<and> \<not>Q"
   55.29 +  and iff_to_disjD: "P=Q \<Longrightarrow> (\<not>P \<or> Q) \<and> (\<not>Q \<or> P)"
   55.30 +  and not_iffD: "\<not>(P=Q) \<Longrightarrow> (P \<or> Q) \<and> (\<not>P \<or> \<not>Q)"
   55.31 +    \<comment> \<open>Much more efficient than @{prop "(P \<and> \<not>Q) \<or> (Q \<and> \<not>P)"} for computing CNF\<close>
   55.32 +  and not_refl_disj_D: "x \<noteq> x \<or> P \<Longrightarrow> P"
   55.33    by fast+
   55.34  
   55.35  
   55.36 @@ -37,24 +37,24 @@
   55.37  
   55.38  text \<open>Conjunction\<close>
   55.39  
   55.40 -lemma conj_exD1: "!!P Q. (\<exists>x. P(x)) & Q ==> \<exists>x. P(x) & Q"
   55.41 -  and conj_exD2: "!!P Q. P & (\<exists>x. Q(x)) ==> \<exists>x. P & Q(x)"
   55.42 +lemma conj_exD1: "\<And>P Q. (\<exists>x. P(x)) \<and> Q \<Longrightarrow> \<exists>x. P(x) \<and> Q"
   55.43 +  and conj_exD2: "\<And>P Q. P \<and> (\<exists>x. Q(x)) \<Longrightarrow> \<exists>x. P \<and> Q(x)"
   55.44    by fast+
   55.45  
   55.46  
   55.47  text \<open>Disjunction\<close>
   55.48  
   55.49 -lemma disj_exD: "!!P Q. (\<exists>x. P(x)) | (\<exists>x. Q(x)) ==> \<exists>x. P(x) | Q(x)"
   55.50 +lemma disj_exD: "\<And>P Q. (\<exists>x. P(x)) \<or> (\<exists>x. Q(x)) \<Longrightarrow> \<exists>x. P(x) \<or> Q(x)"
   55.51    \<comment> \<open>DO NOT USE with forall-Skolemization: makes fewer schematic variables!!\<close>
   55.52    \<comment> \<open>With ex-Skolemization, makes fewer Skolem constants\<close>
   55.53 -  and disj_exD1: "!!P Q. (\<exists>x. P(x)) | Q ==> \<exists>x. P(x) | Q"
   55.54 -  and disj_exD2: "!!P Q. P | (\<exists>x. Q(x)) ==> \<exists>x. P | Q(x)"
   55.55 +  and disj_exD1: "\<And>P Q. (\<exists>x. P(x)) \<or> Q \<Longrightarrow> \<exists>x. P(x) \<or> Q"
   55.56 +  and disj_exD2: "\<And>P Q. P \<or> (\<exists>x. Q(x)) \<Longrightarrow> \<exists>x. P \<or> Q(x)"
   55.57    by fast+
   55.58  
   55.59 -lemma disj_assoc: "(P|Q)|R ==> P|(Q|R)"
   55.60 -  and disj_comm: "P|Q ==> Q|P"
   55.61 -  and disj_FalseD1: "False|P ==> P"
   55.62 -  and disj_FalseD2: "P|False ==> P"
   55.63 +lemma disj_assoc: "(P\<or>Q)\<or>R \<Longrightarrow> P\<or>(Q\<or>R)"
   55.64 +  and disj_comm: "P\<or>Q \<Longrightarrow> Q\<or>P"
   55.65 +  and disj_FalseD1: "False\<or>P \<Longrightarrow> P"
   55.66 +  and disj_FalseD2: "P\<or>False \<Longrightarrow> P"
   55.67    by fast+
   55.68  
   55.69  
   55.70 @@ -63,15 +63,15 @@
   55.71  text\<open>Inserts negated disjunct after removing the negation; P is a literal.
   55.72    Model elimination requires assuming the negation of every attempted subgoal,
   55.73    hence the negated disjuncts.\<close>
   55.74 -lemma make_neg_rule: "~P|Q ==> ((~P==>P) ==> Q)"
   55.75 +lemma make_neg_rule: "\<not>P\<or>Q \<Longrightarrow> ((\<not>P\<Longrightarrow>P) \<Longrightarrow> Q)"
   55.76  by blast
   55.77  
   55.78  text\<open>Version for Plaisted's "Postive refinement" of the Meson procedure\<close>
   55.79 -lemma make_refined_neg_rule: "~P|Q ==> (P ==> Q)"
   55.80 +lemma make_refined_neg_rule: "\<not>P\<or>Q \<Longrightarrow> (P \<Longrightarrow> Q)"
   55.81  by blast
   55.82  
   55.83  text\<open>@{term P} should be a literal\<close>
   55.84 -lemma make_pos_rule: "P|Q ==> ((P==>~P) ==> Q)"
   55.85 +lemma make_pos_rule: "P\<or>Q \<Longrightarrow> ((P\<Longrightarrow>\<not>P) \<Longrightarrow> Q)"
   55.86  by blast
   55.87  
   55.88  text\<open>Versions of \<open>make_neg_rule\<close> and \<open>make_pos_rule\<close> that don't
   55.89 @@ -79,15 +79,15 @@
   55.90  
   55.91  lemmas make_neg_rule' = make_refined_neg_rule
   55.92  
   55.93 -lemma make_pos_rule': "[|P|Q; ~P|] ==> Q"
   55.94 +lemma make_pos_rule': "\<lbrakk>P\<or>Q; \<not>P\<rbrakk> \<Longrightarrow> Q"
   55.95  by blast
   55.96  
   55.97  text\<open>Generation of a goal clause -- put away the final literal\<close>
   55.98  
   55.99 -lemma make_neg_goal: "~P ==> ((~P==>P) ==> False)"
  55.100 +lemma make_neg_goal: "\<not>P \<Longrightarrow> ((\<not>P\<Longrightarrow>P) \<Longrightarrow> False)"
  55.101  by blast
  55.102  
  55.103 -lemma make_pos_goal: "P ==> ((P==>~P) ==> False)"
  55.104 +lemma make_pos_goal: "P \<Longrightarrow> ((P\<Longrightarrow>\<not>P) \<Longrightarrow> False)"
  55.105  by blast
  55.106  
  55.107  
  55.108 @@ -97,18 +97,17 @@
  55.109  
  55.110  (*NOTE: could handle conjunctions (faster?) by
  55.111      nf(th RS conjunct2) RS (nf(th RS conjunct1) RS conjI) *)
  55.112 -lemma conj_forward: "[| P'&Q';  P' ==> P;  Q' ==> Q |] ==> P&Q"
  55.113 +lemma conj_forward: "\<lbrakk>P'\<and>Q';  P' \<Longrightarrow> P;  Q' \<Longrightarrow> Q \<rbrakk> \<Longrightarrow> P\<and>Q"
  55.114  by blast
  55.115  
  55.116 -lemma disj_forward: "[| P'|Q';  P' ==> P;  Q' ==> Q |] ==> P|Q"
  55.117 +lemma disj_forward: "\<lbrakk>P'\<or>Q';  P' \<Longrightarrow> P;  Q' \<Longrightarrow> Q \<rbrakk> \<Longrightarrow> P\<or>Q"
  55.118  by blast
  55.119  
  55.120 -lemma imp_forward: "[| P' \<longrightarrow> Q';  P ==> P';  Q' ==> Q |] ==> P \<longrightarrow> Q"
  55.121 +lemma imp_forward: "\<lbrakk>P' \<longrightarrow> Q';  P \<Longrightarrow> P';  Q' \<Longrightarrow> Q \<rbrakk> \<Longrightarrow> P \<longrightarrow> Q"
  55.122  by blast
  55.123  
  55.124  (*Version of @{text disj_forward} for removal of duplicate literals*)
  55.125 -lemma disj_forward2:
  55.126 -    "[| P'|Q';  P' ==> P;  [| Q'; P==>False |] ==> Q |] ==> P|Q"
  55.127 +lemma disj_forward2: "\<lbrakk> P'\<or>Q';  P' \<Longrightarrow> P;  \<lbrakk>Q'; P\<Longrightarrow>False\<rbrakk> \<Longrightarrow> Q\<rbrakk> \<Longrightarrow> P\<or>Q"
  55.128  apply blast 
  55.129  done
  55.130  
    56.1 --- a/src/HOL/Nat.thy	Sun Nov 26 13:19:52 2017 +0100
    56.2 +++ b/src/HOL/Nat.thy	Sun Nov 26 21:08:32 2017 +0100
    56.3 @@ -360,10 +360,10 @@
    56.4    for m n :: nat
    56.5    by (cases m) simp_all
    56.6  
    56.7 -lemma add_is_1: "m + n = Suc 0 \<longleftrightarrow> m = Suc 0 \<and> n = 0 | m = 0 \<and> n = Suc 0"
    56.8 +lemma add_is_1: "m + n = Suc 0 \<longleftrightarrow> m = Suc 0 \<and> n = 0 \<or> m = 0 \<and> n = Suc 0"
    56.9    by (cases m) simp_all
   56.10  
   56.11 -lemma one_is_add: "Suc 0 = m + n \<longleftrightarrow> m = Suc 0 \<and> n = 0 | m = 0 \<and> n = Suc 0"
   56.12 +lemma one_is_add: "Suc 0 = m + n \<longleftrightarrow> m = Suc 0 \<and> n = 0 \<or> m = 0 \<and> n = Suc 0"
   56.13    by (rule trans, rule eq_commute, rule add_is_1)
   56.14  
   56.15  lemma add_eq_self_zero: "m + n = m \<Longrightarrow> n = 0"
   56.16 @@ -735,7 +735,7 @@
   56.17    for m n :: nat
   56.18    unfolding less_le ..
   56.19  
   56.20 -lemma nat_le_linear: "m \<le> n | n \<le> m"
   56.21 +lemma nat_le_linear: "m \<le> n \<or> n \<le> m"
   56.22    for m n :: nat
   56.23    by (rule linear)
   56.24  
    57.1 --- a/src/HOL/Nitpick.thy	Sun Nov 26 13:19:52 2017 +0100
    57.2 +++ b/src/HOL/Nitpick.thy	Sun Nov 26 21:08:32 2017 +0100
    57.3 @@ -150,10 +150,10 @@
    57.4    "one_frac \<equiv> Abs_Frac (1, 1)"
    57.5  
    57.6  definition num :: "'a \<Rightarrow> int" where
    57.7 -  "num \<equiv> fst o Rep_Frac"
    57.8 +  "num \<equiv> fst \<circ> Rep_Frac"
    57.9  
   57.10  definition denom :: "'a \<Rightarrow> int" where
   57.11 -  "denom \<equiv> snd o Rep_Frac"
   57.12 +  "denom \<equiv> snd \<circ> Rep_Frac"
   57.13  
   57.14  function norm_frac :: "int \<Rightarrow> int \<Rightarrow> int \<times> int" where
   57.15    "norm_frac a b =
    58.1 --- a/src/HOL/Nonstandard_Analysis/HTranscendental.thy	Sun Nov 26 13:19:52 2017 +0100
    58.2 +++ b/src/HOL/Nonstandard_Analysis/HTranscendental.thy	Sun Nov 26 21:08:32 2017 +0100
    58.3 @@ -370,7 +370,7 @@
    58.4  done
    58.5  
    58.6  lemma starfun_exp_HInfinite_Infinitesimal_disj:
    58.7 - "x \<in> HInfinite ==> ( *f* exp) x \<in> HInfinite | ( *f* exp) (x::hypreal) \<in> Infinitesimal"
    58.8 + "x \<in> HInfinite \<Longrightarrow> ( *f* exp) x \<in> HInfinite \<or> ( *f* exp) (x::hypreal) \<in> Infinitesimal"
    58.9  apply (insert linorder_linear [of x 0]) 
   58.10  apply (auto intro: starfun_exp_HInfinite starfun_exp_Infinitesimal)
   58.11  done
    59.1 --- a/src/HOL/Nonstandard_Analysis/HyperNat.thy	Sun Nov 26 13:19:52 2017 +0100
    59.2 +++ b/src/HOL/Nonstandard_Analysis/HyperNat.thy	Sun Nov 26 21:08:32 2017 +0100
    59.3 @@ -154,7 +154,7 @@
    59.4  lemma hypnat_of_nat_Suc [simp]: "hypnat_of_nat (Suc n) = hypnat_of_nat n + 1"
    59.5    by transfer simp
    59.6  
    59.7 -lemma of_nat_eq_add [rule_format]: "\<forall>d::hypnat. of_nat m = of_nat n + d --> d \<in> range of_nat"
    59.8 +lemma of_nat_eq_add [rule_format]: "\<forall>d::hypnat. of_nat m = of_nat n + d \<longrightarrow> d \<in> range of_nat"
    59.9    apply (induct n)
   59.10     apply (auto simp add: add.assoc)
   59.11    apply (case_tac x)
    60.1 --- a/src/HOL/Nonstandard_Analysis/NSCA.thy	Sun Nov 26 13:19:52 2017 +0100
    60.2 +++ b/src/HOL/Nonstandard_Analysis/NSCA.thy	Sun Nov 26 21:08:32 2017 +0100
    60.3 @@ -16,7 +16,7 @@
    60.4  
    60.5  definition \<comment>\<open>standard part map\<close>
    60.6    stc :: "hcomplex => hcomplex" where 
    60.7 -  "stc x = (SOME r. x \<in> HFinite & r:SComplex & r \<approx> x)"
    60.8 +  "stc x = (SOME r. x \<in> HFinite \<and> r\<in>SComplex \<and> r \<approx> x)"
    60.9  
   60.10  
   60.11  subsection\<open>Closure Laws for SComplex, the Standard Complex Numbers\<close>
   60.12 @@ -63,7 +63,7 @@
   60.13  
   60.14  lemma SComplex_SReal_dense:
   60.15       "[| x \<in> SComplex; y \<in> SComplex; hcmod x < hcmod y  
   60.16 -      |] ==> \<exists>r \<in> Reals. hcmod x< r & r < hcmod y"
   60.17 +      |] ==> \<exists>r \<in> Reals. hcmod x< r \<and> r < hcmod y"
   60.18  apply (auto intro: SReal_dense simp add: SReal_hcmod_SComplex)
   60.19  done
   60.20  
   60.21 @@ -350,7 +350,7 @@
   60.22  apply (simp add: Standard_HComplex st_SReal [unfolded Reals_eq_Standard])
   60.23  done
   60.24  
   60.25 -lemma stc_part_Ex1: "x:HFinite ==> \<exists>!t. t \<in> SComplex &  x \<approx> t"
   60.26 +lemma stc_part_Ex1: "x\<in>HFinite \<Longrightarrow> \<exists>!t. t \<in> SComplex \<and> x \<approx> t"
   60.27  apply (drule stc_part_Ex, safe)
   60.28  apply (drule_tac [2] approx_sym, drule_tac [2] approx_sym, drule_tac [2] approx_sym)
   60.29  apply (auto intro!: approx_unique_complex)
    61.1 --- a/src/HOL/Nonstandard_Analysis/NatStar.thy	Sun Nov 26 13:19:52 2017 +0100
    61.2 +++ b/src/HOL/Nonstandard_Analysis/NatStar.thy	Sun Nov 26 21:08:32 2017 +0100
    61.3 @@ -143,9 +143,9 @@
    61.4    by transfer (rule refl)
    61.5  
    61.6  lemma starfunNat_inverse_real_of_nat_Infinitesimal [simp]:
    61.7 -  "N \<in> HNatInfinite \<Longrightarrow> ( *f* (%x. inverse (real x))) N \<in> Infinitesimal"
    61.8 +  "N \<in> HNatInfinite \<Longrightarrow> ( *f* (\<lambda>x. inverse (real x))) N \<in> Infinitesimal"
    61.9    apply (rule_tac f1 = inverse in starfun_o2 [THEN subst])
   61.10 -  apply (subgoal_tac "hypreal_of_hypnat N ~= 0")
   61.11 +  apply (subgoal_tac "hypreal_of_hypnat N \<noteq> 0")
   61.12     apply (simp_all add: zero_less_HNatInfinite starfunNat_real_of_nat)
   61.13    done
   61.14  
    62.1 --- a/src/HOL/Number_Theory/Euler_Criterion.thy	Sun Nov 26 13:19:52 2017 +0100
    62.2 +++ b/src/HOL/Number_Theory/Euler_Criterion.thy	Sun Nov 26 21:08:32 2017 +0100
    62.3 @@ -78,7 +78,7 @@
    62.4  private lemma P_lemma: assumes "x \<in> S1"
    62.5    shows "\<exists>! y. P x y"
    62.6  proof -
    62.7 -  have "~ p dvd x" using assms zdvd_not_zless S1_def by auto
    62.8 +  have "\<not> p dvd x" using assms zdvd_not_zless S1_def by auto
    62.9    hence co_xp: "coprime x p" using p_prime prime_imp_coprime_int[of p x] 
   62.10      by (simp add: ac_simps)
   62.11    then obtain y' where y': "[x * y' = 1] (mod p)" using cong_solve_coprime_int by blast
   62.12 @@ -110,11 +110,11 @@
   62.13  private lemma f_lemma_1: assumes "x \<in> S1"
   62.14    shows "f x = f (f_1 x)" using f_def f_1_lemma_2[of x] assms by auto
   62.15  
   62.16 -private lemma l1: assumes "~ QuadRes p a" "x \<in> S1"
   62.17 +private lemma l1: assumes "\<not> QuadRes p a" "x \<in> S1"
   62.18    shows "x \<noteq> f_1 x"
   62.19    using f_1_lemma_1[of x] assms unfolding P_def QuadRes_def power2_eq_square by fastforce
   62.20  
   62.21 -private lemma l2: assumes "~ QuadRes p a" "x \<in> S1"
   62.22 +private lemma l2: assumes "\<not> QuadRes p a" "x \<in> S1"
   62.23    shows "[\<Prod> (f x) = a] (mod p)"
   62.24    using assms l1 f_1_lemma_1 P_def f_def by auto
   62.25  
   62.26 @@ -165,7 +165,7 @@
   62.27      by simp blast 
   62.28  qed
   62.29  
   62.30 -private lemma l11: assumes "~ QuadRes p a"
   62.31 +private lemma l11: assumes "\<not> QuadRes p a"
   62.32    shows "card S2 = (p - 1) div 2"
   62.33  proof -
   62.34    have "sum card S2 = 2 * card S2"
   62.35 @@ -175,11 +175,11 @@
   62.36    ultimately show ?thesis by linarith
   62.37  qed
   62.38  
   62.39 -private lemma l12: assumes "~ QuadRes p a"
   62.40 +private lemma l12: assumes "\<not> QuadRes p a"
   62.41    shows "[prod Prod S2 = a ^ ((p - 1) div 2)] (mod p)"
   62.42    using assms l2 l10 l11 unfolding S2_def by blast
   62.43  
   62.44 -private lemma E_2: assumes "~ QuadRes p a"
   62.45 +private lemma E_2: assumes "\<not> QuadRes p a"
   62.46    shows "[a ^ ((p - 1) div 2) = -1] (mod p)" using l9 l12 cong_trans cong_sym assms by blast
   62.47  
   62.48  lemma euler_criterion_aux: "[(Legendre a p) = a ^ ((p - 1) div 2)] (mod p)"
    63.1 --- a/src/HOL/Number_Theory/Gauss.thy	Sun Nov 26 13:19:52 2017 +0100
    63.2 +++ b/src/HOL/Number_Theory/Gauss.thy	Sun Nov 26 21:08:32 2017 +0100
    63.3 @@ -323,8 +323,8 @@
    63.4      done
    63.5    then have "\<forall>x \<in> E. [(p-x) mod p = - x](mod p)"
    63.6      by (metis cong_def minus_mod_self1 mod_mod_trivial)
    63.7 -  then have "[prod ((\<lambda>x. x mod p) o (op - p)) E = prod (uminus) E](mod p)"
    63.8 -    using finite_E p_ge_2 cong_prod [of E "(\<lambda>x. x mod p) o (op - p)" uminus p]
    63.9 +  then have "[prod ((\<lambda>x. x mod p) \<circ> (op - p)) E = prod (uminus) E](mod p)"
   63.10 +    using finite_E p_ge_2 cong_prod [of E "(\<lambda>x. x mod p) \<circ> (op - p)" uminus p]
   63.11      by auto
   63.12    then have two: "[prod id F = prod (uminus) E](mod p)"
   63.13      by (metis FE cong_cong_mod_int cong_refl cong_prod minus_mod_self1)
    64.1 --- a/src/HOL/Number_Theory/Pocklington.thy	Sun Nov 26 13:19:52 2017 +0100
    64.2 +++ b/src/HOL/Number_Theory/Pocklington.thy	Sun Nov 26 21:08:32 2017 +0100
    64.3 @@ -212,7 +212,7 @@
    64.4    from lucas_coprime_lemma[OF n01(3) an1] cong_imp_coprime_nat an1
    64.5    have an: "coprime a n" "coprime (a ^ (n - 1)) n"
    64.6      using \<open>n \<ge> 2\<close> by simp_all
    64.7 -  have False if H0: "\<exists>m. 0 < m \<and> m < n - 1 \<and> [a ^ m = 1] (mod n)" (is "EX m. ?P m")
    64.8 +  have False if H0: "\<exists>m. 0 < m \<and> m < n - 1 \<and> [a ^ m = 1] (mod n)" (is "\<exists>m. ?P m")
    64.9    proof -
   64.10      from H0[unfolded nat_exists_least_iff[of ?P]] obtain m where
   64.11        m: "0 < m" "m < n - 1" "[a ^ m = 1] (mod n)" "\<forall>k <m. \<not>?P k"
    65.1 --- a/src/HOL/Number_Theory/Residues.thy	Sun Nov 26 13:19:52 2017 +0100
    65.2 +++ b/src/HOL/Number_Theory/Residues.thy	Sun Nov 26 21:08:32 2017 +0100
    65.3 @@ -296,7 +296,7 @@
    65.4    fixes a m :: nat
    65.5    assumes "coprime a m"
    65.6    shows "[a ^ totient m = 1] (mod m)"
    65.7 -proof (cases "m = 0 | m = 1")
    65.8 +proof (cases "m = 0 \<or> m = 1")
    65.9    case True
   65.10    then show ?thesis by auto
   65.11  next
    66.1 --- a/src/HOL/Numeral_Simprocs.thy	Sun Nov 26 13:19:52 2017 +0100
    66.2 +++ b/src/HOL/Numeral_Simprocs.thy	Sun Nov 26 21:08:32 2017 +0100
    66.3 @@ -77,7 +77,7 @@
    66.4  by auto
    66.5  
    66.6  lemma nat_mult_dvd_cancel_disj[simp]:
    66.7 -  "(k*m) dvd (k*n) = (k=0 | m dvd (n::nat))"
    66.8 +  "(k*m) dvd (k*n) = (k=0 \<or> m dvd (n::nat))"
    66.9  by (auto simp: dvd_eq_mod_eq_0 mod_mult_mult1)
   66.10  
   66.11  lemma nat_mult_dvd_cancel1: "0 < k \<Longrightarrow> (k*m) dvd (k*n::nat) = (m dvd n)"
    67.1 --- a/src/HOL/Option.thy	Sun Nov 26 13:19:52 2017 +0100
    67.2 +++ b/src/HOL/Option.thy	Sun Nov 26 21:08:32 2017 +0100
    67.3 @@ -109,7 +109,7 @@
    67.4    by (simp add: map_option_case split: option.split)
    67.5  
    67.6  lemma map_option_o_case_sum [simp]:
    67.7 -    "map_option f o case_sum g h = case_sum (map_option f o g) (map_option f o h)"
    67.8 +    "map_option f \<circ> case_sum g h = case_sum (map_option f \<circ> g) (map_option f \<circ> h)"
    67.9    by (rule o_case_sum)
   67.10  
   67.11  lemma map_option_cong: "x = y \<Longrightarrow> (\<And>a. y = Some a \<Longrightarrow> f a = g a) \<Longrightarrow> map_option f x = map_option g y"
    68.1 --- a/src/HOL/Orderings.thy	Sun Nov 26 13:19:52 2017 +0100
    68.2 +++ b/src/HOL/Orderings.thy	Sun Nov 26 21:08:32 2017 +0100
    68.3 @@ -389,7 +389,7 @@
    68.4  done
    68.5  
    68.6  lemma not_less_iff_gr_or_eq:
    68.7 - "\<not>(x < y) \<longleftrightarrow> (x > y | x = y)"
    68.8 + "\<not>(x < y) \<longleftrightarrow> (x > y \<or> x = y)"
    68.9  apply(simp add:not_less le_less)
   68.10  apply blast
   68.11  done
   68.12 @@ -745,14 +745,14 @@
   68.13    "_Ex_less_eq" :: "[idt, 'a, bool] => bool"    ("(3? _<=_./ _)" [0, 0, 10] 10)
   68.14  
   68.15  translations
   68.16 -  "ALL x<y. P"   =>  "ALL x. x < y \<longrightarrow> P"
   68.17 -  "EX x<y. P"    =>  "EX x. x < y \<and> P"
   68.18 -  "ALL x<=y. P"  =>  "ALL x. x <= y \<longrightarrow> P"
   68.19 -  "EX x<=y. P"   =>  "EX x. x <= y \<and> P"
   68.20 -  "ALL x>y. P"   =>  "ALL x. x > y \<longrightarrow> P"
   68.21 -  "EX x>y. P"    =>  "EX x. x > y \<and> P"
   68.22 -  "ALL x>=y. P"  =>  "ALL x. x >= y \<longrightarrow> P"
   68.23 -  "EX x>=y. P"   =>  "EX x. x >= y \<and> P"
   68.24 +  "\<forall>x<y. P" \<rightharpoonup> "\<forall>x. x < y \<longrightarrow> P"
   68.25 +  "\<exists>x<y. P" \<rightharpoonup> "\<exists>x. x < y \<and> P"
   68.26 +  "\<forall>x\<le>y. P" \<rightharpoonup> "\<forall>x. x \<le> y \<longrightarrow> P"
   68.27 +  "\<exists>x\<le>y. P" \<rightharpoonup> "\<exists>x. x \<le> y \<and> P"
   68.28 +  "\<forall>x>y. P" \<rightharpoonup> "\<forall>x. x > y \<longrightarrow> P"
   68.29 +  "\<exists>x>y. P" \<rightharpoonup> "\<exists>x. x > y \<and> P"
   68.30 +  "\<forall>x\<ge>y. P" \<rightharpoonup> "\<forall>x. x \<ge> y \<longrightarrow> P"
   68.31 +  "\<exists>x\<ge>y. P" \<rightharpoonup> "\<exists>x. x \<ge> y \<and> P"
   68.32  
   68.33  print_translation \<open>
   68.34  let
   68.35 @@ -1001,22 +1001,22 @@
   68.36      a >= b >= c ... in Isar proofs.\<close>
   68.37  
   68.38  lemma xt1 [no_atp]:
   68.39 -  "a = b ==> b > c ==> a > c"
   68.40 -  "a > b ==> b = c ==> a > c"
   68.41 -  "a = b ==> b >= c ==> a >= c"
   68.42 -  "a >= b ==> b = c ==> a >= c"
   68.43 -  "(x::'a::order) >= y ==> y >= x ==> x = y"
   68.44 -  "(x::'a::order) >= y ==> y >= z ==> x >= z"
   68.45 -  "(x::'a::order) > y ==> y >= z ==> x > z"
   68.46 -  "(x::'a::order) >= y ==> y > z ==> x > z"
   68.47 -  "(a::'a::order) > b ==> b > a ==> P"
   68.48 -  "(x::'a::order) > y ==> y > z ==> x > z"
   68.49 -  "(a::'a::order) >= b ==> a ~= b ==> a > b"
   68.50 -  "(a::'a::order) ~= b ==> a >= b ==> a > b"
   68.51 -  "a = f b ==> b > c ==> (!!x y. x > y ==> f x > f y) ==> a > f c"
   68.52 -  "a > b ==> f b = c ==> (!!x y. x > y ==> f x > f y) ==> f a > c"
   68.53 -  "a = f b ==> b >= c ==> (!!x y. x >= y ==> f x >= f y) ==> a >= f c"
   68.54 -  "a >= b ==> f b = c ==> (!! x y. x >= y ==> f x >= f y) ==> f a >= c"
   68.55 +  "a = b \<Longrightarrow> b > c \<Longrightarrow> a > c"
   68.56 +  "a > b \<Longrightarrow> b = c \<Longrightarrow> a > c"
   68.57 +  "a = b \<Longrightarrow> b \<ge> c \<Longrightarrow> a \<ge> c"
   68.58 +  "a \<ge> b \<Longrightarrow> b = c \<Longrightarrow> a \<ge> c"
   68.59 +  "(x::'a::order) \<ge> y \<Longrightarrow> y \<ge> x \<Longrightarrow> x = y"
   68.60 +  "(x::'a::order) \<ge> y \<Longrightarrow> y \<ge> z \<Longrightarrow> x \<ge> z"
   68.61 +  "(x::'a::order) > y \<Longrightarrow> y \<ge> z \<Longrightarrow> x > z"
   68.62 +  "(x::'a::order) \<ge> y \<Longrightarrow> y > z \<Longrightarrow> x > z"
   68.63 +  "(a::'a::order) > b \<Longrightarrow> b > a \<Longrightarrow> P"
   68.64 +  "(x::'a::order) > y \<Longrightarrow> y > z \<Longrightarrow> x > z"
   68.65 +  "(a::'a::order) \<ge> b \<Longrightarrow> a \<noteq> b \<Longrightarrow> a > b"
   68.66 +  "(a::'a::order) \<noteq> b \<Longrightarrow> a \<ge> b \<Longrightarrow> a > b"
   68.67 +  "a = f b \<Longrightarrow> b > c \<Longrightarrow> (\<And>x y. x > y \<Longrightarrow> f x > f y) \<Longrightarrow> a > f c"
   68.68 +  "a > b \<Longrightarrow> f b = c \<Longrightarrow> (\<And>x y. x > y \<Longrightarrow> f x > f y) \<Longrightarrow> f a > c"
   68.69 +  "a = f b \<Longrightarrow> b \<ge> c \<Longrightarrow> (\<And>x y. x \<ge> y \<Longrightarrow> f x \<ge> f y) \<Longrightarrow> a \<ge> f c"
   68.70 +  "a \<ge> b \<Longrightarrow> f b = c \<Longrightarrow> (\<And>x y. x \<ge> y \<Longrightarrow> f x \<ge> f y) \<Longrightarrow> f a \<ge> c"
   68.71    by auto
   68.72  
   68.73  lemma xt2 [no_atp]:
    69.1 --- a/src/HOL/Partial_Function.thy	Sun Nov 26 13:19:52 2017 +0100
    69.2 +++ b/src/HOL/Partial_Function.thy	Sun Nov 26 21:08:32 2017 +0100
    69.3 @@ -340,7 +340,7 @@
    69.4  
    69.5  lemma admissible_image:
    69.6    assumes pfun: "partial_function_definitions le lub"
    69.7 -  assumes adm: "ccpo.admissible lub le (P o g)"
    69.8 +  assumes adm: "ccpo.admissible lub le (P \<circ> g)"
    69.9    assumes inj: "\<And>x y. f x = f y \<Longrightarrow> x = y"
   69.10    assumes inv: "\<And>x. f (g x) = x"
   69.11    shows "ccpo.admissible (img_lub f g lub) (img_ord f le) P"
   69.12 @@ -350,10 +350,10 @@
   69.13      by (auto simp: img_ord_def intro: chainI dest: chainD)
   69.14    assume "A \<noteq> {}"
   69.15    assume P_A: "\<forall>x\<in>A. P x"
   69.16 -  have "(P o g) (lub (f ` A))" using adm ch'
   69.17 +  have "(P \<circ> g) (lub (f ` A))" using adm ch'
   69.18    proof (rule ccpo.admissibleD)
   69.19      fix x assume "x \<in> f ` A"
   69.20 -    with P_A show "(P o g) x" by (auto simp: inj[OF inv])
   69.21 +    with P_A show "(P \<circ> g) x" by (auto simp: inj[OF inv])
   69.22    qed(simp add: \<open>A \<noteq> {}\<close>)
   69.23    thus "P (img_lub f g lub A)" unfolding img_lub_def by simp
   69.24  qed
    70.1 --- a/src/HOL/Predicate.thy	Sun Nov 26 13:19:52 2017 +0100
    70.2 +++ b/src/HOL/Predicate.thy	Sun Nov 26 21:08:32 2017 +0100
    70.3 @@ -383,7 +383,7 @@
    70.4  by (rule unit_pred_cases) (auto elim: botE intro: singleI)
    70.5  
    70.6  definition map :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a pred \<Rightarrow> 'b pred" where
    70.7 -  "map f P = P \<bind> (single o f)"
    70.8 +  "map f P = P \<bind> (single \<circ> f)"
    70.9  
   70.10  lemma eval_map [simp]:
   70.11    "eval (map f P) = (\<Squnion>x\<in>{x. eval P x}. (\<lambda>y. f x = y))"
    71.1 --- a/src/HOL/Presburger.thy	Sun Nov 26 13:19:52 2017 +0100
    71.2 +++ b/src/HOL/Presburger.thy	Sun Nov 26 21:08:32 2017 +0100
    71.3 @@ -180,8 +180,8 @@
    71.4  
    71.5  subsubsection\<open>First some trivial facts about periodic sets or predicates\<close>
    71.6  lemma periodic_finite_ex:
    71.7 -  assumes dpos: "(0::int) < d" and modd: "ALL x k. P x = P(x - k*d)"
    71.8 -  shows "(EX x. P x) = (EX j : {1..d}. P j)"
    71.9 +  assumes dpos: "(0::int) < d" and modd: "\<forall>x k. P x = P(x - k*d)"
   71.10 +  shows "(\<exists>x. P x) = (\<exists>j \<in> {1..d}. P j)"
   71.11    (is "?LHS = ?RHS")
   71.12  proof
   71.13    assume ?LHS
   71.14 @@ -219,7 +219,7 @@
   71.15  
   71.16  lemma decr_mult_lemma:
   71.17    assumes dpos: "(0::int) < d" and minus: "\<forall>x. P x \<longrightarrow> P(x - d)" and knneg: "0 <= k"
   71.18 -  shows "ALL x. P x \<longrightarrow> P(x - k*d)"
   71.19 +  shows "\<forall>x. P x \<longrightarrow> P(x - k*d)"
   71.20  using knneg
   71.21  proof (induct rule:int_ge_induct)
   71.22    case base thus ?case by simp
   71.23 @@ -235,25 +235,25 @@
   71.24  
   71.25  lemma  minusinfinity:
   71.26    assumes dpos: "0 < d" and
   71.27 -    P1eqP1: "ALL x k. P1 x = P1(x - k*d)" and ePeqP1: "EX z::int. ALL x. x < z \<longrightarrow> (P x = P1 x)"
   71.28 -  shows "(EX x. P1 x) \<longrightarrow> (EX x. P x)"
   71.29 +    P1eqP1: "\<forall>x k. P1 x = P1(x - k*d)" and ePeqP1: "\<exists>z::int. \<forall>x. x < z \<longrightarrow> (P x = P1 x)"
   71.30 +  shows "(\<exists>x. P1 x) \<longrightarrow> (\<exists>x. P x)"
   71.31  proof
   71.32 -  assume eP1: "EX x. P1 x"
   71.33 +  assume eP1: "\<exists>x. P1 x"
   71.34    then obtain x where P1: "P1 x" ..
   71.35 -  from ePeqP1 obtain z where P1eqP: "ALL x. x < z \<longrightarrow> (P x = P1 x)" ..
   71.36 +  from ePeqP1 obtain z where P1eqP: "\<forall>x. x < z \<longrightarrow> (P x = P1 x)" ..
   71.37    let ?w = "x - (\<bar>x - z\<bar> + 1) * d"
   71.38    from dpos have w: "?w < z" by(rule decr_lemma)
   71.39    have "P1 x = P1 ?w" using P1eqP1 by blast
   71.40    also have "\<dots> = P(?w)" using w P1eqP by blast
   71.41    finally have "P ?w" using P1 by blast
   71.42 -  thus "EX x. P x" ..
   71.43 +  thus "\<exists>x. P x" ..
   71.44  qed
   71.45  
   71.46  lemma cpmi: 
   71.47    assumes dp: "0 < D" and p1:"\<exists>z. \<forall> x< z. P x = P' x"
   71.48 -  and nb:"\<forall>x.(\<forall> j\<in> {1..D}. \<forall>(b::int) \<in> B. x \<noteq> b+j) --> P (x) --> P (x - D)"
   71.49 +  and nb:"\<forall>x.(\<forall> j\<in> {1..D}. \<forall>(b::int) \<in> B. x \<noteq> b+j) \<longrightarrow> P (x) \<longrightarrow> P (x - D)"
   71.50    and pd: "\<forall> x k. P' x = P' (x-k*D)"
   71.51 -  shows "(\<exists>x. P x) = ((\<exists> j\<in> {1..D} . P' j) | (\<exists> j \<in> {1..D}.\<exists> b\<in> B. P (b+j)))" 
   71.52 +  shows "(\<exists>x. P x) = ((\<exists>j \<in> {1..D} . P' j) \<or> (\<exists>j \<in> {1..D}. \<exists> b \<in> B. P (b+j)))"
   71.53           (is "?L = (?R1 \<or> ?R2)")
   71.54  proof-
   71.55   {assume "?R2" hence "?L"  by blast}
   71.56 @@ -263,11 +263,11 @@
   71.57   { fix x
   71.58     assume P: "P x" and H: "\<not> ?R2"
   71.59     {fix y assume "\<not> (\<exists>j\<in>{1..D}. \<exists>b\<in>B. P (b + j))" and P: "P y"
   71.60 -     hence "~(EX (j::int) : {1..D}. EX (b::int) : B. y = b+j)" by auto
   71.61 +     hence "\<not>(\<exists>(j::int) \<in> {1..D}. \<exists>(b::int) \<in> B. y = b+j)" by auto
   71.62       with nb P  have "P (y - D)" by auto }
   71.63 -   hence "ALL x.~(EX (j::int) : {1..D}. EX (b::int) : B. P(b+j)) --> P (x) --> P (x - D)" by blast
   71.64 +   hence "\<forall>x. \<not>(\<exists>(j::int) \<in> {1..D}. \<exists>(b::int) \<in> B. P(b+j)) \<longrightarrow> P (x) \<longrightarrow> P (x - D)" by blast
   71.65     with H P have th: " \<forall>x. P x \<longrightarrow> P (x - D)" by auto
   71.66 -   from p1 obtain z where z: "ALL x. x < z --> (P x = P' x)" by blast
   71.67 +   from p1 obtain z where z: "\<forall>x. x < z \<longrightarrow> (P x = P' x)" by blast
   71.68     let ?y = "x - (\<bar>x - z\<bar> + 1)*D"
   71.69     have zp: "0 <= (\<bar>x - z\<bar> + 1)" by arith
   71.70     from dp have yz: "?y < z" using decr_lemma[OF dp] by simp   
   71.71 @@ -284,7 +284,7 @@
   71.72      P1eqP1: "\<forall>x k. P' x = P'(x - k*d)" and ePeqP1: "\<exists> z. \<forall> x>z. P x = P' x"
   71.73    shows "(\<exists> x. P' x) \<longrightarrow> (\<exists> x. P x)"
   71.74  proof
   71.75 -  assume eP1: "EX x. P' x"
   71.76 +  assume eP1: "\<exists>x. P' x"
   71.77    then obtain x where P1: "P' x" ..
   71.78    from ePeqP1 obtain z where P1eqP: "\<forall>x>z. P x = P' x" ..
   71.79    let ?w' = "x + (\<bar>x - z\<bar> + 1) * d"
   71.80 @@ -294,12 +294,12 @@
   71.81    hence "P' x = P' ?w" using P1eqP1 by blast
   71.82    also have "\<dots> = P(?w)" using w P1eqP by blast
   71.83    finally have "P ?w" using P1 by blast
   71.84 -  thus "EX x. P x" ..
   71.85 +  thus "\<exists>x. P x" ..
   71.86  qed
   71.87  
   71.88  lemma incr_mult_lemma:
   71.89 -  assumes dpos: "(0::int) < d" and plus: "ALL x::int. P x \<longrightarrow> P(x + d)" and knneg: "0 <= k"
   71.90 -  shows "ALL x. P x \<longrightarrow> P(x + k*d)"
   71.91 +  assumes dpos: "(0::int) < d" and plus: "\<forall>x::int. P x \<longrightarrow> P(x + d)" and knneg: "0 <= k"
   71.92 +  shows "\<forall>x. P x \<longrightarrow> P(x + k*d)"
   71.93  using knneg
   71.94  proof (induct rule:int_ge_induct)
   71.95    case base thus ?case by simp
   71.96 @@ -315,9 +315,9 @@
   71.97  
   71.98  lemma cppi: 
   71.99    assumes dp: "0 < D" and p1:"\<exists>z. \<forall> x> z. P x = P' x"
  71.100 -  and nb:"\<forall>x.(\<forall> j\<in> {1..D}. \<forall>(b::int) \<in> A. x \<noteq> b - j) --> P (x) --> P (x + D)"
  71.101 +  and nb:"\<forall>x.(\<forall> j\<in> {1..D}. \<forall>(b::int) \<in> A. x \<noteq> b - j) \<longrightarrow> P (x) \<longrightarrow> P (x + D)"
  71.102    and pd: "\<forall> x k. P' x= P' (x-k*D)"
  71.103 -  shows "(\<exists>x. P x) = ((\<exists> j\<in> {1..D} . P' j) | (\<exists> j \<in> {1..D}.\<exists> b\<in> A. P (b - j)))" (is "?L = (?R1 \<or> ?R2)")
  71.104 +  shows "(\<exists>x. P x) = ((\<exists>j \<in> {1..D} . P' j) \<or> (\<exists> j \<in> {1..D}. \<exists> b\<in> A. P (b - j)))" (is "?L = (?R1 \<or> ?R2)")
  71.105  proof-
  71.106   {assume "?R2" hence "?L"  by blast}
  71.107   moreover
  71.108 @@ -326,11 +326,11 @@
  71.109   { fix x
  71.110     assume P: "P x" and H: "\<not> ?R2"
  71.111     {fix y assume "\<not> (\<exists>j\<in>{1..D}. \<exists>b\<in>A. P (b - j))" and P: "P y"
  71.112 -     hence "~(EX (j::int) : {1..D}. EX (b::int) : A. y = b - j)" by auto
  71.113 +     hence "\<not>(\<exists>(j::int) \<in> {1..D}. \<exists>(b::int) \<in> A. y = b - j)" by auto
  71.114       with nb P  have "P (y + D)" by auto }
  71.115 -   hence "ALL x.~(EX (j::int) : {1..D}. EX (b::int) : A. P(b-j)) --> P (x) --> P (x + D)" by blast
  71.116 +   hence "\<forall>x. \<not>(\<exists>(j::int) \<in> {1..D}. \<exists>(b::int) \<in> A. P(b-j)) \<longrightarrow> P (x) \<longrightarrow> P (x + D)" by blast
  71.117     with H P have th: " \<forall>x. P x \<longrightarrow> P (x + D)" by auto
  71.118 -   from p1 obtain z where z: "ALL x. x > z --> (P x = P' x)" by blast
  71.119 +   from p1 obtain z where z: "\<forall>x. x > z \<longrightarrow> (P x = P' x)" by blast
  71.120     let ?y = "x + (\<bar>x - z\<bar> + 1)*D"
  71.121     have zp: "0 <= (\<bar>x - z\<bar> + 1)" by arith
  71.122     from dp have yz: "?y > z" using incr_lemma[OF dp] by simp
    72.1 --- a/src/HOL/Quickcheck_Exhaustive.thy	Sun Nov 26 13:19:52 2017 +0100
    72.2 +++ b/src/HOL/Quickcheck_Exhaustive.thy	Sun Nov 26 21:08:32 2017 +0100
    72.3 @@ -336,7 +336,7 @@
    72.4        enum = (Enum.enum :: 'a list)
    72.5      in
    72.6        check_all_n_lists
    72.7 -        (\<lambda>(ys, yst). f (the o map_of (zip enum ys), mk_term yst))
    72.8 +        (\<lambda>(ys, yst). f (the \<circ> map_of (zip enum ys), mk_term yst))
    72.9          (natural_of_nat (length enum)))"
   72.10  
   72.11  definition enum_term_of_fun :: "('a \<Rightarrow> 'b) itself \<Rightarrow> unit \<Rightarrow> term list"
    73.1 --- a/src/HOL/Quickcheck_Narrowing.thy	Sun Nov 26 13:19:52 2017 +0100
    73.2 +++ b/src/HOL/Quickcheck_Narrowing.thy	Sun Nov 26 21:08:32 2017 +0100
    73.3 @@ -52,7 +52,7 @@
    73.4  
    73.5  primrec map_cons :: "('a => 'b) => 'a narrowing_cons => 'b narrowing_cons"
    73.6  where
    73.7 -  "map_cons f (Narrowing_cons ty cs) = Narrowing_cons ty (map (\<lambda>c. f o c) cs)"
    73.8 +  "map_cons f (Narrowing_cons ty cs) = Narrowing_cons ty (map (\<lambda>c. f \<circ> c) cs)"
    73.9  
   73.10  subsubsection \<open>From narrowing's deep representation of terms to @{theory Code_Evaluation}'s terms\<close>
   73.11  
   73.12 @@ -111,8 +111,8 @@
   73.13  definition sum :: "'a narrowing => 'a narrowing => 'a narrowing"
   73.14  where
   73.15    "sum a b d =
   73.16 -    (case a d of Narrowing_cons (Narrowing_sum_of_products ssa) ca => 
   73.17 -      case b d of Narrowing_cons (Narrowing_sum_of_products ssb) cb =>
   73.18 +    (case a d of Narrowing_cons (Narrowing_sum_of_products ssa) ca \<Rightarrow>
   73.19 +      case b d of Narrowing_cons (Narrowing_sum_of_products ssb) cb \<Rightarrow>
   73.20        Narrowing_cons (Narrowing_sum_of_products (ssa @ ssb)) (ca @ cb))"
   73.21  
   73.22  lemma [fundef_cong]:
   73.23 @@ -146,11 +146,11 @@
   73.24  (* FIXME: hard-wired maximal depth of 100 here *)
   73.25  definition exists :: "('a :: {narrowing, partial_term_of} => property) => property"
   73.26  where
   73.27 -  "exists f = (case narrowing (100 :: integer) of Narrowing_cons ty cs => Existential ty (\<lambda> t. f (conv cs t)) (partial_term_of (TYPE('a))))"
   73.28 +  "exists f = (case narrowing (100 :: integer) of Narrowing_cons ty cs \<Rightarrow> Existential ty (\<lambda> t. f (conv cs t)) (partial_term_of (TYPE('a))))"
   73.29  
   73.30  definition "all" :: "('a :: {narrowing, partial_term_of} => property) => property"
   73.31  where
   73.32 -  "all f = (case narrowing (100 :: integer) of Narrowing_cons ty cs => Universal ty (\<lambda>t. f (conv cs t)) (partial_term_of (TYPE('a))))"
   73.33 +  "all f = (case narrowing (100 :: integer) of Narrowing_cons ty cs \<Rightarrow> Universal ty (\<lambda>t. f (conv cs t)) (partial_term_of (TYPE('a))))"
   73.34  
   73.35  subsubsection \<open>class \<open>is_testable\<close>\<close>
   73.36  
    74.1 --- a/src/HOL/Quotient.thy	Sun Nov 26 13:19:52 2017 +0100
    74.2 +++ b/src/HOL/Quotient.thy	Sun Nov 26 21:08:32 2017 +0100
    74.3 @@ -107,7 +107,7 @@
    74.4    by (metis Quotient3_rep_reflp Quotient3_symp Quotient3_transp part_equivpI)
    74.5  
    74.6  lemma abs_o_rep:
    74.7 -  "Abs o Rep = id"
    74.8 +  "Abs \<circ> Rep = id"
    74.9    unfolding fun_eq_iff
   74.10    by (simp add: Quotient3_abs_rep)
   74.11  
   74.12 @@ -280,25 +280,25 @@
   74.13  
   74.14  (* Next four lemmas are unused *)
   74.15  lemma all_reg:
   74.16 -  assumes a: "!x :: 'a. (P x --> Q x)"
   74.17 +  assumes a: "\<forall>x :: 'a. (P x \<longrightarrow> Q x)"
   74.18    and     b: "All P"
   74.19    shows "All Q"
   74.20    using a b by fast
   74.21  
   74.22  lemma ex_reg:
   74.23 -  assumes a: "!x :: 'a. (P x --> Q x)"
   74.24 +  assumes a: "\<forall>x :: 'a. (P x \<longrightarrow> Q x)"
   74.25    and     b: "Ex P"
   74.26    shows "Ex Q"
   74.27    using a b by fast
   74.28  
   74.29  lemma ball_reg:
   74.30 -  assumes a: "!x :: 'a. (x \<in> R --> P x --> Q x)"
   74.31 +  assumes a: "\<forall>x :: 'a. (x \<in> R \<longrightarrow> P x \<longrightarrow> Q x)"
   74.32    and     b: "Ball R P"
   74.33    shows "Ball R Q"
   74.34    using a b by fast
   74.35  
   74.36  lemma bex_reg:
   74.37 -  assumes a: "!x :: 'a. (x \<in> R --> P x --> Q x)"
   74.38 +  assumes a: "\<forall>x :: 'a. (x \<in> R \<longrightarrow> P x \<longrightarrow> Q x)"
   74.39    and     b: "Bex R P"
   74.40    shows "Bex R Q"
   74.41    using a b by fast
    75.1 --- a/src/HOL/Random_Pred.thy	Sun Nov 26 13:19:52 2017 +0100
    75.2 +++ b/src/HOL/Random_Pred.thy	Sun Nov 26 21:08:32 2017 +0100
    75.3 @@ -59,10 +59,10 @@
    75.4     in if Predicate.eval P' () then (Orderings.bot, s') else (Predicate.single (), s'))"
    75.5  
    75.6  definition Random :: "(Random.seed \<Rightarrow> ('a \<times> (unit \<Rightarrow> term)) \<times> Random.seed) \<Rightarrow> 'a random_pred"
    75.7 -  where "Random g = scomp g (Pair o (Predicate.single o fst))"
    75.8 +  where "Random g = scomp g (Pair \<circ> (Predicate.single \<circ> fst))"
    75.9  
   75.10  definition map :: "('a \<Rightarrow> 'b) \<Rightarrow> 'a random_pred \<Rightarrow> 'b random_pred"
   75.11 -  where "map f P = bind P (single o f)"
   75.12 +  where "map f P = bind P (single \<circ> f)"
   75.13  
   75.14  hide_const (open) iter' iter empty single bind union if_randompred
   75.15    iterate_upto not_randompred Random map
    76.1 --- a/src/HOL/Random_Sequence.thy	Sun Nov 26 13:19:52 2017 +0100
    76.2 +++ b/src/HOL/Random_Sequence.thy	Sun Nov 26 21:08:32 2017 +0100
    76.3 @@ -42,7 +42,7 @@
    76.4  
    76.5  definition map :: "('a => 'b) => 'a random_dseq => 'b random_dseq"
    76.6  where
    76.7 -  "map f P = bind P (single o f)"
    76.8 +  "map f P = bind P (single \<circ> f)"
    76.9  
   76.10  fun Random :: "(natural \<Rightarrow> Random.seed \<Rightarrow> (('a \<times> (unit \<Rightarrow> term)) \<times> Random.seed)) \<Rightarrow> 'a random_dseq"
   76.11  where
   76.12 @@ -82,7 +82,7 @@
   76.13  
   76.14  definition pos_map :: "('a => 'b) => 'a pos_random_dseq => 'b pos_random_dseq"
   76.15  where
   76.16 -  "pos_map f P = pos_bind P (pos_single o f)"
   76.17 +  "pos_map f P = pos_bind P (pos_single \<circ> f)"
   76.18  
   76.19  fun iter :: "(Random.seed \<Rightarrow> ('a \<times> (unit \<Rightarrow> term)) \<times> Random.seed)
   76.20    \<Rightarrow> natural \<Rightarrow> Random.seed \<Rightarrow> 'a Lazy_Sequence.lazy_sequence"
   76.21 @@ -132,7 +132,7 @@
   76.22  
   76.23  definition neg_map :: "('a => 'b) => 'a neg_random_dseq => 'b neg_random_dseq"
   76.24  where
   76.25 -  "neg_map f P = neg_bind P (neg_single o f)"
   76.26 +  "neg_map f P = neg_bind P (neg_single \<circ> f)"
   76.27  
   76.28  definition pos_not_random_dseq :: "unit neg_random_dseq => unit pos_random_dseq"
   76.29  where
    77.1 --- a/src/HOL/Record.thy	Sun Nov 26 13:19:52 2017 +0100
    77.2 +++ b/src/HOL/Record.thy	Sun Nov 26 21:08:32 2017 +0100
    77.3 @@ -224,70 +224,70 @@
    77.4  lemmas simps = Let_def repr_inv abst_inv repr_inj abst_inj
    77.5  
    77.6  lemma iso_tuple_access_update_fst_fst:
    77.7 -  "f o h g = j o f \<Longrightarrow>
    77.8 -    (f o iso_tuple_fst isom) o (iso_tuple_fst_update isom o h) g =
    77.9 -      j o (f o iso_tuple_fst isom)"
   77.10 +  "f \<circ> h g = j \<circ> f \<Longrightarrow>
   77.11 +    (f \<circ> iso_tuple_fst isom) \<circ> (iso_tuple_fst_update isom \<circ> h) g =
   77.12 +      j \<circ> (f \<circ> iso_tuple_fst isom)"
   77.13    by (clarsimp simp: iso_tuple_fst_update_def iso_tuple_fst_def simps
   77.14      fun_eq_iff)
   77.15  
   77.16  lemma iso_tuple_access_update_snd_snd:
   77.17 -  "f o h g = j o f \<Longrightarrow>
   77.18 -    (f o iso_tuple_snd isom) o (iso_tuple_snd_update isom o h) g =
   77.19 -      j o (f o iso_tuple_snd isom)"
   77.20 +  "f \<circ> h g = j \<circ> f \<Longrightarrow>
   77.21 +    (f \<circ> iso_tuple_snd isom) \<circ> (iso_tuple_snd_update isom \<circ> h) g =
   77.22 +      j \<circ> (f \<circ> iso_tuple_snd isom)"
   77.23    by (clarsimp simp: iso_tuple_snd_update_def iso_tuple_snd_def simps
   77.24      fun_eq_iff)
   77.25  
   77.26  lemma iso_tuple_access_update_fst_snd:
   77.27 -  "(f o iso_tuple_fst isom) o (iso_tuple_snd_update isom o h) g =
   77.28 -    id o (f o iso_tuple_fst isom)"
   77.29 +  "(f \<circ> iso_tuple_fst isom) \<circ> (iso_tuple_snd_update isom \<circ> h) g =
   77.30 +    id \<circ> (f \<circ> iso_tuple_fst isom)"
   77.31    by (clarsimp simp: iso_tuple_snd_update_def iso_tuple_fst_def simps
   77.32      fun_eq_iff)
   77.33  
   77.34  lemma iso_tuple_access_update_snd_fst:
   77.35 -  "(f o iso_tuple_snd isom) o (iso_tuple_fst_update isom o h) g =
   77.36 -    id o (f o iso_tuple_snd isom)"
   77.37 +  "(f \<circ> iso_tuple_snd isom) \<circ> (iso_tuple_fst_update isom \<circ> h) g =
   77.38 +    id \<circ> (f \<circ> iso_tuple_snd isom)"
   77.39    by (clarsimp simp: iso_tuple_fst_update_def iso_tuple_snd_def simps
   77.40      fun_eq_iff)
   77.41  
   77.42  lemma iso_tuple_update_swap_fst_fst:
   77.43 -  "h f o j g = j g o h f \<Longrightarrow>
   77.44 -    (iso_tuple_fst_update isom o h) f o (iso_tuple_fst_update isom o j) g =
   77.45 -      (iso_tuple_fst_update isom o j) g o (iso_tuple_fst_update isom o h) f"
   77.46 +  "h f \<circ> j g = j g \<circ> h f \<Longrightarrow>
   77.47 +    (iso_tuple_fst_update isom \<circ> h) f \<circ> (iso_tuple_fst_update isom \<circ> j) g =
   77.48 +      (iso_tuple_fst_update isom \<circ> j) g \<circ> (iso_tuple_fst_update isom \<circ> h) f"
   77.49    by (clarsimp simp: iso_tuple_fst_update_def simps apfst_compose fun_eq_iff)
   77.50  
   77.51  lemma iso_tuple_update_swap_snd_snd:
   77.52 -  "h f o j g = j g o h f \<Longrightarrow>
   77.53 -    (iso_tuple_snd_update isom o h) f o (iso_tuple_snd_update isom o j) g =
   77.54 -      (iso_tuple_snd_update isom o j) g o (iso_tuple_snd_update isom o h) f"
   77.55 +  "h f \<circ> j g = j g \<circ> h f \<Longrightarrow>
   77.56 +    (iso_tuple_snd_update isom \<circ> h) f \<circ> (iso_tuple_snd_update isom \<circ> j) g =
   77.57 +      (iso_tuple_snd_update isom \<circ> j) g \<circ> (iso_tuple_snd_update isom \<circ> h) f"
   77.58    by (clarsimp simp: iso_tuple_snd_update_def simps apsnd_compose fun_eq_iff)
   77.59  
   77.60  lemma iso_tuple_update_swap_fst_snd:
   77.61 -  "(iso_tuple_snd_update isom o h) f o (iso_tuple_fst_update isom o j) g =
   77.62 -    (iso_tuple_fst_update isom o j) g o (iso_tuple_snd_update isom o h) f"
   77.63 +  "(iso_tuple_snd_update isom \<circ> h) f \<circ> (iso_tuple_fst_update isom \<circ> j) g =
   77.64 +    (iso_tuple_fst_update isom \<circ> j) g \<circ> (iso_tuple_snd_update isom \<circ> h) f"
   77.65    by (clarsimp simp: iso_tuple_fst_update_def iso_tuple_snd_update_def
   77.66      simps fun_eq_iff)
   77.67  
   77.68  lemma iso_tuple_update_swap_snd_fst:
   77.69 -  "(iso_tuple_fst_update isom o h) f o (iso_tuple_snd_update isom o j) g =
   77.70 -    (iso_tuple_snd_update isom o j) g o (iso_tuple_fst_update isom o h) f"
   77.71 +  "(iso_tuple_fst_update isom \<circ> h) f \<circ> (iso_tuple_snd_update isom \<circ> j) g =
   77.72 +    (iso_tuple_snd_update isom \<circ> j) g \<circ> (iso_tuple_fst_update isom \<circ> h) f"
   77.73    by (clarsimp simp: iso_tuple_fst_update_def iso_tuple_snd_update_def simps
   77.74      fun_eq_iff)
   77.75  
   77.76  lemma iso_tuple_update_compose_fst_fst:
   77.77 -  "h f o j g = k (f o g) \<Longrightarrow>
   77.78 -    (iso_tuple_fst_update isom o h) f o (iso_tuple_fst_update isom o j) g =
   77.79 -      (iso_tuple_fst_update isom o k) (f o g)"
   77.80 +  "h f \<circ> j g = k (f \<circ> g) \<Longrightarrow>
   77.81 +    (iso_tuple_fst_update isom \<circ> h) f \<circ> (iso_tuple_fst_update isom \<circ> j) g =
   77.82 +      (iso_tuple_fst_update isom \<circ> k) (f \<circ> g)"
   77.83    by (clarsimp simp: iso_tuple_fst_update_def simps apfst_compose fun_eq_iff)
   77.84  
   77.85  lemma iso_tuple_update_compose_snd_snd:
   77.86 -  "h f o j g = k (f o g) \<Longrightarrow>
   77.87 -    (iso_tuple_snd_update isom o h) f o (iso_tuple_snd_update isom o j) g =
   77.88 -      (iso_tuple_snd_update isom o k) (f o g)"
   77.89 +  "h f \<circ> j g = k (f \<circ> g) \<Longrightarrow>
   77.90 +    (iso_tuple_snd_update isom \<circ> h) f \<circ> (iso_tuple_snd_update isom \<circ> j) g =
   77.91 +      (iso_tuple_snd_update isom \<circ> k) (f \<circ> g)"
   77.92    by (clarsimp simp: iso_tuple_snd_update_def simps apsnd_compose fun_eq_iff)
   77.93  
   77.94  lemma iso_tuple_surjective_proof_assist_step:
   77.95 -  "iso_tuple_surjective_proof_assist v a (iso_tuple_fst isom o f) \<Longrightarrow>
   77.96 -    iso_tuple_surjective_proof_assist v b (iso_tuple_snd isom o f) \<Longrightarrow>
   77.97 +  "iso_tuple_surjective_proof_assist v a (iso_tuple_fst isom \<circ> f) \<Longrightarrow>
   77.98 +    iso_tuple_surjective_proof_assist v b (iso_tuple_snd isom \<circ> f) \<Longrightarrow>
   77.99      iso_tuple_surjective_proof_assist v (iso_tuple_cons isom a b) f"
  77.100    by (clarsimp simp: iso_tuple_surjective_proof_assist_def simps
  77.101      iso_tuple_fst_def iso_tuple_snd_def iso_tuple_cons_def)
  77.102 @@ -295,7 +295,7 @@
  77.103  lemma iso_tuple_fst_update_accessor_cong_assist:
  77.104    assumes "iso_tuple_update_accessor_cong_assist f g"
  77.105    shows "iso_tuple_update_accessor_cong_assist
  77.106 -    (iso_tuple_fst_update isom o f) (g o iso_tuple_fst isom)"
  77.107 +    (iso_tuple_fst_update isom \<circ> f) (g \<circ> iso_tuple_fst isom)"
  77.108  proof -
  77.109    from assms have "f id = id"
  77.110      by (rule iso_tuple_update_accessor_cong_assist_id)
  77.111 @@ -307,7 +307,7 @@
  77.112  lemma iso_tuple_snd_update_accessor_cong_assist:
  77.113    assumes "iso_tuple_update_accessor_cong_assist f g"
  77.114    shows "iso_tuple_update_accessor_cong_assist
  77.115 -    (iso_tuple_snd_update isom o f) (g o iso_tuple_snd isom)"
  77.116 +    (iso_tuple_snd_update isom \<circ> f) (g \<circ> iso_tuple_snd isom)"
  77.117  proof -
  77.118    from assms have "f id = id"
  77.119      by (rule iso_tuple_update_accessor_cong_assist_id)
  77.120 @@ -319,7 +319,7 @@
  77.121  lemma iso_tuple_fst_update_accessor_eq_assist:
  77.122    assumes "iso_tuple_update_accessor_eq_assist f g a u a' v"
  77.123    shows "iso_tuple_update_accessor_eq_assist
  77.124 -    (iso_tuple_fst_update isom o f) (g o iso_tuple_fst isom)
  77.125 +    (iso_tuple_fst_update isom \<circ> f) (g \<circ> iso_tuple_fst isom)
  77.126      (iso_tuple_cons isom a b) u (iso_tuple_cons isom a' b) v"
  77.127  proof -
  77.128    from assms have "f id = id"
  77.129 @@ -334,7 +334,7 @@
  77.130  lemma iso_tuple_snd_update_accessor_eq_assist:
  77.131    assumes "iso_tuple_update_accessor_eq_assist f g b u b' v"
  77.132    shows "iso_tuple_update_accessor_eq_assist
  77.133 -    (iso_tuple_snd_update isom o f) (g o iso_tuple_snd isom)
  77.134 +    (iso_tuple_snd_update isom \<circ> f) (g \<circ> iso_tuple_snd isom)
  77.135      (iso_tuple_cons isom a b) u (iso_tuple_cons isom a b') v"
  77.136  proof -
  77.137    from assms have "f id = id"
    78.1 --- a/src/HOL/SMT.thy	Sun Nov 26 13:19:52 2017 +0100
    78.2 +++ b/src/HOL/SMT.thy	Sun Nov 26 21:08:32 2017 +0100
    78.3 @@ -371,7 +371,7 @@
    78.4    by auto
    78.5  
    78.6  lemma [z3_rule]:
    78.7 -  "((P = Q) \<longrightarrow> R) = (R | (Q = (\<not> P)))"
    78.8 +  "((P = Q) \<longrightarrow> R) = (R \<or> (Q = (\<not> P)))"
    78.9    by auto
   78.10  
   78.11  lemma [z3_rule]:
    79.1 --- a/src/HOL/Set.thy	Sun Nov 26 13:19:52 2017 +0100
    79.2 +++ b/src/HOL/Set.thy	Sun Nov 26 21:08:32 2017 +0100
    79.3 @@ -837,7 +837,7 @@
    79.4  lemma subset_Diff_insert: "A \<subseteq> B - insert x C \<longleftrightarrow> A \<subseteq> B - C \<and> x \<notin> A"
    79.5    by blast
    79.6  
    79.7 -lemma doubleton_eq_iff: "{a, b} = {c, d} \<longleftrightarrow> a = c \<and> b = d \<or> a = d & b = c"
    79.8 +lemma doubleton_eq_iff: "{a, b} = {c, d} \<longleftrightarrow> a = c \<and> b = d \<or> a = d \<and> b = c"
    79.9    by (blast elim: equalityE)
   79.10  
   79.11  lemma Un_singleton_iff: "A \<union> B = {x} \<longleftrightarrow> A = {} \<and> B = {x} \<or> A = {x} \<and> B = {} \<or> A = {x} \<and> B = {x}"
   79.12 @@ -1584,7 +1584,7 @@
   79.13    "\<And>A P Q. (\<exists>x\<in>A. P \<and> Q x) \<longleftrightarrow> (P \<and> (\<exists>x\<in>A. Q x))"
   79.14    "\<And>P. (\<exists>x\<in>{}. P x) \<longleftrightarrow> False"
   79.15    "\<And>P. (\<exists>x\<in>UNIV. P x) \<longleftrightarrow> (\<exists>x. P x)"
   79.16 -  "\<And>a B P. (\<exists>x\<in>insert a B. P x) \<longleftrightarrow> (P a | (\<exists>x\<in>B. P x))"
   79.17 +  "\<And>a B P. (\<exists>x\<in>insert a B. P x) \<longleftrightarrow> (P a \<or> (\<exists>x\<in>B. P x))"
   79.18    "\<And>P Q. (\<exists>x\<in>Collect Q. P x) \<longleftrightarrow> (\<exists>x. Q x \<and> P x)"
   79.19    "\<And>A P f. (\<exists>x\<in>f`A. P x) \<longleftrightarrow> (\<exists>x\<in>A. P (f x))"
   79.20    "\<And>A P. (\<not>(\<exists>x\<in>A. P x)) \<longleftrightarrow> (\<forall>x\<in>A. \<not> P x)"
    80.1 --- a/src/HOL/Set_Interval.thy	Sun Nov 26 13:19:52 2017 +0100
    80.2 +++ b/src/HOL/Set_Interval.thy	Sun Nov 26 21:08:32 2017 +0100
    80.3 @@ -196,19 +196,19 @@
    80.4  begin
    80.5  
    80.6  lemma greaterThanLessThan_iff [simp]:
    80.7 -  "(i : {l<..<u}) = (l < i & i < u)"
    80.8 +  "(i \<in> {l<..<u}) = (l < i \<and> i < u)"
    80.9  by (simp add: greaterThanLessThan_def)
   80.10  
   80.11  lemma atLeastLessThan_iff [simp]:
   80.12 -  "(i : {l..<u}) = (l <= i & i < u)"
   80.13 +  "(i \<in> {l..<u}) = (l \<le> i \<and> i < u)"
   80.14  by (simp add: atLeastLessThan_def)
   80.15  
   80.16  lemma greaterThanAtMost_iff [simp]:
   80.17 -  "(i : {l<..u}) = (l < i & i <= u)"
   80.18 +  "(i \<in> {l<..u}) = (l < i \<and> i \<le> u)"
   80.19  by (simp add: greaterThanAtMost_def)
   80.20  
   80.21  lemma atLeastAtMost_iff [simp]:
   80.22 -  "(i : {l..u}) = (l <= i & i <= u)"
   80.23 +  "(i \<in> {l..u}) = (l \<le> i \<and> i \<le> u)"
   80.24  by (simp add: atLeastAtMost_def)
   80.25  
   80.26  text \<open>The above four lemmas could be declared as iffs. Unfortunately this
   80.27 @@ -234,11 +234,11 @@
   80.28  by(auto simp: atLeastAtMost_def atLeast_def atMost_def)
   80.29  
   80.30  lemma atLeastatMost_empty_iff[simp]:
   80.31 -  "{a..b} = {} \<longleftrightarrow> (~ a <= b)"
   80.32 +  "{a..b} = {} \<longleftrightarrow> (\<not> a \<le> b)"
   80.33  by auto (blast intro: order_trans)
   80.34  
   80.35  lemma atLeastatMost_empty_iff2[simp]:
   80.36 -  "{} = {a..b} \<longleftrightarrow> (~ a <= b)"
   80.37 +  "{} = {a..b} \<longleftrightarrow> (\<not> a \<le> b)"
   80.38  by auto (blast intro: order_trans)
   80.39  
   80.40  lemma atLeastLessThan_empty[simp]:
   80.41 @@ -246,20 +246,20 @@
   80.42  by(auto simp: atLeastLessThan_def)
   80.43  
   80.44  lemma atLeastLessThan_empty_iff[simp]:
   80.45 -  "{a..<b} = {} \<longleftrightarrow> (~ a < b)"
   80.46 +  "{a..<b} = {} \<longleftrightarrow> (\<not> a < b)"
   80.47  by auto (blast intro: le_less_trans)
   80.48  
   80.49  lemma atLeastLessThan_empty_iff2[simp]:
   80.50 -  "{} = {a..<b} \<longleftrightarrow> (~ a < b)"
   80.51 +  "{} = {a..<b} \<longleftrightarrow> (\<not> a < b)"
   80.52  by auto (blast intro: le_less_trans)
   80.53  
   80.54  lemma greaterThanAtMost_empty[simp]: "l \<le> k ==> {k<..l} = {}"
   80.55  by(auto simp:greaterThanAtMost_def greaterThan_def atMost_def)
   80.56  
   80.57 -lemma greaterThanAtMost_empty_iff[simp]: "{k<..l} = {} \<longleftrightarrow> ~ k < l"
   80.58 +lemma greaterThanAtMost_empty_iff[simp]: "{k<..l} = {} \<longleftrightarrow> \<not> k < l"
   80.59  by auto (blast intro: less_le_trans)
   80.60  
   80.61 -lemma greaterThanAtMost_empty_iff2[simp]: "{} = {k<..l} \<longleftrightarrow> ~ k < l"
   80.62 +lemma greaterThanAtMost_empty_iff2[simp]: "{} = {k<..l} \<longleftrightarrow> \<not> k < l"
   80.63  by auto (blast intro: less_le_trans)
   80.64  
   80.65  lemma greaterThanLessThan_empty[simp]:"l \<le> k ==> {k<..<l} = {}"
   80.66 @@ -271,13 +271,13 @@
   80.67  lemma atLeastAtMost_singleton': "a = b \<Longrightarrow> {a .. b} = {a}" by simp
   80.68  
   80.69  lemma atLeastatMost_subset_iff[simp]:
   80.70 -  "{a..b} <= {c..d} \<longleftrightarrow> (~ a <= b) | c <= a & b <= d"
   80.71 +  "{a..b} \<le> {c..d} \<longleftrightarrow> (\<not> a \<le> b) \<or> c \<le> a \<and> b \<le> d"
   80.72  unfolding atLeastAtMost_def atLeast_def atMost_def
   80.73  by (blast intro: order_trans)
   80.74  
   80.75  lemma atLeastatMost_psubset_iff:
   80.76    "{a..b} < {c..d} \<longleftrightarrow>
   80.77 -   ((~ a <= b) | c <= a & b <= d & (c < a | b < d))  &  c <= d"
   80.78 +   ((\<not> a \<le> b) \<or> c \<le> a \<and> b \<le> d \<and> (c < a \<or> b < d)) \<and> c \<le> d"
   80.79  by(simp add: psubset_eq set_eq_iff less_le_not_le)(blast intro: order_trans)
   80.80  
   80.81  lemma Icc_eq_Icc[simp]:
   80.82 @@ -294,11 +294,11 @@
   80.83  qed simp
   80.84  
   80.85  lemma Icc_subset_Ici_iff[simp]:
   80.86 -  "{l..h} \<subseteq> {l'..} = (~ l\<le>h \<or> l\<ge>l')"
   80.87 +  "{l..h} \<subseteq> {l'..} = (\<not> l\<le>h \<or> l\<ge>l')"
   80.88  by(auto simp: subset_eq intro: order_trans)
   80.89  
   80.90  lemma Icc_subset_Iic_iff[simp]:
   80.91 -  "{l..h} \<subseteq> {..h'} = (~ l\<le>h \<or> h\<le>h')"
   80.92 +  "{l..h} \<subseteq> {..h'} = (\<not> l\<le>h \<or> h\<le>h')"
   80.93  by(auto simp: subset_eq intro: order_trans)
   80.94  
   80.95  lemma not_Ici_eq_empty[simp]: "{l..} \<noteq> {}"
   80.96 @@ -462,7 +462,7 @@
   80.97  end
   80.98  
   80.99  lemma (in linorder) atLeastLessThan_subset_iff:
  80.100 -  "{a..<b} <= {c..<d} \<Longrightarrow> b <= a | c<=a & b<=d"
  80.101 +  "{a..<b} \<subseteq> {c..<d} \<Longrightarrow> b \<le> a \<or> c\<le>a \<and> b\<le>d"
  80.102  apply (auto simp:subset_eq Ball_def)
  80.103  apply(frule_tac x=a in spec)
  80.104  apply(erule_tac x=d in allE)
  80.105 @@ -1092,7 +1092,7 @@
  80.106  
  80.107  text \<open>A set of natural numbers is finite iff it is bounded.\<close>
  80.108  lemma finite_nat_set_iff_bounded:
  80.109 -  "finite(N::nat set) = (EX m. ALL n:N. n<m)" (is "?F = ?B")
  80.110 +  "finite(N::nat set) = (\<exists>m. \<forall>n\<in>N. n<m)" (is "?F = ?B")
  80.111  proof
  80.112    assume f:?F  show ?B
  80.113      using Max_ge[OF \<open>?F\<close>, simplified less_Suc_eq_le[symmetric]] by blast
  80.114 @@ -1101,7 +1101,7 @@
  80.115  qed
  80.116  
  80.117  lemma finite_nat_set_iff_bounded_le:
  80.118 -  "finite(N::nat set) = (EX m. ALL n:N. n<=m)"
  80.119 +  "finite(N::nat set) = (\<exists>m. \<forall>n\<in>N. n<=m)"
  80.120  apply(simp add:finite_nat_set_iff_bounded)
  80.121  apply(blast dest:less_imp_le_nat le_imp_less_Suc)
  80.122  done
  80.123 @@ -1177,8 +1177,8 @@
  80.124    proof
  80.125      fix x assume "x : ?B"
  80.126      then obtain i where i: "i : {k..n+k}" "x : M(i)" by auto
  80.127 -    hence "i-k\<le>n & x : M((i-k)+k)" by auto
  80.128 -    thus "x : ?A" by blast
  80.129 +    hence "i-k\<le>n \<and> x \<in> M((i-k)+k)" by auto
  80.130 +    thus "x \<in> ?A" by blast
  80.131    qed
  80.132  qed
  80.133  
  80.134 @@ -1263,7 +1263,7 @@
  80.135  by (blast dest: ex_bij_betw_nat_finite bij_betw_inv)
  80.136  
  80.137  lemma finite_same_card_bij:
  80.138 -  "finite A \<Longrightarrow> finite B \<Longrightarrow> card A = card B \<Longrightarrow> EX h. bij_betw h A B"
  80.139 +  "finite A \<Longrightarrow> finite B \<Longrightarrow> card A = card B \<Longrightarrow> \<exists>h. bij_betw h A B"
  80.140  apply(drule ex_bij_betw_finite_nat)
  80.141  apply(drule ex_bij_betw_nat_finite)
  80.142  apply(auto intro!:bij_betw_trans)
  80.143 @@ -1282,7 +1282,7 @@
  80.144      using assms ex_bij_betw_finite_nat by blast
  80.145    moreover obtain g where "bij_betw g {0 ..< card B} B"
  80.146      using assms ex_bij_betw_nat_finite by blast
  80.147 -  ultimately have "bij_betw (g o f) A B"
  80.148 +  ultimately have "bij_betw (g \<circ> f) A B"
  80.149      by (auto simp: bij_betw_trans)
  80.150    thus "(\<exists>f. bij_betw f A B)" by blast
  80.151  qed (auto simp: bij_betw_same_card)
  80.152 @@ -1297,11 +1297,11 @@
  80.153    moreover obtain g where "inj_on g {0 ..< card B}" and 3: "g ` {0 ..< card B} = B"
  80.154    using FIN' ex_bij_betw_nat_finite unfolding bij_betw_def by force
  80.155    ultimately have "inj_on g (f ` A)" using subset_inj_on[of g _ "f ` A"] * by force
  80.156 -  hence "inj_on (g o f) A" using 1 comp_inj_on by blast
  80.157 +  hence "inj_on (g \<circ> f) A" using 1 comp_inj_on by blast
  80.158    moreover
  80.159    {have "{0 ..< card A} \<le> {0 ..< card B}" using * by force
  80.160     with 2 have "f ` A  \<le> {0 ..< card B}" by blast
  80.161 -   hence "(g o f) ` A \<le> B" unfolding comp_def using 3 by force
  80.162 +   hence "(g \<circ> f) ` A \<le> B" unfolding comp_def using 3 by force
  80.163    }
  80.164    ultimately show "(\<exists>f. inj_on f A \<and> f ` A \<le> B)" by blast
  80.165  qed (insert assms, auto)
  80.166 @@ -1541,7 +1541,7 @@
  80.167  subsubsection \<open>Some Subset Conditions\<close>
  80.168  
  80.169  lemma ivl_subset [simp]:
  80.170 - "({i..<j} \<subseteq> {m..<n}) = (j \<le> i | m \<le> i & j \<le> (n::'a::linorder))"
  80.171 + "({i..<j} \<subseteq> {m..<n}) = (j \<le> i \<or> m \<le> i \<and> j \<le> (n::'a::linorder))"
  80.172  apply(auto simp:linorder_not_le)
  80.173  apply(rule ccontr)
  80.174  apply(insert linorder_le_less_linear[of i n])
  80.175 @@ -1809,7 +1809,7 @@
  80.176  by (induct n, auto simp add: algebra_simps not_le le_Suc_eq)
  80.177  
  80.178  lemma sum_nat_group: "(\<Sum>m<n::nat. sum f {m * k ..< m*k + k}) = sum f {..< n * k}"
  80.179 -  apply (subgoal_tac "k = 0 | 0 < k", auto)
  80.180 +  apply (subgoal_tac "k = 0 \<or> 0 < k", auto)
  80.181    apply (induct "n")
  80.182    apply (simp_all add: sum_add_nat_ivl add.commute atLeast0LessThan[symmetric])
  80.183    done
    81.1 --- a/src/HOL/String.thy	Sun Nov 26 13:19:52 2017 +0100
    81.2 +++ b/src/HOL/String.thy	Sun Nov 26 21:08:32 2017 +0100
    81.3 @@ -359,7 +359,7 @@
    81.4  subsection \<open>Dedicated conversion for generated computations\<close>
    81.5  
    81.6  definition char_of_num :: "num \<Rightarrow> char"
    81.7 -  where "char_of_num = char_of_nat o nat_of_num"
    81.8 +  where "char_of_num = char_of_nat \<circ> nat_of_num"
    81.9  
   81.10  lemma [code_computation_unfold]:
   81.11    "Char = char_of_num"
    82.1 --- a/src/HOL/Tools/ATP/atp_problem_generate.ML	Sun Nov 26 13:19:52 2017 +0100
    82.2 +++ b/src/HOL/Tools/ATP/atp_problem_generate.ML	Sun Nov 26 21:08:32 2017 +0100
    82.3 @@ -1598,7 +1598,7 @@
    82.4  
    82.5  (** Helper facts **)
    82.6  
    82.7 -val not_ffalse = @{lemma "~ fFalse" by (unfold fFalse_def) fast}
    82.8 +val not_ffalse = @{lemma "\<not> fFalse" by (unfold fFalse_def) fast}
    82.9  val ftrue = @{lemma "fTrue" by (unfold fTrue_def) fast}
   82.10  
   82.11  (* The Boolean indicates that a fairly sound type encoding is needed. *)
   82.12 @@ -1624,13 +1624,13 @@
   82.13             fNot_def [THEN Meson.iff_to_disjD, THEN conjunct2]}
   82.14      |> map (pair Non_Rec_Def)),
   82.15     (("fconj", false),
   82.16 -    @{lemma "~ P | ~ Q | fconj P Q" "~ fconj P Q | P" "~ fconj P Q | Q" by (unfold fconj_def) fast+}
   82.17 +    @{lemma "\<not> P \<or> \<not> Q \<or> fconj P Q" "\<not> fconj P Q \<or> P" "\<not> fconj P Q \<or> Q" by (unfold fconj_def) fast+}
   82.18      |> map (pair General)),
   82.19     (("fdisj", false),
   82.20 -    @{lemma "~ P | fdisj P Q" "~ Q | fdisj P Q" "~ fdisj P Q | P | Q" by (unfold fdisj_def) fast+}
   82.21 +    @{lemma "\<not> P \<or> fdisj P Q" "\<not> Q \<or> fdisj P Q" "\<not> fdisj P Q \<or> P \<or> Q" by (unfold fdisj_def) fast+}
   82.22      |> map (pair General)),
   82.23     (("fimplies", false),
   82.24 -    @{lemma "P | fimplies P Q" "~ Q | fimplies P Q" "~ fimplies P Q | ~ P | Q"
   82.25 +    @{lemma "P \<or> fimplies P Q" "\<not> Q \<or> fimplies P Q" "\<not> fimplies P Q \<or> \<not> P \<or> Q"
   82.26          by (unfold fimplies_def) fast+}
   82.27      |> map (pair General)),
   82.28     (("fequal", true),
   82.29 @@ -1642,8 +1642,8 @@
   82.30      |> map (pair General)),
   82.31     (* Partial characterization of "fAll" and "fEx". A complete characterization
   82.32        would require the axiom of choice for replay with Metis. *)
   82.33 -   (("fAll", false), [(General, @{lemma "~ fAll P | P x" by (auto simp: fAll_def)})]),
   82.34 -   (("fEx", false), [(General, @{lemma "~ P x | fEx P" by (auto simp: fEx_def)})])]
   82.35 +   (("fAll", false), [(General, @{lemma "\<not> fAll P \<or> P x" by (auto simp: fAll_def)})]),
   82.36 +   (("fEx", false), [(General, @{lemma "\<not> P x \<or> fEx P" by (auto simp: fEx_def)})])]
   82.37    |> map (apsnd (map (apsnd zero_var_indexes)))
   82.38  
   82.39  val completish_helper_table =
    83.1 --- a/src/HOL/Tools/ATP/atp_proof_reconstruct.ML	Sun Nov 26 13:19:52 2017 +0100
    83.2 +++ b/src/HOL/Tools/ATP/atp_proof_reconstruct.ML	Sun Nov 26 21:08:32 2017 +0100
    83.3 @@ -285,10 +285,10 @@
    83.4          else if s = tptp_and then HOLogic.conj
    83.5          else if s = tptp_implies then HOLogic.imp
    83.6          else if s = tptp_iff orelse s = tptp_equal then HOLogic.eq_const dummyT
    83.7 -        else if s = tptp_not_iff orelse s = tptp_not_equal then @{term "%P Q. Q ~= P"}
    83.8 -        else if s = tptp_if then @{term "%P Q. Q --> P"}
    83.9 -        else if s = tptp_not_and then @{term "%P Q. ~ (P & Q)"}
   83.10 -        else if s = tptp_not_or then @{term "%P Q. ~ (P | Q)"}
   83.11 +        else if s = tptp_not_iff orelse s = tptp_not_equal then @{term "\<lambda>P Q. Q \<noteq> P"}
   83.12 +        else if s = tptp_if then @{term "\<lambda>P Q. Q \<longrightarrow> P"}
   83.13 +        else if s = tptp_not_and then @{term "\<lambda>P Q. \<not> (P \<and> Q)"}
   83.14 +        else if s = tptp_not_or then @{term "\<lambda>P Q. \<not> (P \<or> Q)"}
   83.15          else if s = tptp_not then HOLogic.Not
   83.16          else if s = tptp_ho_forall then HOLogic.all_const dummyT
   83.17          else if s = tptp_ho_exists then HOLogic.exists_const dummyT
    84.1 --- a/src/HOL/Tools/Argo/argo_real.ML	Sun Nov 26 13:19:52 2017 +0100
    84.2 +++ b/src/HOL/Tools/Argo/argo_real.ML	Sun Nov 26 21:08:32 2017 +0100
    84.3 @@ -241,8 +241,8 @@
    84.4    by (simp add: max_def)}
    84.5  val abs_thm = mk_rewr @{lemma "abs (x::real) = (if 0 <= x then x else -x)" by simp}
    84.6  val sub_eq_thm = mk_rewr @{lemma "((x::real) = y) = (x - y = 0)" by simp}
    84.7 -val eq_le_thm = mk_rewr @{lemma "((x::real) = y) = ((x <= y) & (y <= x))" by (rule order_eq_iff)}
    84.8 -val add_le_thm = mk_rewr @{lemma "((x::real) <= y) = (x + n <= y + n)" by simp}
    84.9 +val eq_le_thm = mk_rewr @{lemma "((x::real) = y) = ((x \<le> y) \<and> (y \<le> x))" by (rule order_eq_iff)}
   84.10 +val add_le_thm = mk_rewr @{lemma "((x::real) \<le> y) = (x + n \<le> y + n)" by simp}
   84.11  val add_lt_thm = mk_rewr @{lemma "((x::real) < y) = (x + n < y + n)" by simp}
   84.12  val sub_le_thm = mk_rewr @{lemma "((x::real) <= y) = (x - y <= 0)" by simp}
   84.13  val sub_lt_thm = mk_rewr @{lemma "((x::real) < y) = (x - y < 0)" by simp}
   84.14 @@ -250,8 +250,8 @@
   84.15  val neg_mul_le_thm = mk_rewr @{lemma "n < 0 ==> ((x::real) <= y) = (n * y <= n * x)" by simp}
   84.16  val pos_mul_lt_thm = mk_rewr @{lemma "0 < n ==> ((x::real) < y) = (n * x < n * y)" by simp}
   84.17  val neg_mul_lt_thm = mk_rewr @{lemma "n < 0 ==> ((x::real) < y) = (n * y < n * x)" by simp}
   84.18 -val not_le_thm = mk_rewr @{lemma "(~((x::real) <= y)) = (y < x)" by auto}
   84.19 -val not_lt_thm = mk_rewr @{lemma "(~((x::real) < y)) = (y <= x)" by auto}
   84.20 +val not_le_thm = mk_rewr @{lemma "(\<not>((x::real) \<le> y)) = (y < x)" by auto}
   84.21 +val not_lt_thm = mk_rewr @{lemma "(\<not>((x::real) < y)) = (y \<le> x)" by auto}
   84.22  
   84.23  fun replay_rewr _ Argo_Proof.Rewr_Neg = Conv.rewr_conv neg_thm
   84.24    | replay_rewr ctxt (Argo_Proof.Rewr_Add ps) = add_conv ctxt ps
    85.1 --- a/src/HOL/Tools/Argo/argo_tactic.ML	Sun Nov 26 13:19:52 2017 +0100
    85.2 +++ b/src/HOL/Tools/Argo/argo_tactic.ML	Sun Nov 26 21:08:32 2017 +0100
    85.3 @@ -325,12 +325,12 @@
    85.4  fun taut_or1_term i ts = [mk_nary HOLogic.mk_disj ts, HOLogic.mk_not (nth ts i)]
    85.5  fun taut_or2_term ts = HOLogic.mk_not (mk_nary HOLogic.mk_disj ts) :: ts
    85.6  
    85.7 -val iff_1_taut = @{lemma "P = Q | P | Q" by fast}
    85.8 -val iff_2_taut = @{lemma "P = Q | (~P) | (~Q)" by fast}
    85.9 -val iff_3_taut = @{lemma "~(P = Q) | (~P) | Q" by fast}
   85.10 -val iff_4_taut = @{lemma "~(P = Q) | P | (~Q)" by fast}
   85.11 -val ite_then_taut = @{lemma "~P | (if P then t else u) = t" by auto}
   85.12 -val ite_else_taut = @{lemma "P | (if P then t else u) = u" by auto}
   85.13 +val iff_1_taut = @{lemma "P = Q \<or> P \<or> Q" by fast}
   85.14 +val iff_2_taut = @{lemma "P = Q \<or> (\<not>P) \<or> (\<not>Q)" by fast}
   85.15 +val iff_3_taut = @{lemma "\<not>(P = Q) \<or> (\<not>P) \<or> Q" by fast}
   85.16 +val iff_4_taut = @{lemma "\<not>(P = Q) \<or> P \<or> (\<not>Q)" by fast}
   85.17 +val ite_then_taut = @{lemma "\<not>P \<or> (if P then t else u) = t" by auto}
   85.18 +val ite_else_taut = @{lemma "P \<or> (if P then t else u) = u" by auto}
   85.19  
   85.20  fun taut_rule_of ctxt (Argo_Proof.Taut_And_1 n) = with_frees ctxt n taut_and1_term
   85.21    | taut_rule_of ctxt (Argo_Proof.Taut_And_2 (i, n)) = with_frees ctxt n (taut_and2_term i)
   85.22 @@ -364,8 +364,8 @@
   85.23    if i > 1 then (Conv.rewr_conv rule then_conv Conv.arg_conv (not_nary_conv rule (i - 1))) ct
   85.24    else Conv.all_conv ct
   85.25  
   85.26 -val flatten_and_thm = @{lemma "(P1 & P2) & P3 == P1 & P2 & P3" by simp}
   85.27 -val flatten_or_thm = @{lemma "(P1 | P2) | P3 == P1 | P2 | P3" by simp}
   85.28 +val flatten_and_thm = @{lemma "(P1 \<and> P2) \<and> P3 \<equiv> P1 \<and> P2 \<and> P3" by simp}
   85.29 +val flatten_or_thm = @{lemma "(P1 \<or> P2) \<or> P3 \<equiv> P1 \<or> P2 \<or> P3" by simp}
   85.30  
   85.31  fun flatten_conv cv rule ct = (
   85.32    Conv.try_conv (Conv.arg_conv cv) then_conv
   85.33 @@ -384,14 +384,14 @@
   85.34  fun explode rule1 rule2 thm =
   85.35    explode rule1 rule2 (thm RS rule1) @ explode rule1 rule2 (thm RS rule2) handle THM _ => [thm]
   85.36  val explode_conj = explode @{thm conjunct1} @{thm conjunct2}
   85.37 -val explode_ndis = explode @{lemma "~(P | Q) ==> ~P" by auto} @{lemma "~(P | Q) ==> ~Q" by auto}
   85.38 +val explode_ndis = explode @{lemma "\<not>(P \<or> Q) \<Longrightarrow> \<not>P" by auto} @{lemma "\<not>(P \<or> Q) \<Longrightarrow> \<not>Q" by auto}
   85.39  
   85.40  fun pick_false i thms = nth thms i
   85.41  
   85.42  fun pick_dual rule (i1, i2) thms =
   85.43    rule OF [nth thms i1, nth thms i2] handle THM _ => rule OF [nth thms i2, nth thms i1]
   85.44 -val pick_dual_conj = pick_dual @{lemma "~P ==> P ==> False" by auto}
   85.45 -val pick_dual_ndis = pick_dual @{lemma "~P ==> P ==> ~True" by auto}
   85.46 +val pick_dual_conj = pick_dual @{lemma "\<not>P \<Longrightarrow> P \<Longrightarrow> False" by auto}
   85.47 +val pick_dual_ndis = pick_dual @{lemma "\<not>P \<Longrightarrow> P \<Longrightarrow> \<not>True" by auto}
   85.48  
   85.49  fun join thm0 rule is thms =
   85.50    let
   85.51 @@ -399,13 +399,13 @@
   85.52      val thms' = fold (fn i => cons (if 0 <= i andalso i < l then nth thms i else thm0)) is []
   85.53    in fold (fn thm => fn thm' => discharge2 thm thm' rule) (tl thms') (hd thms') end
   85.54  
   85.55 -val join_conj = join @{lemma "True" by auto} @{lemma "P ==> Q ==> P & Q" by auto}
   85.56 -val join_ndis = join @{lemma "~False" by auto} @{lemma "~P ==> ~Q ==> ~(P | Q)" by auto}
   85.57 +val join_conj = join @{lemma "True" by auto} @{lemma "P \<Longrightarrow> Q \<Longrightarrow> P \<and> Q" by auto}
   85.58 +val join_ndis = join @{lemma "\<not>False" by auto} @{lemma "\<not>P \<Longrightarrow> \<not>Q \<Longrightarrow> \<not>(P \<or> Q)" by auto}
   85.59  
   85.60 -val false_thm = @{lemma "False ==> P" by auto}
   85.61 -val ntrue_thm = @{lemma "~True ==> P" by auto}
   85.62 -val iff_conj_thm = @{lemma "(P ==> Q) ==> (Q ==> P) ==> P = Q" by auto}
   85.63 -val iff_ndis_thm = @{lemma "(~P ==> ~Q) ==> (~Q ==> ~P) ==> P = Q" by auto}
   85.64 +val false_thm = @{lemma "False \<Longrightarrow> P" by auto}
   85.65 +val ntrue_thm = @{lemma "\<not>True \<Longrightarrow> P" by auto}
   85.66 +val iff_conj_thm = @{lemma "(P \<Longrightarrow> Q) \<Longrightarrow> (Q \<Longrightarrow> P) \<Longrightarrow> P = Q" by auto}
   85.67 +val iff_ndis_thm = @{lemma "(\<not>P \<Longrightarrow> \<not>Q) \<Longrightarrow> (\<not>Q \<Longrightarrow> \<not>P) \<Longrightarrow> P = Q" by auto}
   85.68  
   85.69  fun iff_intro rule lf rf ct =
   85.70    let
   85.71 @@ -421,21 +421,21 @@
   85.72  val sort_conj = sort_nary with_conj join_conj explode_conj
   85.73  val sort_ndis = sort_nary with_ndis join_ndis explode_ndis 
   85.74  
   85.75 -val not_true_thm = mk_rewr @{lemma "(~True) = False" by auto}
   85.76 -val not_false_thm = mk_rewr @{lemma "(~False) = True" by auto}
   85.77 -val not_not_thm = mk_rewr @{lemma "(~~P) = P" by auto}
   85.78 -val not_and_thm = mk_rewr @{lemma "(~(P & Q)) = (~P | ~Q)" by auto}
   85.79 -val not_or_thm = mk_rewr @{lemma "(~(P | Q)) = (~P & ~Q)" by auto}
   85.80 +val not_true_thm = mk_rewr @{lemma "(\<not>True) = False" by auto}
   85.81 +val not_false_thm = mk_rewr @{lemma "(\<not>False) = True" by auto}
   85.82 +val not_not_thm = mk_rewr @{lemma "(\<not>\<not>P) = P" by auto}
   85.83 +val not_and_thm = mk_rewr @{lemma "(\<not>(P \<and> Q)) = (\<not>P \<or> \<not>Q)" by auto}
   85.84 +val not_or_thm = mk_rewr @{lemma "(\<not>(P \<or> Q)) = (\<not>P \<and> \<not>Q)" by auto}
   85.85  val not_iff_thms = map mk_rewr
   85.86 -  @{lemma "(~((~P) = Q)) = (P = Q)" "(~(P = (~Q))) = (P = Q)" "(~(P = Q)) = ((~P) = Q)" by auto}
   85.87 +  @{lemma "(\<not>((\<not>P) = Q)) = (P = Q)" "(\<not>(P = (\<not>Q))) = (P = Q)" "(\<not>(P = Q)) = ((\<not>P) = Q)" by auto}
   85.88  val iff_true_thms = map mk_rewr @{lemma "(True = P) = P" "(P = True) = P" by auto}
   85.89 -val iff_false_thms = map mk_rewr @{lemma "(False = P) = (~P)" "(P = False) = (~P)" by auto}
   85.90 -val iff_not_not_thm = mk_rewr @{lemma "((~P) = (~Q)) = (P = Q)" by auto}
   85.91 +val iff_false_thms = map mk_rewr @{lemma "(False = P) = (\<not>P)" "(P = False) = (\<not>P)" by auto}
   85.92 +val iff_not_not_thm = mk_rewr @{lemma "((\<not>P) = (\<not>Q)) = (P = Q)" by auto}
   85.93  val iff_refl_thm = mk_rewr @{lemma "(P = P) = True" by auto}
   85.94  val iff_symm_thm = mk_rewr @{lemma "(P = Q) = (Q = P)" by auto}
   85.95 -val iff_dual_thms = map mk_rewr @{lemma "(P = (~P)) = False" "((~P) = P) = False" by auto}
   85.96 -val imp_thm = mk_rewr @{lemma "(P --> Q) = (~P | Q)" by auto}
   85.97 -val ite_prop_thm = mk_rewr @{lemma "(If P Q R) = ((~P | Q) & (P | R) & (Q | R))" by auto}
   85.98 +val iff_dual_thms = map mk_rewr @{lemma "(P = (\<not>P)) = False" "((\<not>P) = P) = False" by auto}
   85.99 +val imp_thm = mk_rewr @{lemma "(P \<longrightarrow> Q) = (\<not>P \<or> Q)" by auto}
  85.100 +val ite_prop_thm = mk_rewr @{lemma "(If P Q R) = ((\<not>P \<or> Q) \<and> (P \<or> R) \<and> (Q \<or> R))" by auto}
  85.101  val ite_true_thm = mk_rewr @{lemma "(If True t u) = t" by auto}
  85.102  val ite_false_thm = mk_rewr @{lemma "(If False t u) = u" by auto}
  85.103  val ite_eq_thm = mk_rewr @{lemma "(If P t t) = t" by auto}
  85.104 @@ -494,8 +494,8 @@
  85.105  
  85.106  (* proof replay for clauses *)
  85.107  
  85.108 -val prep_clause_rule = @{lemma "P ==> ~P ==> False" by fast}
  85.109 -val extract_lit_rule = @{lemma "(~(P | Q) ==> False) ==> ~P ==> ~Q ==> False" by fast}
  85.110 +val prep_clause_rule = @{lemma "P \<Longrightarrow> \<not>P \<Longrightarrow> False" by fast}
  85.111 +val extract_lit_rule = @{lemma "(\<not>(P \<or> Q) \<Longrightarrow> False) \<Longrightarrow> \<not>P \<Longrightarrow> \<not>Q \<Longrightarrow> False" by fast}
  85.112  
  85.113  fun add_lit i thm lits =
  85.114    let val ct = Thm.cprem_of thm 1
  85.115 @@ -518,7 +518,7 @@
  85.116  
  85.117  (* proof replay for unit resolution *)
  85.118  
  85.119 -val unit_rule = @{lemma "(P ==> False) ==> (~P ==> False) ==> False" by fast}
  85.120 +val unit_rule = @{lemma "(P \<Longrightarrow> False) \<Longrightarrow> (\<not>P \<Longrightarrow> False) \<Longrightarrow> False" by fast}
  85.121  val unit_rule_var = Thm.dest_arg (Thm.dest_arg1 (Thm.cprem_of unit_rule 1))
  85.122  val bogus_ct = @{cterm HOL.True}
  85.123  
  85.124 @@ -538,7 +538,7 @@
  85.125  
  85.126  (* proof replay for hypothesis *)
  85.127  
  85.128 -val dneg_rule = @{lemma "~~P ==> P" by auto}
  85.129 +val dneg_rule = @{lemma "\<not>\<not>P \<Longrightarrow> P" by auto}
  85.130  
  85.131  fun replay_hyp i ct =
  85.132    if i < 0 then (Thm.assume ct, [(~i, ct)])
  85.133 @@ -562,7 +562,7 @@
  85.134  
  85.135  (* proof replay for symmetry *)
  85.136  
  85.137 -val symm_rules = @{lemma "a = b ==> b = a" "~(a = b) ==> ~(b = a)" by simp_all}
  85.138 +val symm_rules = @{lemma "a = b ==> b = a" "\<not>(a = b) \<Longrightarrow> \<not>(b = a)" by simp_all}
  85.139  
  85.140  fun replay_symm thm = hd (discharges thm symm_rules)
  85.141  
  85.142 @@ -570,9 +570,9 @@
  85.143  (* proof replay for transitivity *)
  85.144  
  85.145  val trans_rules = @{lemma
  85.146 -  "~(a = b) ==> b = c ==> ~(a = c)"
  85.147 -  "a = b ==> ~(b = c) ==> ~(a = c)"
  85.148 -  "a = b ==> b = c ==> a = c"
  85.149 +  "\<not>(a = b) \<Longrightarrow> b = c \<Longrightarrow> \<not>(a = c)"
  85.150 +  "a = b \<Longrightarrow> \<not>(b = c) \<Longrightarrow> \<not>(a = c)"
  85.151 +  "a = b \<Longrightarrow> b = c ==> a = c"
  85.152    by simp_all}
  85.153  
  85.154  fun replay_trans thm1 thm2 = hd (discharges thm2 (discharges thm1 trans_rules))
  85.155 @@ -585,8 +585,8 @@
  85.156  
  85.157  (* proof replay for substitution *)
  85.158  
  85.159 -val subst_rule1 = @{lemma "~(p a) ==> p = q ==> a = b ==> ~(q b)" by simp}
  85.160 -val subst_rule2 = @{lemma "p a ==> p = q ==> a = b ==> q b" by simp}
  85.161 +val subst_rule1 = @{lemma "\<not>(p a) \<Longrightarrow> p = q \<Longrightarrow> a = b \<Longrightarrow> \<not>(q b)" by simp}
  85.162 +val subst_rule2 = @{lemma "p a \<Longrightarrow> p = q \<Longrightarrow> a = b \<Longrightarrow> q b" by simp}
  85.163  
  85.164  fun replay_subst thm1 thm2 thm3 =
  85.165    subst_rule1 OF [thm1, thm2, thm3] handle THM _ => subst_rule2 OF [thm1, thm2, thm3]
  85.166 @@ -596,8 +596,8 @@
  85.167  
  85.168  structure Thm_Cache = Table(type key = Argo_Proof.proof_id val ord = Argo_Proof.proof_id_ord)
  85.169  
  85.170 -val unclausify_rule1 = @{lemma "(~P ==> False) ==> P" by auto}
  85.171 -val unclausify_rule2 = @{lemma "(P ==> False) ==> ~P" by auto}
  85.172 +val unclausify_rule1 = @{lemma "(\<not>P \<Longrightarrow> False) \<Longrightarrow> P" by auto}
  85.173 +val unclausify_rule2 = @{lemma "(P \<Longrightarrow> False) \<Longrightarrow> \<not>P" by auto}
  85.174  
  85.175  fun unclausify (thm, lits) ls =
  85.176    (case (Thm.prop_of thm, lits) of
    86.1 --- a/src/HOL/Tools/BNF/bnf_comp.ML	Sun Nov 26 13:19:52 2017 +0100
    86.2 +++ b/src/HOL/Tools/BNF/bnf_comp.ML	Sun Nov 26 21:08:32 2017 +0100
    86.3 @@ -932,7 +932,7 @@
    86.4         rtac ctxt refl) 1;
    86.5      fun pred_set_tac ctxt =
    86.6        HEADGOAL (EVERY'
    86.7 -        [rtac ctxt (pred_set_of_bnf bnf RS @{thm arg_cong[of _ _ "\<lambda>f. f o _"]} RS trans),
    86.8 +        [rtac ctxt (pred_set_of_bnf bnf RS @{thm arg_cong[of _ _ "\<lambda>f. f \<circ> _"]} RS trans),
    86.9          SELECT_GOAL (unfold_thms_tac ctxt (@{thms Ball_comp_iff conj_comp_iff})), rtac ctxt refl]);
   86.10  
   86.11      val tacs = zip_axioms map_id0_tac map_comp0_tac map_cong0_tac
    87.1 --- a/src/HOL/Tools/BNF/bnf_fp_n2m_tactics.ML	Sun Nov 26 13:19:52 2017 +0100
    87.2 +++ b/src/HOL/Tools/BNF/bnf_fp_n2m_tactics.ML	Sun Nov 26 21:08:32 2017 +0100
    87.3 @@ -69,8 +69,8 @@
    87.4    unfold_thms_tac ctxt xtor_un_fold_defs THEN
    87.5    HEADGOAL (REPEAT_DETERM o FIRST' [hyp_subst_tac_thin true ctxt, rtac ctxt refl,
    87.6      rtac ctxt conjI,
    87.7 -    rtac ctxt @{thm arg_cong2[of _ _ _ _ "op o", OF refl]},
    87.8 -    rtac ctxt @{thm arg_cong2[of _ _ _ _ "op o", OF _ refl]},
    87.9 +    rtac ctxt @{thm arg_cong2[of _ _ _ _ "op \<circ>", OF refl]},
   87.10 +    rtac ctxt @{thm arg_cong2[of _ _ _ _ "op \<circ>", OF _ refl]},
   87.11      resolve_tac ctxt map_arg_congs,
   87.12      resolve_tac ctxt fp_un_fold_uniques THEN_ALL_NEW case_fp fp (K all_tac) (rtac ctxt sym),
   87.13      SELECT_GOAL (CHANGED (unfold_thms_tac ctxt (flat [simp_thms, map_thms, map_defs,
    88.1 --- a/src/HOL/Tools/BNF/bnf_fp_util.ML	Sun Nov 26 13:19:52 2017 +0100
    88.2 +++ b/src/HOL/Tools/BNF/bnf_fp_util.ML	Sun Nov 26 21:08:32 2017 +0100
    88.3 @@ -517,7 +517,7 @@
    88.4        val (tfrees, _) = BNF_Util.mk_TFrees n @{context};
    88.5        val T = mk_tupleT_balanced tfrees;
    88.6      in
    88.7 -      @{thm asm_rl[of "ALL x. P x --> Q x" for P Q]}
    88.8 +      @{thm asm_rl[of "\<forall>x. P x \<longrightarrow> Q x" for P Q]}
    88.9        |> Thm.instantiate' [SOME (Thm.ctyp_of @{context} T)] []
   88.10        |> Raw_Simplifier.rewrite_goals_rule @{context} @{thms split_paired_All[THEN eq_reflection]}
   88.11        |> (fn thm => impI RS funpow n (fn th => allI RS th) thm)
    89.1 --- a/src/HOL/Tools/BNF/bnf_gfp.ML	Sun Nov 26 13:19:52 2017 +0100
    89.2 +++ b/src/HOL/Tools/BNF/bnf_gfp.ML	Sun Nov 26 21:08:32 2017 +0100
    89.3 @@ -1629,7 +1629,7 @@
    89.4          val theta =
    89.5            (funs ~~ @{map 2} mk_fun_insts Ts funs) @ (algs ~~ map (Thm.cterm_of lthy) dtors);
    89.6          val dtor_unfold_dtors = (dtor_unfold_unique_thm OF
    89.7 -          map (fn thm => mk_trans (thm RS @{thm arg_cong2[of _ _ _ _ "op o", OF _ refl]})
    89.8 +          map (fn thm => mk_trans (thm RS @{thm arg_cong2[of _ _ _ _ "op \<circ>", OF _ refl]})
    89.9              @{thm trans[OF id_o o_id[symmetric]]}) map_id0s)
   89.10            |> split_conj_thm |> map mk_sym;
   89.11        in
    90.1 --- a/src/HOL/Tools/BNF/bnf_gfp_tactics.ML	Sun Nov 26 13:19:52 2017 +0100
    90.2 +++ b/src/HOL/Tools/BNF/bnf_gfp_tactics.ML	Sun Nov 26 21:08:32 2017 +0100
    90.3 @@ -807,10 +807,10 @@
    90.4      EVERY' (map2 (fn map_thm => fn map_comp0 =>
    90.5        EVERY' (map (rtac ctxt)
    90.6          [@{thm comp_assoc[symmetric]} RS trans,
    90.7 -        @{thm arg_cong2[of _ _ _ _ "op o"]} OF [map_thm, refl] RS trans,
    90.8 +        @{thm arg_cong2[of _ _ _ _ "op \<circ>"]} OF [map_thm, refl] RS trans,
    90.9          @{thm comp_assoc[symmetric]} RS sym RS trans, map_thm RS arg_cong RS trans,
   90.10          @{thm comp_assoc[symmetric]} RS trans,
   90.11 -        @{thm arg_cong2[of _ _ _ _ "op o"]} OF [map_comp0 RS sym, refl]]))
   90.12 +        @{thm arg_cong2[of _ _ _ _ "op \<circ>"]} OF [map_comp0 RS sym, refl]]))
   90.13      maps map_comp0s)] 1;
   90.14  
   90.15  fun mk_mcong_tac ctxt m coinduct_tac map_comps dtor_maps map_cong0s set_map0ss set_Jsetss
    91.1 --- a/src/HOL/Tools/BNF/bnf_lfp.ML	Sun Nov 26 13:19:52 2017 +0100
    91.2 +++ b/src/HOL/Tools/BNF/bnf_lfp.ML	Sun Nov 26 21:08:32 2017 +0100
    91.3 @@ -1279,7 +1279,7 @@
    91.4            (funs ~~ @{map 2} mk_fun_insts Ts funs) @ (algs ~~ map (Thm.cterm_of lthy) ctors);
    91.5          val ctor_fold_ctors = (ctor_fold_unique_thm OF
    91.6            map (fn thm => mk_trans @{thm id_o} (mk_sym (thm RS
    91.7 -            @{thm trans[OF arg_cong2[of _ _ _ _ "op o", OF refl] o_id]}))) map_id0s)
    91.8 +            @{thm trans[OF arg_cong2[of _ _ _ _ "op \<circ>", OF refl] o_id]}))) map_id0s)
    91.9            |> split_conj_thm |> map mk_sym;
   91.10        in
   91.11          infer_instantiate lthy theta ctor_fold_unique_thm
    92.1 --- a/src/HOL/Tools/BNF/bnf_lift.ML	Sun Nov 26 13:19:52 2017 +0100
    92.2 +++ b/src/HOL/Tools/BNF/bnf_lift.ML	Sun Nov 26 21:08:32 2017 +0100
    92.3 @@ -310,7 +310,7 @@
    92.4  
    92.5              fun pred_set_tac ctxt =
    92.6                HEADGOAL (EVERY'
    92.7 -                [rtac ctxt (pred_set_of_bnf bnf RS @{thm arg_cong[of _ _ "\<lambda>f. f o _"]} RS trans),
    92.8 +                [rtac ctxt (pred_set_of_bnf bnf RS @{thm arg_cong[of _ _ "\<lambda>f. f \<circ> _"]} RS trans),
    92.9                  SELECT_GOAL (unfold_thms_tac ctxt (@{thms Ball_comp_iff conj_comp_iff})),
   92.10                  rtac ctxt refl]);
   92.11  
    93.1 --- a/src/HOL/Tools/Meson/meson.ML	Sun Nov 26 13:19:52 2017 +0100
    93.2 +++ b/src/HOL/Tools/Meson/meson.ML	Sun Nov 26 21:08:32 2017 +0100
    93.3 @@ -770,8 +770,8 @@
    93.4  (*Rules to convert the head literal into a negated assumption. If the head
    93.5    literal is already negated, then using notEfalse instead of notEfalse'
    93.6    prevents a double negation.*)
    93.7 -val notEfalse = @{lemma "~ P ==> P ==> False" by (rule notE)};
    93.8 -val notEfalse' = @{lemma "P ==> ~ P ==> False" by (rule notE)};
    93.9 +val notEfalse = @{lemma "\<not> P \<Longrightarrow> P \<Longrightarrow> False" by (rule notE)};
   93.10 +val notEfalse' = @{lemma "P \<Longrightarrow> \<not> P \<Longrightarrow> False" by (rule notE)};
   93.11  
   93.12  fun negated_asm_of_head th =
   93.13      th RS notEfalse handle THM _ => th RS notEfalse';
    94.1 --- a/src/HOL/Tools/Meson/meson_clausify.ML	Sun Nov 26 13:19:52 2017 +0100
    94.2 +++ b/src/HOL/Tools/Meson/meson_clausify.ML	Sun Nov 26 21:08:32 2017 +0100
    94.3 @@ -292,7 +292,7 @@
    94.4  fun ss_only ths ctxt = clear_simpset (put_simpset HOL_basic_ss ctxt) addsimps ths
    94.5  
    94.6  val cheat_choice =
    94.7 -  @{prop "ALL x. EX y. Q x y ==> EX f. ALL x. Q x (f x)"}
    94.8 +  @{prop "\<forall>x. \<exists>y. Q x y \<Longrightarrow> \<exists>f. \<forall>x. Q x (f x)"}
    94.9    |> Logic.varify_global
   94.10    |> Skip_Proof.make_thm @{theory}
   94.11  
    95.1 --- a/src/HOL/Tools/Metis/metis_reconstruct.ML	Sun Nov 26 13:19:52 2017 +0100
    95.2 +++ b/src/HOL/Tools/Metis/metis_reconstruct.ML	Sun Nov 26 21:08:32 2017 +0100
    95.3 @@ -99,7 +99,7 @@
    95.4  
    95.5  (* INFERENCE RULE: ASSUME *)
    95.6  
    95.7 -val EXCLUDED_MIDDLE = @{lemma "P ==> ~ P ==> False" by (rule notE)}
    95.8 +val EXCLUDED_MIDDLE = @{lemma "P \<Longrightarrow> \<not> P \<Longrightarrow> False" by (rule notE)}
    95.9  
   95.10  fun inst_excluded_middle ctxt i_atom =
   95.11    let
   95.12 @@ -256,7 +256,7 @@
   95.13     don't use this trick in general because it makes the proof object uglier than
   95.14     necessary. FIXME. *)
   95.15  fun negate_head ctxt th =
   95.16 -  if exists (fn t => t aconv @{prop "~ False"}) (Thm.prems_of th) then
   95.17 +  if exists (fn t => t aconv @{prop "\<not> False"}) (Thm.prems_of th) then
   95.18      (th RS @{thm select_FalseI})
   95.19      |> fold (rewrite_rule ctxt o single) @{thms not_atomize_select atomize_not_select}
   95.20    else
   95.21 @@ -298,7 +298,7 @@
   95.22  
   95.23  (* INFERENCE RULE: REFL *)
   95.24  
   95.25 -val REFL_THM = Thm.incr_indexes 2 @{lemma "t ~= t ==> False" by simp}
   95.26 +val REFL_THM = Thm.incr_indexes 2 @{lemma "t \<noteq> t \<Longrightarrow> False" by simp}
   95.27  
   95.28  val refl_x = Thm.cterm_of @{context} (Var (hd (Term.add_vars (Thm.prop_of REFL_THM) [])));
   95.29  val refl_idx = 1 + Thm.maxidx_of REFL_THM;
   95.30 @@ -312,8 +312,8 @@
   95.31  
   95.32  (* INFERENCE RULE: EQUALITY *)
   95.33  
   95.34 -val subst_em = @{lemma "s = t ==> P s ==> ~ P t ==> False" by simp}
   95.35 -val ssubst_em = @{lemma "s = t ==> P t ==> ~ P s ==> False" by simp}
   95.36 +val subst_em = @{lemma "s = t \<Longrightarrow> P s \<Longrightarrow> \<not> P t \<Longrightarrow> False" by simp}
   95.37 +val ssubst_em = @{lemma "s = t \<Longrightarrow> P t \<Longrightarrow> \<not> P s \<Longrightarrow> False" by simp}
   95.38  
   95.39  fun equality_inference ctxt type_enc concealed sym_tab (pos, atom) fp fr =
   95.40    let val thy = Proof_Context.theory_of ctxt
    96.1 --- a/src/HOL/Tools/Old_Datatype/old_datatype.ML	Sun Nov 26 13:19:52 2017 +0100
    96.2 +++ b/src/HOL/Tools/Old_Datatype/old_datatype.ML	Sun Nov 26 21:08:32 2017 +0100
    96.3 @@ -47,7 +47,7 @@
    96.4  val Sumr_inject = @{thm Sumr_inject};
    96.5  
    96.6  val datatype_injI =
    96.7 -  @{lemma "(!!x. ALL y. f x = f y --> x = y) ==> inj f" by (simp add: inj_on_def)};
    96.8 +  @{lemma "(\<And>x. \<forall>y. f x = f y \<longrightarrow> x = y) \<Longrightarrow> inj f" by (simp add: inj_on_def)};
    96.9  
   96.10  
   96.11  (** proof of characteristic theorems **)
    97.1 --- a/src/HOL/Tools/Quotient/quotient_tacs.ML	Sun Nov 26 13:19:52 2017 +0100
    97.2 +++ b/src/HOL/Tools/Quotient/quotient_tacs.ML	Sun Nov 26 21:08:32 2017 +0100
    97.3 @@ -142,7 +142,7 @@
    97.4    map_filter (fn th => if Thm.no_prems th then SOME (OF1 @{thm equivp_reflp} th) else NONE
    97.5      handle THM _ => NONE) (rev (Named_Theorems.get ctxt @{named_theorems quot_equiv}))
    97.6  
    97.7 -val eq_imp_rel = @{lemma "equivp R ==> a = b --> R a b" by (simp add: equivp_reflp)}
    97.8 +val eq_imp_rel = @{lemma "equivp R \<Longrightarrow> a = b \<longrightarrow> R a b" by (simp add: equivp_reflp)}
    97.9  
   97.10  fun eq_imp_rel_get ctxt =
   97.11    map (OF1 eq_imp_rel) (rev (Named_Theorems.get ctxt @{named_theorems quot_equiv}))
   97.12 @@ -569,10 +569,10 @@
   97.13     the Quot_True premise in 2nd records the lifted theorem
   97.14  *)
   97.15  val procedure_thm =
   97.16 -  @{lemma  "[|A;
   97.17 -              A --> B;
   97.18 -              Quot_True D ==> B = C;
   97.19 -              C = D|] ==> D"
   97.20 +  @{lemma  "\<lbrakk>A;
   97.21 +              A \<longrightarrow> B;
   97.22 +              Quot_True D \<Longrightarrow> B = C;
   97.23 +              C = D\<rbrakk> \<Longrightarrow> D"
   97.24        by (simp add: Quot_True_def)}
   97.25  
   97.26  (* in case of partial equivalence relations, this form of the 
    98.1 --- a/src/HOL/Tools/SMT/conj_disj_perm.ML	Sun Nov 26 13:19:52 2017 +0100
    98.2 +++ b/src/HOL/Tools/SMT/conj_disj_perm.ML	Sun Nov 26 21:08:32 2017 +0100
    98.3 @@ -20,8 +20,8 @@
    98.4  
    98.5  fun add_lit thm = Termtab.update (HOLogic.dest_Trueprop (Thm.prop_of thm), thm)
    98.6  
    98.7 -val ndisj1_rule = @{lemma "~(P | Q) ==> ~P" by auto}
    98.8 -val ndisj2_rule = @{lemma "~(P | Q) ==> ~Q" by auto}
    98.9 +val ndisj1_rule = @{lemma "\<not>(P \<or> Q) \<Longrightarrow> \<not>P" by auto}
   98.10 +val ndisj2_rule = @{lemma "\<not>(P \<or> Q) \<Longrightarrow> \<not>Q" by auto}
   98.11  
   98.12  fun explode_thm thm =
   98.13    (case HOLogic.dest_Trueprop (Thm.prop_of thm) of
   98.14 @@ -33,7 +33,7 @@
   98.15  and explode_conj_thm rule1 rule2 thm lits =
   98.16    explode_thm (thm RS rule1) (explode_thm (thm RS rule2) (add_lit thm lits))
   98.17  
   98.18 -val not_false_rule = @{lemma "~False" by auto}
   98.19 +val not_false_rule = @{lemma "\<not>False" by auto}
   98.20  fun explode thm = explode_thm thm (add_lit not_false_rule (add_lit @{thm TrueI} Termtab.empty))
   98.21  
   98.22  fun find_dual_lit lits (@{const HOL.Not} $ t, thm) = Termtab.lookup lits t |> Option.map (pair thm)
   98.23 @@ -41,8 +41,8 @@
   98.24  
   98.25  fun find_dual_lits lits = Termtab.get_first (find_dual_lit lits) lits
   98.26  
   98.27 -val not_not_rule = @{lemma "P ==> ~~P" by auto}
   98.28 -val ndisj_rule = @{lemma "~P ==> ~Q ==> ~(P | Q)" by auto}
   98.29 +val not_not_rule = @{lemma "P \<Longrightarrow> \<not>\<not>P" by auto}
   98.30 +val ndisj_rule = @{lemma "\<not>P \<Longrightarrow> \<not>Q \<Longrightarrow> \<not>(P \<or> Q)" by auto}
   98.31  
   98.32  fun join lits t =
   98.33    (case Termtab.lookup lits t of
   98.34 @@ -63,8 +63,8 @@
   98.35      val thm2 = prove_conj_disj_imp crhs clhs
   98.36    in eq_from_impls thm1 thm2 end
   98.37  
   98.38 -val not_not_false_rule = @{lemma "~~False ==> P" by auto}
   98.39 -val not_true_rule = @{lemma "~True ==> P" by auto}
   98.40 +val not_not_false_rule = @{lemma "\<not>\<not>False \<Longrightarrow> P" by auto}
   98.41 +val not_true_rule = @{lemma "\<not>True \<Longrightarrow> P" by auto}
   98.42  
   98.43  fun prove_any_imp ct =
   98.44    (case Thm.term_of ct of
   98.45 @@ -94,7 +94,7 @@
   98.46      val thm2 = if to_right then prove_any_imp crhs else prove_contradiction_imp crhs
   98.47    in eq_from_impls thm1 thm2 end
   98.48  
   98.49 -val contrapos_rule = @{lemma "(~P) = (~Q) ==> P = Q" by auto}
   98.50 +val contrapos_rule = @{lemma "(\<not>P) = (\<not>Q) \<Longrightarrow> P = Q" by auto}
   98.51  fun contrapos prove cp = contrapos_rule OF [prove (apply2 (Thm.apply @{cterm HOL.Not}) cp)]
   98.52  
   98.53  datatype kind = True | False | Conj | Disj | Other
    99.1 --- a/src/HOL/Tools/SMT/z3_replay.ML	Sun Nov 26 13:19:52 2017 +0100
    99.2 +++ b/src/HOL/Tools/SMT/z3_replay.ML	Sun Nov 26 21:08:32 2017 +0100
    99.3 @@ -83,7 +83,7 @@
    99.4    fun rewrite_conv _ [] = Conv.all_conv
    99.5      | rewrite_conv ctxt eqs = Simplifier.full_rewrite (empty_simpset ctxt addsimps eqs)
    99.6  
    99.7 -  val rewrite_true_rule = @{lemma "True == ~ False" by simp}
    99.8 +  val rewrite_true_rule = @{lemma "True \<equiv> \<not> False" by simp}
    99.9    val prep_rules = [@{thm Let_def}, remove_trigger, remove_fun_app, rewrite_true_rule]
   99.10  
   99.11    fun rewrite _ [] = I
   99.12 @@ -142,8 +142,8 @@
   99.13  (* |- (EX x. P x) = P c     |- ~ (ALL x. P x) = ~ P c *)
   99.14  local
   99.15    val sk_rules = @{lemma
   99.16 -    "c = (SOME x. P x) ==> (EX x. P x) = P c"
   99.17 -    "c = (SOME x. ~ P x) ==> (~ (ALL x. P x)) = (~ P c)"
   99.18 +    "c = (SOME x. P x) \<Longrightarrow> (\<exists>x. P x) = P c"
   99.19 +    "c = (SOME x. \<not> P x) \<Longrightarrow> (\<not> (\<forall>x. P x)) = (\<not> P c)"
   99.20      by (metis someI_ex)+}
   99.21  in
   99.22  
   99.23 @@ -155,12 +155,12 @@
   99.24  
   99.25  end
   99.26  
   99.27 -val true_thm = @{lemma "~False" by simp}
   99.28 +val true_thm = @{lemma "\<not>False" by simp}
   99.29  fun make_discharge_rules rules = rules @ [@{thm allI}, @{thm refl}, @{thm reflexive}, true_thm]
   99.30  
   99.31  val intro_def_rules = @{lemma
   99.32 -  "(~ P | P) & (P | ~ P)"
   99.33 -  "(P | ~ P) & (~ P | P)"
   99.34 +  "(\<not> P \<or> P) \<and> (P \<or> \<not> P)"
   99.35 +  "(P \<or> \<not> P) \<and> (\<not> P \<or> P)"
   99.36    by fast+}
   99.37  
   99.38  fun discharge_assms_tac ctxt rules =
   100.1 --- a/src/HOL/Tools/SMT/z3_replay_methods.ML	Sun Nov 26 13:19:52 2017 +0100
   100.2 +++ b/src/HOL/Tools/SMT/z3_replay_methods.ML	Sun Nov 26 21:08:32 2017 +0100
   100.3 @@ -319,8 +319,8 @@
   100.4    end
   100.5  
   100.6  val cong_dest_rules = @{lemma
   100.7 -  "(~ P | Q) & (P | ~ Q) ==> P = Q"
   100.8 -  "(P | ~ Q) & (~ P | Q) ==> P = Q"
   100.9 +  "(\<not> P \<or> Q) \<and> (P \<or> \<not> Q) \<Longrightarrow> P = Q"
  100.10 +  "(P \<or> \<not> Q) \<and> (\<not> P \<or> Q) \<Longrightarrow> P = Q"
  100.11    by fast+}
  100.12  
  100.13  fun cong_full_core_tac ctxt =
  100.14 @@ -342,10 +342,10 @@
  100.15  (* quantifier introduction *)
  100.16  
  100.17  val quant_intro_rules = @{lemma
  100.18 -  "(!!x. P x = Q x) ==> (ALL x. P x) = (ALL x. Q x)"
  100.19 -  "(!!x. P x = Q x) ==> (EX x. P x) = (EX x. Q x)"
  100.20 -  "(!!x. (~ P x) = Q x) ==> (~ (EX x. P x)) = (ALL x. Q x)"
  100.21 -  "(!!x. (~ P x) = Q x) ==> (~ (ALL x. P x)) = (EX x. Q x)"
  100.22 +  "(\<And>x. P x = Q x) ==> (\<forall>x. P x) = (\<forall>x. Q x)"
  100.23 +  "(\<And>x. P x = Q x) ==> (\<exists>x. P x) = (\<exists>x. Q x)"
  100.24 +  "(!!x. (\<not> P x) = Q x) \<Longrightarrow> (\<not>(\<exists>x. P x)) = (\<forall>x. Q x)"
  100.25 +  "(\<And>x. (\<not> P x) = Q x) ==> (\<not>(\<forall>x. P x)) = (\<exists>x. Q x)"
  100.26    by fast+}
  100.27  
  100.28  fun quant_intro ctxt [thm] t =
  100.29 @@ -476,8 +476,8 @@
  100.30  
  100.31  (* elimination of unused bound variables *)
  100.32  
  100.33 -val elim_all = @{lemma "P = Q ==> (ALL x. P) = Q" by fast}
  100.34 -val elim_ex = @{lemma "P = Q ==> (EX x. P) = Q" by fast}
  100.35 +val elim_all = @{lemma "P = Q \<Longrightarrow> (\<forall>x. P) = Q" by fast}
  100.36 +val elim_ex = @{lemma "P = Q \<Longrightarrow> (\<exists>x. P) = Q" by fast}
  100.37  
  100.38  fun elim_unused_tac ctxt i st = (
  100.39    match_tac ctxt [@{thm refl}]
  100.40 @@ -496,7 +496,7 @@
  100.41  
  100.42  (* quantifier instantiation *)
  100.43  
  100.44 -val quant_inst_rule = @{lemma "~P x | Q ==> ~(ALL x. P x) | Q" by fast}
  100.45 +val quant_inst_rule = @{lemma "\<not>P x \<or> Q ==> \<not>(\<forall>x. P x) \<or> Q" by fast}
  100.46  
  100.47  fun quant_inst ctxt _ t = prove ctxt t (fn _ =>
  100.48    REPEAT_ALL_NEW (resolve_tac ctxt [quant_inst_rule])
  100.49 @@ -507,8 +507,8 @@
  100.50  
  100.51  exception LEMMA of unit
  100.52  
  100.53 -val intro_hyp_rule1 = @{lemma "(~P ==> Q) ==> P | Q" by fast}
  100.54 -val intro_hyp_rule2 = @{lemma "(P ==> Q) ==> ~P | Q" by fast}
  100.55 +val intro_hyp_rule1 = @{lemma "(\<not>P \<Longrightarrow> Q) \<Longrightarrow> P \<or> Q" by fast}
  100.56 +val intro_hyp_rule2 = @{lemma "(P \<Longrightarrow> Q) \<Longrightarrow> \<not>P \<or> Q" by fast}
  100.57  
  100.58  fun norm_lemma thm =
  100.59    (thm COMP_INCR intro_hyp_rule1)
  100.60 @@ -568,7 +568,7 @@
  100.61  
  100.62  (* iff-false *)
  100.63  
  100.64 -val iff_false_rule = @{lemma "~P ==> P = False" by fast}
  100.65 +val iff_false_rule = @{lemma "\<not>P \<Longrightarrow> P = False" by fast}
  100.66  
  100.67  fun iff_false _ [thm] _ = thm RS iff_false_rule
  100.68    | iff_false ctxt thms t = replay_rule_error ctxt Z3_Proof.Iff_False thms t
   101.1 --- a/src/HOL/Tools/cnf.ML	Sun Nov 26 13:19:52 2017 +0100
   101.2 +++ b/src/HOL/Tools/cnf.ML	Sun Nov 26 21:08:32 2017 +0100
   101.3 @@ -63,15 +63,15 @@
   101.4  val conj_cong            = @{lemma "[| P = P'; Q = Q' |] ==> (P \<and> Q) = (P' \<and> Q')" by auto};
   101.5  val disj_cong            = @{lemma "[| P = P'; Q = Q' |] ==> (P \<or> Q) = (P' \<or> Q')" by auto};
   101.6  
   101.7 -val make_nnf_imp         = @{lemma "[| (~P) = P'; Q = Q' |] ==> (P \<longrightarrow> Q) = (P' \<or> Q')" by auto};
   101.8 -val make_nnf_iff         = @{lemma "[| P = P'; (~P) = NP; Q = Q'; (~Q) = NQ |] ==> (P = Q) = ((P' \<or> NQ) \<and> (NP \<or> Q'))" by auto};
   101.9 -val make_nnf_not_false   = @{lemma "(~False) = True" by auto};
  101.10 -val make_nnf_not_true    = @{lemma "(~True) = False" by auto};
  101.11 -val make_nnf_not_conj    = @{lemma "[| (~P) = P'; (~Q) = Q' |] ==> (~(P \<and> Q)) = (P' \<or> Q')" by auto};
  101.12 -val make_nnf_not_disj    = @{lemma "[| (~P) = P'; (~Q) = Q' |] ==> (~(P \<or> Q)) = (P' \<and> Q')" by auto};
  101.13 -val make_nnf_not_imp     = @{lemma "[| P = P'; (~Q) = Q' |] ==> (~(P \<longrightarrow> Q)) = (P' \<and> Q')" by auto};
  101.14 -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};
  101.15 -val make_nnf_not_not     = @{lemma "P = P' ==> (~~P) = P'" by auto};
  101.16 +val make_nnf_imp         = @{lemma "[| (\<not>P) = P'; Q = Q' |] ==> (P \<longrightarrow> Q) = (P' \<or> Q')" by auto};
  101.17 +val make_nnf_iff         = @{lemma "[| P = P'; (\<not>P) = NP; Q = Q'; (\<not>Q) = NQ |] ==> (P = Q) = ((P' \<or> NQ) \<and> (NP \<or> Q'))" by auto};
  101.18 +val make_nnf_not_false   = @{lemma "(\<not>False) = True" by auto};
  101.19 +val make_nnf_not_true    = @{lemma "(\<not>True) = False" by auto};
  101.20 +val make_nnf_not_conj    = @{lemma "[| (\<not>P) = P'; (\<not>Q) = Q' |] ==> (\<not>(P \<and> Q)) = (P' \<or> Q')" by auto};
  101.21 +val make_nnf_not_disj    = @{lemma "[| (\<not>P) = P'; (\<not>Q) = Q' |] ==> (\<not>(P \<or> Q)) = (P' \<and> Q')" by auto};
  101.22 +val make_nnf_not_imp     = @{lemma "[| P = P'; (\<not>Q) = Q' |] ==> (\<not>(P \<longrightarrow> Q)) = (P' \<and> Q')" by auto};
  101.23 +val make_nnf_not_iff     = @{lemma "[| P = P'; (\<not>P) = NP; Q = Q'; (\<not>Q) = NQ |] ==> (\<not>(P = Q)) = ((P' \<or> Q') \<and> (NP \<or> NQ))" by auto};
  101.24 +val make_nnf_not_not     = @{lemma "P = P' ==> (\<not>\<not>P) = P'" by auto};
  101.25  
  101.26  val simp_TF_conj_True_l  = @{lemma "[| P = True; Q = Q' |] ==> (P \<and> Q) = Q'" by auto};
  101.27  val simp_TF_conj_True_r  = @{lemma "[| P = P'; Q = True |] ==> (P \<and> Q) = P'" by auto};
  101.28 @@ -85,10 +85,10 @@
  101.29  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};
  101.30  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};
  101.31  
  101.32 -val make_cnfx_disj_ex_l  = @{lemma "((EX (x::bool). P x) \<or> Q) = (EX x. P x \<or> Q)" by auto};
  101.33 -val make_cnfx_disj_ex_r  = @{lemma "(P \<or> (EX (x::bool). Q x)) = (EX x. P \<or> Q x)" by auto};
  101.34 -val make_cnfx_newlit     = @{lemma "(P \<or> Q) = (EX x. (P \<or> x) \<and> (Q \<or> ~x))" by auto};
  101.35 -val make_cnfx_ex_cong    = @{lemma "(ALL (x::bool). P x = Q x) \<Longrightarrow> (EX x. P x) = (EX x. Q x)" by auto};
  101.36 +val make_cnfx_disj_ex_l  = @{lemma "((\<exists>(x::bool). P x) \<or> Q) = (\<exists>x. P x \<or> Q)" by auto};
  101.37 +val make_cnfx_disj_ex_r  = @{lemma "(P \<or> (\<exists>(x::bool). Q x)) = (\<exists>x. P \<or> Q x)" by auto};
  101.38 +val make_cnfx_newlit     = @{lemma "(P \<or> Q) = (\<exists>x. (P \<or> x) \<and> (Q \<or> \<not>x))" by auto};
  101.39 +val make_cnfx_ex_cong    = @{lemma "(\<forall>(x::bool). P x = Q x) \<Longrightarrow> (\<exists>x. P x) = (\<exists>x. Q x)" by auto};
  101.40  
  101.41  val weakening_thm        = @{lemma "[| P; Q |] ==> Q" by auto};
  101.42  
   102.1 --- a/src/HOL/Tools/inductive.ML	Sun Nov 26 13:19:52 2017 +0100
   102.2 +++ b/src/HOL/Tools/inductive.ML	Sun Nov 26 21:08:32 2017 +0100
   102.3 @@ -108,9 +108,9 @@
   102.4  
   102.5  val simp_thms1 =
   102.6    map mk_meta_eq
   102.7 -    @{lemma "(~ True) = False" "(~ False) = True"
   102.8 -        "(True --> P) = P" "(False --> P) = True"
   102.9 -        "(P & True) = P" "(True & P) = P"
  102.10 +    @{lemma "(\<not> True) = False" "(\<not> False) = True"
  102.11 +        "(True \<longrightarrow> P) = P" "(False \<longrightarrow> P) = True"
  102.12 +        "(P \<and> True) = P" "(True \<and> P) = P"
  102.13        by (fact simp_thms)+};
  102.14  
  102.15  val simp_thms2 =
  102.16 @@ -420,7 +420,7 @@
  102.17        (mono RS (fp_def RS
  102.18          (if coind then @{thm def_gfp_unfold} else @{thm def_lfp_unfold})));
  102.19  
  102.20 -    val rules = [refl, TrueI, @{lemma "~ False" by (rule notI)}, exI, conjI];
  102.21 +    val rules = [refl, TrueI, @{lemma "\<not> False" by (rule notI)}, exI, conjI];
  102.22  
  102.23      val intrs = map_index (fn (i, intr) =>
  102.24        Goal.prove_sorry ctxt [] [] intr (fn _ => EVERY
  102.25 @@ -451,7 +451,7 @@
  102.26      val intrs = map dest_intr intr_ts ~~ intr_names;
  102.27  
  102.28      val rules1 = [disjE, exE, FalseE];
  102.29 -    val rules2 = [conjE, FalseE, @{lemma "~ True ==> R" by (rule notE [OF _ TrueI])}];
  102.30 +    val rules2 = [conjE, FalseE, @{lemma "\<not> True \<Longrightarrow> R" by (rule notE [OF _ TrueI])}];
  102.31  
  102.32      fun prove_elim c =
  102.33        let
   103.1 --- a/src/HOL/Tools/rewrite_hol_proof.ML	Sun Nov 26 13:19:52 2017 +0100
   103.2 +++ b/src/HOL/Tools/rewrite_hol_proof.ML	Sun Nov 26 21:08:32 2017 +0100
   103.3 @@ -118,7 +118,7 @@
   103.4     "(iffD1 % Ex P % Ex Q %% (cong % TYPE('T1) % TYPE('T2) % Ex % Ex % P % Q %% prfT1 %% prfT2 %%  \
   103.5   \    (HOL.refl % TYPE('T3) % x1 %% prfT3) %%  \
   103.6   \    (ext % TYPE('a) % TYPE(bool) % x2 % x3 %% prfa %% prfb %% prf)) %% prf') ==  \
   103.7 - \  (exE % TYPE('a) % P % EX x. Q x %% prfa %% prf' %%  \
   103.8 + \  (exE % TYPE('a) % P % \<exists>x. Q x %% prfa %% prf' %%  \
   103.9   \    (Lam x H : P x.  \
  103.10   \        exI % TYPE('a) % Q % x %% prfa %%  \
  103.11   \         (iffD1 % P x % Q x %% (prf % x) %% H)))",
  103.12 @@ -126,95 +126,95 @@
  103.13     "(iffD2 % Ex P % Ex Q %% (cong % TYPE('T1) % TYPE('T2) % Ex % Ex % P % Q %% prfT1 %% prfT2 %%  \
  103.14   \    (HOL.refl % TYPE('T3) % x1 %% prfT3) %%  \
  103.15   \    (ext % TYPE('a) % TYPE(bool) % x2 % x3 %% prfa %% prfb %% prf)) %% prf') ==  \
  103.16 - \  (exE % TYPE('a) % Q % EX x. P x %% prfa %% prf' %%  \
  103.17 + \  (exE % TYPE('a) % Q % \<exists>x. P x %% prfa %% prf' %%  \
  103.18   \    (Lam x H : Q x.  \
  103.19   \        exI % TYPE('a) % P % x %% prfa %%  \
  103.20   \         (iffD2 % P x % Q x %% (prf % x) %% H)))",
  103.21  
  103.22 -   (* & *)
  103.23 +   (* \<and> *)
  103.24  
  103.25 -   "(iffD1 % A & C % B & D %% (cong % TYPE('T1) % TYPE('T2) % x1 % x2 % C % D %% prfT1 %% prfT2 %%  \
  103.26 - \    (cong % TYPE('T3) % TYPE('T4) % op & % op & % A % B %% prfT3 %% prfT4 %%  \
  103.27 - \      (HOL.refl % TYPE('T5) % op & %% prfT5) %% prf1) %% prf2) %% prf3) ==  \
  103.28 +   "(iffD1 % A \<and> C % B \<and> D %% (cong % TYPE('T1) % TYPE('T2) % x1 % x2 % C % D %% prfT1 %% prfT2 %%  \
  103.29 + \    (cong % TYPE('T3) % TYPE('T4) % op \<and> % op \<and> % A % B %% prfT3 %% prfT4 %%  \
  103.30 + \      (HOL.refl % TYPE('T5) % op \<and> %% prfT5) %% prf1) %% prf2) %% prf3) ==  \
  103.31   \  (conjI % B % D %%  \
  103.32   \    (iffD1 % A % B %% prf1 %% (conjunct1 % A % C %% prf3)) %%  \
  103.33   \    (iffD1 % C % D %% prf2 %% (conjunct2 % A % C %% prf3)))",
  103.34  
  103.35 -   "(iffD2 % A & C % B & D %% (cong % TYPE('T1) % TYPE('T2) % x1 % x2 % C % D %% prfT1 %% prfT2 %%  \
  103.36 - \    (cong % TYPE('T3) % TYPE('T4) % op & % op & % A % B %% prfT3 %% prfT4 %%  \
  103.37 - \      (HOL.refl % TYPE('T5) % op & %% prfT5) %% prf1) %% prf2) %% prf3) ==  \
  103.38 +   "(iffD2 % A \<and> C % B \<and> D %% (cong % TYPE('T1) % TYPE('T2) % x1 % x2 % C % D %% prfT1 %% prfT2 %%  \
  103.39 + \    (cong % TYPE('T3) % TYPE('T4) % op \<and> % op \<and> % A % B %% prfT3 %% prfT4 %%  \
  103.40 + \      (HOL.refl % TYPE('T5) % op \<and> %% prfT5) %% prf1) %% prf2) %% prf3) ==  \
  103.41   \  (conjI % A % C %%  \
  103.42   \    (iffD2 % A % B %% prf1 %% (conjunct1 % B % D %% prf3)) %%  \
  103.43   \    (iffD2 % C % D %% prf2 %% (conjunct2 % B % D %% prf3)))",
  103.44  
  103.45 -   "(cong % TYPE(bool) % TYPE(bool) % op & A % op & A % B % C %% prfb %% prfb %%  \
  103.46 - \    (HOL.refl % TYPE(bool=>bool) % op & A %% prfbb)) ==  \
  103.47 - \  (cong % TYPE(bool) % TYPE(bool) % op & A % op & A % B % C %% prfb %% prfb %%  \
  103.48 +   "(cong % TYPE(bool) % TYPE(bool) % op \<and> A % op \<and> A % B % C %% prfb %% prfb %%  \
  103.49 + \    (HOL.refl % TYPE(bool=>bool) % op \<and> A %% prfbb)) ==  \
  103.50 + \  (cong % TYPE(bool) % TYPE(bool) % op \<and> A % op \<and> A % B % C %% prfb %% prfb %%  \
  103.51   \    (cong % TYPE(bool) % TYPE(bool=>bool) %  \
  103.52 - \      (op & :: bool=>bool=>bool) % (op & :: bool=>bool=>bool) % A % A %%  \
  103.53 + \      (op \<and> :: bool=>bool=>bool) % (op \<and> :: bool=>bool=>bool) % A % A %%  \
  103.54   \        prfb %% prfbb %%  \
  103.55 - \        (HOL.refl % TYPE(bool=>bool=>bool) % (op & :: bool=>bool=>bool) %%  \
  103.56 + \        (HOL.refl % TYPE(bool=>bool=>bool) % (op \<and> :: bool=>bool=>bool) %%  \
  103.57   \           (OfClass type_class % TYPE(bool=>bool=>bool))) %%  \
  103.58   \        (HOL.refl % TYPE(bool) % A %% prfb)))",
  103.59  
  103.60 -   (* | *)
  103.61 +   (* \<or> *)
  103.62  
  103.63 -   "(iffD1 % A | C % B | D %% (cong % TYPE('T1) % TYPE('T2) % x1 % x2 % C % D %% prfT1 %% prfT2 %%  \
  103.64 - \    (cong % TYPE('T3) % TYPE('T4) % op | % op | % A % B %% prfT3 %% prfT4 %%  \
  103.65 - \      (HOL.refl % TYPE('T5) % op | %% prfT5) %% prf1) %% prf2) %% prf3) ==  \
  103.66 - \  (disjE % A % C % B | D %% prf3 %%  \
  103.67 +   "(iffD1 % A \<or> C % B \<or> D %% (cong % TYPE('T1) % TYPE('T2) % x1 % x2 % C % D %% prfT1 %% prfT2 %%  \
  103.68 + \    (cong % TYPE('T3) % TYPE('T4) % op \<or> % op \<or> % A % B %% prfT3 %% prfT4 %%  \
  103.69 + \      (HOL.refl % TYPE('T5) % op \<or> %% prfT5) %% prf1) %% prf2) %% prf3) ==  \
  103.70 + \  (disjE % A % C % B \<or> D %% prf3 %%  \
  103.71   \    (Lam H : A. disjI1 % B % D %% (iffD1 % A % B %% prf1 %% H)) %%  \
  103.72   \    (Lam H : C. disjI2 % D % B %% (iffD1 % C % D %% prf2 %% H)))",
  103.73  
  103.74 -   "(iffD2 % A | C % B | D %% (cong % TYPE('T1) % TYPE('T2) % x1 % x2 % C % D %% prfT1 %% prfT2 %%  \
  103.75 - \    (cong % TYPE('T3) % TYPE('T4) % op | % op | % A % B %% prfT3 %% prfT4 %%  \
  103.76 - \      (HOL.refl % TYPE('T5) % op | %% prfT5) %% prf1) %% prf2) %% prf3) ==  \
  103.77 - \  (disjE % B % D % A | C %% prf3 %%  \
  103.78 +   "(iffD2 % A \<or> C % B \<or> D %% (cong % TYPE('T1) % TYPE('T2) % x1 % x2 % C % D %% prfT1 %% prfT2 %%  \
  103.79 + \    (cong % TYPE('T3) % TYPE('T4) % op \<or> % op \<or> % A % B %% prfT3 %% prfT4 %%  \
  103.80 + \      (HOL.refl % TYPE('T5) % op \<or> %% prfT5) %% prf1) %% prf2) %% prf3) ==  \
  103.81 + \  (disjE % B % D % A \<or> C %% prf3 %%  \
  103.82   \    (Lam H : B. disjI1 % A % C %% (iffD2 % A % B %% prf1 %% H)) %%  \
  103.83   \    (Lam H : D. disjI2 % C % A %% (iffD2 % C % D %% prf2 %% H)))",
  103.84  
  103.85 -   "(cong % TYPE(bool) % TYPE(bool) % op | A % op | A % B % C %% prfb %% prfb %%  \
  103.86 - \    (HOL.refl % TYPE(bool=>bool) % op | A %% prfbb)) ==  \
  103.87 - \  (cong % TYPE(bool) % TYPE(bool) % op | A % op | A % B % C %% prfb %% prfb %%  \
  103.88 +   "(cong % TYPE(bool) % TYPE(bool) % op \<or> A % op \<or> A % B % C %% prfb %% prfb %%  \
  103.89 + \    (HOL.refl % TYPE(bool=>bool) % op \<or> A %% prfbb)) ==  \
  103.90 + \  (cong % TYPE(bool) % TYPE(bool) % op \<or> A % op \<or> A % B % C %% prfb %% prfb %%  \
  103.91   \    (cong % TYPE(bool) % TYPE(bool=>bool) %  \
  103.92 - \      (op | :: bool=>bool=>bool) % (op | :: bool=>bool=>bool) % A % A %%  \
  103.93 + \      (op \<or> :: bool=>bool=>bool) % (op \<or> :: bool=>bool=>bool) % A % A %%  \
  103.94   \        prfb %% prfbb %%  \
  103.95 - \        (HOL.refl % TYPE(bool=>bool=>bool) % (op | :: bool=>bool=>bool) %%  \
  103.96 + \        (HOL.refl % TYPE(bool=>bool=>bool) % (op \<or> :: bool=>bool=>bool) %%  \
  103.97   \           (OfClass type_class % TYPE(bool=>bool=>bool))) %%  \
  103.98   \        (HOL.refl % TYPE(bool) % A %% prfb)))",
  103.99  
 103.100 -   (* --> *)
 103.101 +   (* \<longrightarrow> *)
 103.102  
 103.103 -   "(iffD1 % A --> C % B --> D %% (cong % TYPE('T1) % TYPE('T2) % x1 % x2 % C % D %% prfT1 %% prfT2 %%  \
 103.104 - \    (cong % TYPE('T3) % TYPE('T4) % op --> % op --> % A % B %% prfT3 %% prfT4 %%  \
 103.105 - \      (HOL.refl % TYPE('T5) % op --> %% prfT5) %% prf1) %% prf2) %% prf3) ==  \
 103.106 +   "(iffD1 % A \<longrightarrow> C % B \<longrightarrow> D %% (cong % TYPE('T1) % TYPE('T2) % x1 % x2 % C % D %% prfT1 %% prfT2 %%  \
 103.107 + \    (cong % TYPE('T3) % TYPE('T4) % op \<longrightarrow> % op \<longrightarrow> % A % B %% prfT3 %% prfT4 %%  \
 103.108 + \      (HOL.refl % TYPE('T5) % op \<longrightarrow> %% prfT5) %% prf1) %% prf2) %% prf3) ==  \
 103.109   \  (impI % B % D %% (Lam H: B. iffD1 % C % D %% prf2 %%  \
 103.110   \    (mp % A % C %% prf3 %% (iffD2 % A % B %% prf1 %% H))))",
 103.111  
 103.112 -   "(iffD2 % A --> C % B --> D %% (cong % TYPE('T1) % TYPE('T2) % x1 % x2 % C % D %% prfT1 %% prfT2 %%  \
 103.113 - \    (cong % TYPE('T3) % TYPE('T4) % op --> % op --> % A % B %% prfT3 %% prfT4 %%  \
 103.114 - \      (HOL.refl % TYPE('T5) % op --> %% prfT5) %% prf1) %% prf2) %% prf3) ==  \
 103.115 +   "(iffD2 % A \<longrightarrow> C % B \<longrightarrow> D %% (cong % TYPE('T1) % TYPE('T2) % x1 % x2 % C % D %% prfT1 %% prfT2 %%  \
 103.116 + \    (cong % TYPE('T3) % TYPE('T4) % op \<longrightarrow> % op \<longrightarrow> % A % B %% prfT3 %% prfT4 %%  \
 103.117 + \      (HOL.refl % TYPE('T5) % op \<longrightarrow> %% prfT5) %% prf1) %% prf2) %% prf3) ==  \
 103.118   \  (impI % A % C %% (Lam H: A. iffD2 % C % D %% prf2 %%  \
 103.119   \    (mp % B % D %% prf3 %% (iffD1 % A % B %% prf1 %% H))))",
 103.120  
 103.121 -   "(cong % TYPE(bool) % TYPE(bool) % op --> A % op --> A % B % C %% prfb %% prfb %%  \
 103.122 - \    (HOL.refl % TYPE(bool=>bool) % op --> A %% prfbb)) ==  \
 103.123 - \  (cong % TYPE(bool) % TYPE(bool) % op --> A % op --> A % B % C %% prfb %% prfb %%  \
 103.124 +   "(cong % TYPE(bool) % TYPE(bool) % op \<longrightarrow> A % op \<longrightarrow> A % B % C %% prfb %% prfb %%  \
 103.125 + \    (HOL.refl % TYPE(bool=>bool) % op \<longrightarrow> A %% prfbb)) ==  \
 103.126 + \  (cong % TYPE(bool) % TYPE(bool) % op \<longrightarrow> A % op \<longrightarrow> A % B % C %% prfb %% prfb %%  \
 103.127   \    (cong % TYPE(bool) % TYPE(bool=>bool) %  \
 103.128 - \      (op --> :: bool=>bool=>bool) % (op --> :: bool=>bool=>bool) % A % A %%  \
 103.129 + \      (op \<longrightarrow> :: bool=>bool=>bool) % (op \<longrightarrow> :: bool=>bool=>bool) % A % A %%  \
 103.130   \        prfb %% prfbb %%  \
 103.131 - \        (HOL.refl % TYPE(bool=>bool=>bool) % (op --> :: bool=>bool=>bool) %%  \
 103.132 + \        (HOL.refl % TYPE(bool=>bool=>bool) % (op \<longrightarrow> :: bool=>bool=>bool) %%  \
 103.133   \           (OfClass type_class % TYPE(bool=>bool=>bool))) %%  \
 103.134   \        (HOL.refl % TYPE(bool) % A %% prfb)))",
 103.135  
 103.136 -   (* ~ *)
 103.137 +   (* \<not> *)
 103.138  
 103.139 -   "(iffD1 % ~ P % ~ Q %% (cong % TYPE('T1) % TYPE('T2) % Not % Not % P % Q %% prfT1 %% prfT2 %%  \
 103.140 +   "(iffD1 % \<not> P % \<not> Q %% (cong % TYPE('T1) % TYPE('T2) % Not % Not % P % Q %% prfT1 %% prfT2 %%  \
 103.141   \    (HOL.refl % TYPE('T3) % Not %% prfT3) %% prf1) %% prf2) ==  \
 103.142   \  (notI % Q %% (Lam H: Q.  \
 103.143   \    notE % P % False %% prf2 %% (iffD2 % P % Q %% prf1 %% H)))",
 103.144  
 103.145 -   "(iffD2 % ~ P % ~ Q %% (cong % TYPE('T1) % TYPE('T2) % Not % Not % P % Q %% prfT1 %% prfT2 %%  \
 103.146 +   "(iffD2 % \<not> P % \<not> Q %% (cong % TYPE('T1) % TYPE('T2) % Not % Not % P % Q %% prfT1 %% prfT2 %%  \
 103.147   \    (HOL.refl % TYPE('T3) % Not %% prfT3) %% prf1) %% prf2) ==  \
 103.148   \  (notI % P %% (Lam H: P.  \
 103.149   \    notE % Q % False %% prf2 %% (iffD1 % P % Q %% prf1 %% H)))",
   104.1 --- a/src/HOL/Tools/sat.ML	Sun Nov 26 13:19:52 2017 +0100
   104.2 +++ b/src/HOL/Tools/sat.ML	Sun Nov 26 21:08:32 2017 +0100
   104.3 @@ -71,7 +71,7 @@
   104.4  val counter = Unsynchronized.ref 0;
   104.5  
   104.6  val resolution_thm =
   104.7 -  @{lemma "(P ==> False) ==> (~ P ==> False) ==> False" by (rule case_split)}
   104.8 +  @{lemma "(P \<Longrightarrow> False) \<Longrightarrow> (\<not> P \<Longrightarrow> False) \<Longrightarrow> False" by (rule case_split)}
   104.9  
  104.10  (* ------------------------------------------------------------------------- *)
  104.11  (* lit_ord: an order on integers that considers their absolute values only,  *)
   105.1 --- a/src/HOL/Transcendental.thy	Sun Nov 26 13:19:52 2017 +0100
   105.2 +++ b/src/HOL/Transcendental.thy	Sun Nov 26 21:08:32 2017 +0100
   105.3 @@ -4367,7 +4367,7 @@
   105.4  lemma sin_times_pi_eq_0: "sin (x * pi) = 0 \<longleftrightarrow> x \<in> \<int>"
   105.5    by (simp add: sin_zero_iff_int2) (metis Ints_cases Ints_of_int)
   105.6  
   105.7 -lemma cos_one_2pi: "cos x = 1 \<longleftrightarrow> (\<exists>n::nat. x = n * 2 * pi) | (\<exists>n::nat. x = - (n * 2 * pi))"
   105.8 +lemma cos_one_2pi: "cos x = 1 \<longleftrightarrow> (\<exists>n::nat. x = n * 2 * pi) \<or> (\<exists>n::nat. x = - (n * 2 * pi))"
   105.9    (is "?lhs = ?rhs")
  105.10  proof
  105.11    assume ?lhs