eliminated \<Colon>;
authorwenzelm
Tue Sep 01 22:32:58 2015 +0200 (2015-09-01)
changeset 61076bdc1e2f0a86a
parent 61075 f6b0d827240e
child 61077 06cca32aa519
eliminated \<Colon>;
src/Doc/Classes/Classes.thy
src/Doc/Classes/Setup.thy
src/Doc/Codegen/Adaptation.thy
src/Doc/Codegen/Foundations.thy
src/Doc/Codegen/Introduction.thy
src/Doc/Datatypes/Datatypes.thy
src/Doc/Tutorial/Types/Axioms.thy
src/HOL/Bali/AxCompl.thy
src/HOL/Basic_BNF_LFPs.thy
src/HOL/Binomial.thy
src/HOL/Code_Evaluation.thy
src/HOL/Code_Numeral.thy
src/HOL/Complex.thy
src/HOL/Datatype_Examples/Misc_Primcorec.thy
src/HOL/Datatype_Examples/Misc_Primrec.thy
src/HOL/Decision_Procs/MIR.thy
src/HOL/Divides.thy
src/HOL/Enum.thy
src/HOL/Fields.thy
src/HOL/Finite_Set.thy
src/HOL/Groups.thy
src/HOL/HOL.thy
src/HOL/HOLCF/Lift.thy
src/HOL/Hahn_Banach/Linearform.thy
src/HOL/Hahn_Banach/Normed_Space.thy
src/HOL/Hahn_Banach/Subspace.thy
src/HOL/Hilbert_Choice.thy
src/HOL/IMP/Abs_Int_ITP/Abs_Int3_ITP.thy
src/HOL/Imperative_HOL/Array.thy
src/HOL/Imperative_HOL/Heap.thy
src/HOL/Imperative_HOL/Ref.thy
src/HOL/Imperative_HOL/ex/Imperative_Reverse.thy
src/HOL/Imperative_HOL/ex/Linked_Lists.thy
src/HOL/Imperative_HOL/ex/SatChecker.thy
src/HOL/Import/HOL_Light_Maps.thy
src/HOL/Inductive.thy
src/HOL/Int.thy
src/HOL/Lattice/Orders.thy
src/HOL/Lattices.thy
src/HOL/Library/Cardinality.thy
src/HOL/Library/Char_ord.thy
src/HOL/Library/Code_Binary_Nat.thy
src/HOL/Library/Code_Char.thy
src/HOL/Library/Countable.thy
src/HOL/Library/Extended_Nat.thy
src/HOL/Library/Fraction_Field.thy
src/HOL/Library/List_lexord.thy
src/HOL/Library/Mapping.thy
src/HOL/Library/Multiset.thy
src/HOL/Library/Multiset_Order.thy
src/HOL/Library/RBT.thy
src/HOL/Library/RBT_Impl.thy
src/HOL/Library/RBT_Mapping.thy
src/HOL/Library/RBT_Set.thy
src/HOL/Library/Sublist.thy
src/HOL/Limits.thy
src/HOL/List.thy
src/HOL/MacLaurin.thy
src/HOL/Matrix_LP/Matrix.thy
src/HOL/Matrix_LP/SparseMatrix.thy
src/HOL/Meson.thy
src/HOL/Metis_Examples/Big_O.thy
src/HOL/Metis_Examples/Clausification.thy
src/HOL/Metis_Examples/Message.thy
src/HOL/Metis_Examples/Proxies.thy
src/HOL/Metis_Examples/Sets.thy
src/HOL/Metis_Examples/Type_Encodings.thy
src/HOL/MicroJava/Comp/LemmasComp.thy
src/HOL/MicroJava/Comp/TypeInf.thy
src/HOL/Multivariate_Analysis/Cartesian_Euclidean_Space.thy
src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy
src/HOL/Multivariate_Analysis/Derivative.thy
src/HOL/Multivariate_Analysis/Integration.thy
src/HOL/Multivariate_Analysis/Ordered_Euclidean_Space.thy
src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy
src/HOL/NSA/NSA.thy
src/HOL/NSA/StarDef.thy
src/HOL/Nat.thy
src/HOL/Nitpick.thy
src/HOL/Nitpick_Examples/Core_Nits.thy
src/HOL/Nitpick_Examples/Integer_Nits.thy
src/HOL/Nitpick_Examples/Manual_Nits.thy
src/HOL/Nitpick_Examples/Mini_Nits.thy
src/HOL/Nitpick_Examples/Mono_Nits.thy
src/HOL/Nitpick_Examples/Refute_Nits.thy
src/HOL/Nitpick_Examples/Special_Nits.thy
src/HOL/Nitpick_Examples/Typedef_Nits.thy
src/HOL/Old_Number_Theory/Primes.thy
src/HOL/Orderings.thy
src/HOL/Power.thy
src/HOL/Probability/Borel_Space.thy
src/HOL/Product_Type.thy
src/HOL/Proofs/Extraction/Euclid.thy
src/HOL/Quickcheck_Random.thy
src/HOL/Quotient_Examples/Quotient_Int.thy
src/HOL/Quotient_Examples/Quotient_Rat.thy
src/HOL/Real.thy
src/HOL/SPARK/Examples/RIPEMD-160/Round.thy
src/HOL/String.thy
src/HOL/Sum_Type.thy
src/HOL/TPTP/THF_Arith.thy
src/HOL/TPTP/TPTP_Proof_Reconstruction_Test.thy
src/HOL/TPTP/TPTP_Proof_Reconstruction_Test_Units.thy
src/HOL/Transcendental.thy
src/HOL/UNITY/Follows.thy
src/HOL/Word/Word.thy
src/HOL/ZF/HOLZF.thy
src/HOL/ex/Dedekind_Real.thy
src/HOL/ex/Eval_Examples.thy
src/HOL/ex/FinFunPred.thy
src/HOL/ex/Normalization_by_Evaluation.thy
src/HOL/ex/Transfer_Ex.thy
src/HOL/ex/Transfer_Int_Nat.thy
src/Tools/Code_Generator.thy
     1.1 --- a/src/Doc/Classes/Classes.thy	Tue Sep 01 17:25:36 2015 +0200
     1.2 +++ b/src/Doc/Classes/Classes.thy	Tue Sep 01 22:32:58 2015 +0200
     1.3 @@ -10,7 +10,7 @@
     1.4    of overloading\footnote{throughout this tutorial, we are referring
     1.5    to classical Haskell 1.0 type classes, not considering later
     1.6    additions in expressiveness}.  As a canonical example, a polymorphic
     1.7 -  equality function @{text "eq \<Colon> \<alpha> \<Rightarrow> \<alpha> \<Rightarrow> bool"} which is overloaded on
     1.8 +  equality function @{text "eq :: \<alpha> \<Rightarrow> \<alpha> \<Rightarrow> bool"} which is overloaded on
     1.9    different types for @{text "\<alpha>"}, which is achieved by splitting
    1.10    introduction of the @{text eq} function from its overloaded
    1.11    definitions by means of @{text class} and @{text instance}
    1.12 @@ -20,20 +20,20 @@
    1.13    \begin{quote}
    1.14  
    1.15    \noindent@{text "class eq where"} \\
    1.16 -  \hspace*{2ex}@{text "eq \<Colon> \<alpha> \<Rightarrow> \<alpha> \<Rightarrow> bool"}
    1.17 +  \hspace*{2ex}@{text "eq :: \<alpha> \<Rightarrow> \<alpha> \<Rightarrow> bool"}
    1.18  
    1.19 -  \medskip\noindent@{text "instance nat \<Colon> eq where"} \\
    1.20 +  \medskip\noindent@{text "instance nat :: eq where"} \\
    1.21    \hspace*{2ex}@{text "eq 0 0 = True"} \\
    1.22    \hspace*{2ex}@{text "eq 0 _ = False"} \\
    1.23    \hspace*{2ex}@{text "eq _ 0 = False"} \\
    1.24    \hspace*{2ex}@{text "eq (Suc n) (Suc m) = eq n m"}
    1.25  
    1.26 -  \medskip\noindent@{text "instance (\<alpha>\<Colon>eq, \<beta>\<Colon>eq) pair \<Colon> eq where"} \\
    1.27 +  \medskip\noindent@{text "instance (\<alpha>::eq, \<beta>::eq) pair :: eq where"} \\
    1.28    \hspace*{2ex}@{text "eq (x1, y1) (x2, y2) = eq x1 x2 \<and> eq y1 y2"}
    1.29  
    1.30    \medskip\noindent@{text "class ord extends eq where"} \\
    1.31 -  \hspace*{2ex}@{text "less_eq \<Colon> \<alpha> \<Rightarrow> \<alpha> \<Rightarrow> bool"} \\
    1.32 -  \hspace*{2ex}@{text "less \<Colon> \<alpha> \<Rightarrow> \<alpha> \<Rightarrow> bool"}
    1.33 +  \hspace*{2ex}@{text "less_eq :: \<alpha> \<Rightarrow> \<alpha> \<Rightarrow> bool"} \\
    1.34 +  \hspace*{2ex}@{text "less :: \<alpha> \<Rightarrow> \<alpha> \<Rightarrow> bool"}
    1.35  
    1.36    \end{quote}
    1.37  
    1.38 @@ -57,7 +57,7 @@
    1.39    \begin{quote}
    1.40  
    1.41    \noindent@{text "class eq where"} \\
    1.42 -  \hspace*{2ex}@{text "eq \<Colon> \<alpha> \<Rightarrow> \<alpha> \<Rightarrow> bool"} \\
    1.43 +  \hspace*{2ex}@{text "eq :: \<alpha> \<Rightarrow> \<alpha> \<Rightarrow> bool"} \\
    1.44    @{text "satisfying"} \\
    1.45    \hspace*{2ex}@{text "refl: eq x x"} \\
    1.46    \hspace*{2ex}@{text "sym: eq x y \<longleftrightarrow> eq x y"} \\
    1.47 @@ -111,9 +111,9 @@
    1.48    "fixes"}), the \qn{logical} part specifies properties on them
    1.49    (@{element "assumes"}).  The local @{element "fixes"} and @{element
    1.50    "assumes"} are lifted to the theory toplevel, yielding the global
    1.51 -  parameter @{term [source] "mult \<Colon> \<alpha>\<Colon>semigroup \<Rightarrow> \<alpha> \<Rightarrow> \<alpha>"} and the
    1.52 -  global theorem @{fact "semigroup.assoc:"}~@{prop [source] "\<And>x y z \<Colon>
    1.53 -  \<alpha>\<Colon>semigroup. (x \<otimes> y) \<otimes> z = x \<otimes> (y \<otimes> z)"}.
    1.54 +  parameter @{term [source] "mult :: \<alpha>::semigroup \<Rightarrow> \<alpha> \<Rightarrow> \<alpha>"} and the
    1.55 +  global theorem @{fact "semigroup.assoc:"}~@{prop [source] "\<And>x y z ::
    1.56 +  \<alpha>::semigroup. (x \<otimes> y) \<otimes> z = x \<otimes> (y \<otimes> z)"}.
    1.57  *}
    1.58  
    1.59  
    1.60 @@ -130,7 +130,7 @@
    1.61  begin
    1.62  
    1.63  definition %quote
    1.64 -  mult_int_def: "i \<otimes> j = i + (j\<Colon>int)"
    1.65 +  mult_int_def: "i \<otimes> j = i + (j::int)"
    1.66  
    1.67  instance %quote proof
    1.68    fix i j k :: int have "(i + j) + k = i + (j + k)" by simp
    1.69 @@ -163,7 +163,7 @@
    1.70  begin
    1.71  
    1.72  primrec %quote mult_nat where
    1.73 -  "(0\<Colon>nat) \<otimes> n = n"
    1.74 +  "(0::nat) \<otimes> n = n"
    1.75    | "Suc m \<otimes> n = Suc (m \<otimes> n)"
    1.76  
    1.77  instance %quote proof
    1.78 @@ -197,7 +197,7 @@
    1.79    mult_prod_def: "p\<^sub>1 \<otimes> p\<^sub>2 = (fst p\<^sub>1 \<otimes> fst p\<^sub>2, snd p\<^sub>1 \<otimes> snd p\<^sub>2)"
    1.80  
    1.81  instance %quote proof
    1.82 -  fix p\<^sub>1 p\<^sub>2 p\<^sub>3 :: "\<alpha>\<Colon>semigroup \<times> \<beta>\<Colon>semigroup"
    1.83 +  fix p\<^sub>1 p\<^sub>2 p\<^sub>3 :: "\<alpha>::semigroup \<times> \<beta>::semigroup"
    1.84    show "p\<^sub>1 \<otimes> p\<^sub>2 \<otimes> p\<^sub>3 = p\<^sub>1 \<otimes> (p\<^sub>2 \<otimes> p\<^sub>3)"
    1.85      unfolding mult_prod_def by (simp add: assoc)
    1.86  qed      
    1.87 @@ -237,10 +237,10 @@
    1.88  begin
    1.89  
    1.90  definition %quote
    1.91 -  neutral_nat_def: "\<one> = (0\<Colon>nat)"
    1.92 +  neutral_nat_def: "\<one> = (0::nat)"
    1.93  
    1.94  definition %quote
    1.95 -  neutral_int_def: "\<one> = (0\<Colon>int)"
    1.96 +  neutral_int_def: "\<one> = (0::int)"
    1.97  
    1.98  instance %quote proof
    1.99    fix n :: nat
   1.100 @@ -261,7 +261,7 @@
   1.101    neutral_prod_def: "\<one> = (\<one>, \<one>)"
   1.102  
   1.103  instance %quote proof
   1.104 -  fix p :: "\<alpha>\<Colon>monoidl \<times> \<beta>\<Colon>monoidl"
   1.105 +  fix p :: "\<alpha>::monoidl \<times> \<beta>::monoidl"
   1.106    show "\<one> \<otimes> p = p"
   1.107      unfolding neutral_prod_def mult_prod_def by (simp add: neutl)
   1.108  qed
   1.109 @@ -295,7 +295,7 @@
   1.110  begin
   1.111  
   1.112  instance %quote proof 
   1.113 -  fix p :: "\<alpha>\<Colon>monoid \<times> \<beta>\<Colon>monoid"
   1.114 +  fix p :: "\<alpha>::monoid \<times> \<beta>::monoid"
   1.115    show "p \<otimes> \<one> = p"
   1.116      unfolding neutral_prod_def mult_prod_def by (simp add: neutr)
   1.117  qed
   1.118 @@ -315,7 +315,7 @@
   1.119  begin
   1.120  
   1.121  definition %quote
   1.122 -  inverse_int_def: "i\<div> = - (i\<Colon>int)"
   1.123 +  inverse_int_def: "i\<div> = - (i::int)"
   1.124  
   1.125  instance %quote proof
   1.126    fix i :: int
   1.127 @@ -361,7 +361,7 @@
   1.128  *}
   1.129  
   1.130  interpretation %quote idem_class:
   1.131 -  idem "f \<Colon> (\<alpha>\<Colon>idem) \<Rightarrow> \<alpha>"
   1.132 +  idem "f :: (\<alpha>::idem) \<Rightarrow> \<alpha>"
   1.133  (*<*)sorry(*>*)
   1.134  
   1.135  text {*
   1.136 @@ -394,10 +394,10 @@
   1.137    \noindent Here the \qt{@{keyword "in"} @{class group}} target
   1.138    specification indicates that the result is recorded within that
   1.139    context for later use.  This local theorem is also lifted to the
   1.140 -  global one @{fact "group.left_cancel:"} @{prop [source] "\<And>x y z \<Colon>
   1.141 -  \<alpha>\<Colon>group. x \<otimes> y = x \<otimes> z \<longleftrightarrow> y = z"}.  Since type @{text "int"} has been
   1.142 +  global one @{fact "group.left_cancel:"} @{prop [source] "\<And>x y z ::
   1.143 +  \<alpha>::group. x \<otimes> y = x \<otimes> z \<longleftrightarrow> y = z"}.  Since type @{text "int"} has been
   1.144    made an instance of @{text "group"} before, we may refer to that
   1.145 -  fact as well: @{prop [source] "\<And>x y z \<Colon> int. x \<otimes> y = x \<otimes> z \<longleftrightarrow> y =
   1.146 +  fact as well: @{prop [source] "\<And>x y z :: int. x \<otimes> y = x \<otimes> z \<longleftrightarrow> y =
   1.147    z"}.
   1.148  *}
   1.149  
   1.150 @@ -415,7 +415,7 @@
   1.151  text {*
   1.152    \noindent If the locale @{text group} is also a class, this local
   1.153    definition is propagated onto a global definition of @{term [source]
   1.154 -  "pow_nat \<Colon> nat \<Rightarrow> \<alpha>\<Colon>monoid \<Rightarrow> \<alpha>\<Colon>monoid"} with corresponding theorems
   1.155 +  "pow_nat :: nat \<Rightarrow> \<alpha>::monoid \<Rightarrow> \<alpha>::monoid"} with corresponding theorems
   1.156  
   1.157    @{thm pow_nat.simps [no_vars]}.
   1.158  
   1.159 @@ -542,8 +542,8 @@
   1.160      else (pow_nat (nat (- k)) x)\<div>)"
   1.161  
   1.162  text {*
   1.163 -  \noindent yields the global definition of @{term [source] "pow_int \<Colon>
   1.164 -  int \<Rightarrow> \<alpha>\<Colon>group \<Rightarrow> \<alpha>\<Colon>group"} with the corresponding theorem @{thm
   1.165 +  \noindent yields the global definition of @{term [source] "pow_int ::
   1.166 +  int \<Rightarrow> \<alpha>::group \<Rightarrow> \<alpha>::group"} with the corresponding theorem @{thm
   1.167    pow_int_def [no_vars]}.
   1.168  *}
   1.169  
   1.170 @@ -559,7 +559,7 @@
   1.171  begin
   1.172  
   1.173  term %quote "x \<otimes> y" -- {* example 1 *}
   1.174 -term %quote "(x\<Colon>nat) \<otimes> y" -- {* example 2 *}
   1.175 +term %quote "(x::nat) \<otimes> y" -- {* example 2 *}
   1.176  
   1.177  end  %quote
   1.178  
   1.179 @@ -570,7 +570,7 @@
   1.180    operation @{text "mult [\<alpha>]"}, whereas in example 2 the type
   1.181    constraint enforces the global class operation @{text "mult [nat]"}.
   1.182    In the global context in example 3, the reference is to the
   1.183 -  polymorphic global class operation @{text "mult [?\<alpha> \<Colon> semigroup]"}.
   1.184 +  polymorphic global class operation @{text "mult [?\<alpha> :: semigroup]"}.
   1.185  *}
   1.186  
   1.187  section {* Further issues *}
     2.1 --- a/src/Doc/Classes/Setup.thy	Tue Sep 01 17:25:36 2015 +0200
     2.2 +++ b/src/Doc/Classes/Setup.thy	Tue Sep 01 22:32:58 2015 +0200
     2.3 @@ -9,9 +9,9 @@
     2.4  
     2.5  syntax
     2.6    "_alpha" :: "type"  ("\<alpha>")
     2.7 -  "_alpha_ofsort" :: "sort \<Rightarrow> type"  ("\<alpha>()\<Colon>_" [0] 1000)
     2.8 +  "_alpha_ofsort" :: "sort \<Rightarrow> type"  ("\<alpha>()::_" [0] 1000)
     2.9    "_beta" :: "type"  ("\<beta>")
    2.10 -  "_beta_ofsort" :: "sort \<Rightarrow> type"  ("\<beta>()\<Colon>_" [0] 1000)
    2.11 +  "_beta_ofsort" :: "sort \<Rightarrow> type"  ("\<beta>()::_" [0] 1000)
    2.12  
    2.13  parse_ast_translation {*
    2.14    let
     3.1 --- a/src/Doc/Codegen/Adaptation.thy	Tue Sep 01 17:25:36 2015 +0200
     3.2 +++ b/src/Doc/Codegen/Adaptation.thy	Tue Sep 01 22:32:58 2015 +0200
     3.3 @@ -174,12 +174,12 @@
     3.4      \item[@{text "Code_Binary_Nat"}] implements type
     3.5         @{typ nat} using a binary rather than a linear representation,
     3.6         which yields a considerable speedup for computations.
     3.7 -       Pattern matching with @{term "0\<Colon>nat"} / @{const "Suc"} is eliminated
     3.8 +       Pattern matching with @{term "0::nat"} / @{const "Suc"} is eliminated
     3.9         by a preprocessor.\label{abstract_nat}
    3.10  
    3.11      \item[@{text "Code_Target_Nat"}] implements type @{typ nat}
    3.12         by @{typ integer} and thus by target-language built-in integers.
    3.13 -       Pattern matching with @{term "0\<Colon>nat"} / @{const "Suc"} is eliminated
    3.14 +       Pattern matching with @{term "0::nat"} / @{const "Suc"} is eliminated
    3.15         by a preprocessor.
    3.16  
    3.17      \item[@{text "Code_Target_Numeral"}] is a convenience theory
    3.18 @@ -344,7 +344,7 @@
    3.19  instantiation %quote bar :: equal
    3.20  begin
    3.21  
    3.22 -definition %quote "HOL.equal (x\<Colon>bar) y \<longleftrightarrow> x = y"
    3.23 +definition %quote "HOL.equal (x::bar) y \<longleftrightarrow> x = y"
    3.24  
    3.25  instance %quote by default (simp add: equal_bar_def)
    3.26  
     4.1 --- a/src/Doc/Codegen/Foundations.thy	Tue Sep 01 17:25:36 2015 +0200
     4.2 +++ b/src/Doc/Codegen/Foundations.thy	Tue Sep 01 22:32:58 2015 +0200
     4.3 @@ -144,7 +144,7 @@
     4.4    \emph{Function transformers} provide a very general
     4.5    interface, transforming a list of function theorems to another list
     4.6    of function theorems, provided that neither the heading constant nor
     4.7 -  its type change.  The @{term "0\<Colon>nat"} / @{const Suc} pattern
     4.8 +  its type change.  The @{term "0::nat"} / @{const Suc} pattern
     4.9    used in theory @{text Code_Abstract_Nat} (see \secref{abstract_nat})
    4.10    uses this interface.
    4.11  
     5.1 --- a/src/Doc/Codegen/Introduction.thy	Tue Sep 01 17:25:36 2015 +0200
     5.2 +++ b/src/Doc/Codegen/Introduction.thy	Tue Sep 01 22:32:58 2015 +0200
     5.3 @@ -127,7 +127,7 @@
     5.4  begin
     5.5  
     5.6  primrec %quote mult_nat where
     5.7 -    "0 \<otimes> n = (0\<Colon>nat)"
     5.8 +    "0 \<otimes> n = (0::nat)"
     5.9    | "Suc m \<otimes> n = n + m \<otimes> n"
    5.10  
    5.11  definition %quote neutral_nat where
     6.1 --- a/src/Doc/Datatypes/Datatypes.thy	Tue Sep 01 17:25:36 2015 +0200
     6.2 +++ b/src/Doc/Datatypes/Datatypes.thy	Tue Sep 01 22:32:58 2015 +0200
     6.3 @@ -192,8 +192,8 @@
     6.4  
     6.5  text {*
     6.6  \noindent
     6.7 -The constructors are @{text "None \<Colon> 'a option"} and
     6.8 -@{text "Some \<Colon> 'a \<Rightarrow> 'a option"}.
     6.9 +The constructors are @{text "None :: 'a option"} and
    6.10 +@{text "Some :: 'a \<Rightarrow> 'a option"}.
    6.11  
    6.12  The next example has three type parameters:
    6.13  *}
    6.14 @@ -203,7 +203,7 @@
    6.15  text {*
    6.16  \noindent
    6.17  The constructor is
    6.18 -@{text "Triple \<Colon> 'a \<Rightarrow> 'b \<Rightarrow> 'c \<Rightarrow> ('a, 'b, 'c) triple"}.
    6.19 +@{text "Triple :: 'a \<Rightarrow> 'b \<Rightarrow> 'c \<Rightarrow> ('a, 'b, 'c) triple"}.
    6.20  Unlike in Standard ML, curried constructors are supported. The uncurried variant
    6.21  is also possible:
    6.22  *}
    6.23 @@ -381,21 +381,21 @@
    6.24  
    6.25  \begin{tabular}{@ {}ll@ {}}
    6.26  Constructors: &
    6.27 -  @{text "Nil \<Colon> 'a list"} \\
    6.28 +  @{text "Nil :: 'a list"} \\
    6.29  &
    6.30 -  @{text "Cons \<Colon> 'a \<Rightarrow> 'a list \<Rightarrow> 'a list"} \\
    6.31 +  @{text "Cons :: 'a \<Rightarrow> 'a list \<Rightarrow> 'a list"} \\
    6.32  Discriminator: &
    6.33 -  @{text "null \<Colon> 'a list \<Rightarrow> bool"} \\
    6.34 +  @{text "null :: 'a list \<Rightarrow> bool"} \\
    6.35  Selectors: &
    6.36 -  @{text "hd \<Colon> 'a list \<Rightarrow> 'a"} \\
    6.37 +  @{text "hd :: 'a list \<Rightarrow> 'a"} \\
    6.38  &
    6.39 -  @{text "tl \<Colon> 'a list \<Rightarrow> 'a list"} \\
    6.40 +  @{text "tl :: 'a list \<Rightarrow> 'a list"} \\
    6.41  Set function: &
    6.42 -  @{text "set \<Colon> 'a list \<Rightarrow> 'a set"} \\
    6.43 +  @{text "set :: 'a list \<Rightarrow> 'a set"} \\
    6.44  Map function: &
    6.45 -  @{text "map \<Colon> ('a \<Rightarrow> 'b) \<Rightarrow> 'a list \<Rightarrow> 'b list"} \\
    6.46 +  @{text "map :: ('a \<Rightarrow> 'b) \<Rightarrow> 'a list \<Rightarrow> 'b list"} \\
    6.47  Relator: &
    6.48 -  @{text "list_all2 \<Colon> ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'b list \<Rightarrow> bool"}
    6.49 +  @{text "list_all2 :: ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> 'a list \<Rightarrow> 'b list \<Rightarrow> bool"}
    6.50  \end{tabular}
    6.51  
    6.52  \medskip
    6.53 @@ -1327,7 +1327,7 @@
    6.54  map function @{const map_option}:
    6.55  *}
    6.56  
    6.57 -    primrec (*<*)(in early) (*>*)sum_btree :: "('a\<Colon>{zero,plus}) btree \<Rightarrow> 'a" where
    6.58 +    primrec (*<*)(in early) (*>*)sum_btree :: "('a::{zero,plus}) btree \<Rightarrow> 'a" where
    6.59        "sum_btree (BNode a lt rt) =
    6.60           a + the_default 0 (map_option sum_btree lt) +
    6.61             the_default 0 (map_option sum_btree rt)"
    6.62 @@ -1427,7 +1427,7 @@
    6.63  *}
    6.64  
    6.65      primrec
    6.66 -      sum_btree :: "('a\<Colon>{zero,plus}) btree \<Rightarrow> 'a" and
    6.67 +      sum_btree :: "('a::{zero,plus}) btree \<Rightarrow> 'a" and
    6.68        sum_btree_option :: "'a btree option \<Rightarrow> 'a"
    6.69      where
    6.70        "sum_btree (BNode a lt rt) =
    6.71 @@ -1590,7 +1590,7 @@
    6.72  \setlength{\itemsep}{0pt}
    6.73  
    6.74  \item
    6.75 -Introduce a fully unspecified constant @{text "un_D\<^sub>0 \<Colon> 'a"} using
    6.76 +Introduce a fully unspecified constant @{text "un_D\<^sub>0 :: 'a"} using
    6.77  @{command consts}.
    6.78  
    6.79  \item
    6.80 @@ -1627,7 +1627,7 @@
    6.81  text {* \blankline *}
    6.82  
    6.83      overloading
    6.84 -      termi\<^sub>0 \<equiv> "termi\<^sub>0 \<Colon> ('a, 'b) tlist \<Rightarrow> 'b"
    6.85 +      termi\<^sub>0 \<equiv> "termi\<^sub>0 :: ('a, 'b) tlist \<Rightarrow> 'b"
    6.86      begin
    6.87      primrec termi\<^sub>0 :: "('a, 'b) tlist \<Rightarrow> 'b" where
    6.88        "termi\<^sub>0 (TNil y) = y" |
    6.89 @@ -2322,12 +2322,12 @@
    6.90  text {*
    6.91  \noindent
    6.92  Since there is no sequentiality, we can apply the equation for @{const Choice}
    6.93 -without having first to discharge @{term "n mod (4\<Colon>int) \<noteq> 0"},
    6.94 -@{term "n mod (4\<Colon>int) \<noteq> 1"}, and
    6.95 -@{term "n mod (4\<Colon>int) \<noteq> 2"}.
    6.96 +without having first to discharge @{term "n mod (4::int) \<noteq> 0"},
    6.97 +@{term "n mod (4::int) \<noteq> 1"}, and
    6.98 +@{term "n mod (4::int) \<noteq> 2"}.
    6.99  The price to pay for this elegance is that we must discharge exclusiveness proof
   6.100  obligations, one for each pair of conditions
   6.101 -@{term "(n mod (4\<Colon>int) = i, n mod (4\<Colon>int) = j)"}
   6.102 +@{term "(n mod (4::int) = i, n mod (4::int) = j)"}
   6.103  with @{term "i < j"}. If we prefer not to discharge any obligations, we can
   6.104  enable the @{text "sequential"} option. This pushes the problem to the users of
   6.105  the generated properties.
   6.106 @@ -2649,7 +2649,7 @@
   6.107  (functorial action), $n$ set functions (natural transformations),
   6.108  and an infinite cardinal bound that satisfy certain properties.
   6.109  For example, @{typ "'a llist"} is a unary BNF.
   6.110 -Its relator @{text "llist_all2 \<Colon>
   6.111 +Its relator @{text "llist_all2 ::
   6.112    ('a \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow>
   6.113    'a llist \<Rightarrow> 'b llist \<Rightarrow> bool"}
   6.114  extends binary predicates over elements to binary predicates over parallel
   6.115 @@ -2680,7 +2680,7 @@
   6.116  set function, and relator.
   6.117  *}
   6.118  
   6.119 -    typedef ('d, 'a) fn = "UNIV \<Colon> ('d \<Rightarrow> 'a) set"
   6.120 +    typedef ('d, 'a) fn = "UNIV :: ('d \<Rightarrow> 'a) set"
   6.121        by simp
   6.122  
   6.123  text {* \blankline *}
   6.124 @@ -2723,22 +2723,22 @@
   6.125        show "set_fn \<circ> map_fn f = op ` f \<circ> set_fn"
   6.126          by transfer (auto simp add: comp_def)
   6.127      next
   6.128 -      show "card_order (natLeq +c |UNIV \<Colon> 'd set| )"
   6.129 +      show "card_order (natLeq +c |UNIV :: 'd set| )"
   6.130          apply (rule card_order_csum)
   6.131          apply (rule natLeq_card_order)
   6.132          by (rule card_of_card_order_on)
   6.133      next
   6.134 -      show "cinfinite (natLeq +c |UNIV \<Colon> 'd set| )"
   6.135 +      show "cinfinite (natLeq +c |UNIV :: 'd set| )"
   6.136          apply (rule cinfinite_csum)
   6.137          apply (rule disjI1)
   6.138          by (rule natLeq_cinfinite)
   6.139      next
   6.140        fix F :: "('d, 'a) fn"
   6.141 -      have "|set_fn F| \<le>o |UNIV \<Colon> 'd set|" (is "_ \<le>o ?U")
   6.142 +      have "|set_fn F| \<le>o |UNIV :: 'd set|" (is "_ \<le>o ?U")
   6.143          by transfer (rule card_of_image)
   6.144        also have "?U \<le>o natLeq +c ?U"
   6.145          by (rule ordLeq_csum2) (rule card_of_Card_order)
   6.146 -      finally show "|set_fn F| \<le>o natLeq +c |UNIV \<Colon> 'd set|" .
   6.147 +      finally show "|set_fn F| \<le>o natLeq +c |UNIV :: 'd set|" .
   6.148      next
   6.149        fix R :: "'a \<Rightarrow> 'b \<Rightarrow> bool" and S :: "'b \<Rightarrow> 'c \<Rightarrow> bool"
   6.150        show "rel_fn R OO rel_fn S \<le> rel_fn (R OO S)"
   6.151 @@ -3122,7 +3122,7 @@
   6.152  text {*
   6.153  For each datatype, the \hthm{size} plugin generates a generic size
   6.154  function @{text "t.size_t"} as well as a specific instance
   6.155 -@{text "size \<Colon> t \<Rightarrow> nat"} belonging to the @{text size} type
   6.156 +@{text "size :: t \<Rightarrow> nat"} belonging to the @{text size} type
   6.157  class. The \keyw{fun} command relies on @{const size} to prove termination of
   6.158  recursive functions on datatypes.
   6.159  
     7.1 --- a/src/Doc/Tutorial/Types/Axioms.thy	Tue Sep 01 17:25:36 2015 +0200
     7.2 +++ b/src/Doc/Tutorial/Types/Axioms.thy	Tue Sep 01 22:32:58 2015 +0200
     7.3 @@ -20,13 +20,13 @@
     7.4  
     7.5  text {* \noindent This @{command class} specification requires that
     7.6  all instances of @{class semigroup} obey @{fact "assoc:"}~@{prop
     7.7 -[source] "\<And>x y z \<Colon> 'a\<Colon>semigroup. (x \<oplus> y) \<oplus> z = x \<oplus> (y \<oplus> z)"}.
     7.8 +[source] "\<And>x y z :: 'a::semigroup. (x \<oplus> y) \<oplus> z = x \<oplus> (y \<oplus> z)"}.
     7.9  
    7.10  We can use this class axiom to derive further abstract theorems
    7.11  relative to class @{class semigroup}: *}
    7.12  
    7.13  lemma assoc_left:
    7.14 -  fixes x y z :: "'a\<Colon>semigroup"
    7.15 +  fixes x y z :: "'a::semigroup"
    7.16    shows "x \<oplus> (y \<oplus> z) = (x \<oplus> y) \<oplus> z"
    7.17    using assoc by (rule sym)
    7.18  
    7.19 @@ -63,7 +63,7 @@
    7.20  begin
    7.21  
    7.22  instance proof
    7.23 -  fix p\<^sub>1 p\<^sub>2 p\<^sub>3 :: "'a\<Colon>semigroup \<times> 'b\<Colon>semigroup"
    7.24 +  fix p\<^sub>1 p\<^sub>2 p\<^sub>3 :: "'a::semigroup \<times> 'b::semigroup"
    7.25    show "p\<^sub>1 \<oplus> p\<^sub>2 \<oplus> p\<^sub>3 = p\<^sub>1 \<oplus> (p\<^sub>2 \<oplus> p\<^sub>3)"
    7.26      by (cases p\<^sub>1, cases p\<^sub>2, cases p\<^sub>3) (simp add: assoc)
    7.27  
    7.28 @@ -96,7 +96,7 @@
    7.29  begin
    7.30  
    7.31  definition
    7.32 -  neutral_nat_def: "\<zero> = (0\<Colon>nat)"
    7.33 +  neutral_nat_def: "\<zero> = (0::nat)"
    7.34  
    7.35  instance proof
    7.36    fix n :: nat
    7.37 @@ -119,7 +119,7 @@
    7.38    neutral_prod_def: "\<zero> = (\<zero>, \<zero>)"
    7.39  
    7.40  instance proof
    7.41 -  fix p :: "'a\<Colon>monoidl \<times> 'b\<Colon>monoidl"
    7.42 +  fix p :: "'a::monoidl \<times> 'b::monoidl"
    7.43    show "\<zero> \<oplus> p = p"
    7.44      by (cases p) (simp add: neutral_prod_def neutl)
    7.45  qed
    7.46 @@ -149,7 +149,7 @@
    7.47  proofs relative to type classes: *}
    7.48  
    7.49  lemma left_cancel:
    7.50 -  fixes x y z :: "'a\<Colon>group"
    7.51 +  fixes x y z :: "'a::group"
    7.52    shows "x \<oplus> y = x \<oplus> z \<longleftrightarrow> y = z"
    7.53  proof
    7.54    assume "x \<oplus> y = x \<oplus> z"
    7.55 @@ -255,7 +255,7 @@
    7.56  
    7.57  Further note that classes may contain axioms but \emph{no} operations.
    7.58  An example is class @{class finite} from theory @{theory Finite_Set}
    7.59 -which specifies a type to be finite: @{lemma [source] "finite (UNIV \<Colon> 'a\<Colon>finite
    7.60 +which specifies a type to be finite: @{lemma [source] "finite (UNIV :: 'a::finite
    7.61  set)" by (fact finite_UNIV)}. *}
    7.62  
    7.63  (*<*)end(*>*)
     8.1 --- a/src/HOL/Bali/AxCompl.thy	Tue Sep 01 17:25:36 2015 +0200
     8.2 +++ b/src/HOL/Bali/AxCompl.thy	Tue Sep 01 22:32:58 2015 +0200
     8.3 @@ -859,7 +859,7 @@
     8.4    assumes wf: "wf_prog G" 
     8.5    and     mgf_c1: "G,A\<turnstile>{=:n} \<langle>c1\<rangle>\<^sub>s\<succ> {G\<rightarrow>}"
     8.6    and     mgf_c2: "G,A\<turnstile>{=:n} \<langle>c2\<rangle>\<^sub>s\<succ> {G\<rightarrow>}"
     8.7 -  shows "G,(A\<Colon>state triple set)\<turnstile>{=:n} \<langle>c1 Finally c2\<rangle>\<^sub>s\<succ> {G\<rightarrow>}"
     8.8 +  shows "G,(A::state triple set)\<turnstile>{=:n} \<langle>c1 Finally c2\<rangle>\<^sub>s\<succ> {G\<rightarrow>}"
     8.9  proof (rule MGFn_free_wt_da_NormalConformI [rule_format],clarsimp)
    8.10    fix T L accC C 
    8.11    assume wt: "\<lparr>prg=G,cls=accC,lcl=L\<rparr>\<turnstile>In1r (c1 Finally c2)\<Colon>T"
    8.12 @@ -956,7 +956,7 @@
    8.13    assumes wf: "wf_prog G"
    8.14    and     mgf_init: "G,A\<turnstile>{=:n} \<langle>Init D\<rangle>\<^sub>s\<succ> {G\<rightarrow>}"
    8.15    and     mgf_c: "G,A\<turnstile>{=:n} \<langle>c\<rangle>\<^sub>s\<succ> {G\<rightarrow>}"
    8.16 -  shows  "G,(A\<Colon>state triple set)\<turnstile>{=:n} \<langle>Body D c\<rangle>\<^sub>e\<succ> {G\<rightarrow>}"
    8.17 +  shows  "G,(A::state triple set)\<turnstile>{=:n} \<langle>Body D c\<rangle>\<^sub>e\<succ> {G\<rightarrow>}"
    8.18  proof (rule MGFn_free_wt_da_NormalConformI [rule_format],clarsimp)
    8.19    fix T L accC E
    8.20    assume wt: "\<lparr>prg=G, cls=accC,lcl=L\<rparr>\<turnstile>\<langle>Body D c\<rangle>\<^sub>e\<Colon>T"
     9.1 --- a/src/HOL/Basic_BNF_LFPs.thy	Tue Sep 01 17:25:36 2015 +0200
     9.2 +++ b/src/HOL/Basic_BNF_LFPs.thy	Tue Sep 01 22:32:58 2015 +0200
     9.3 @@ -94,7 +94,7 @@
     9.4  
     9.5  ML_file "~~/src/HOL/Tools/Old_Datatype/old_size.ML"
     9.6  
     9.7 -lemma size_bool[code]: "size (b\<Colon>bool) = 0"
     9.8 +lemma size_bool[code]: "size (b::bool) = 0"
     9.9    by (cases b) auto
    9.10  
    9.11  declare prod.size[no_atp]
    10.1 --- a/src/HOL/Binomial.thy	Tue Sep 01 17:25:36 2015 +0200
    10.2 +++ b/src/HOL/Binomial.thy	Tue Sep 01 22:32:58 2015 +0200
    10.3 @@ -448,7 +448,7 @@
    10.4    case False
    10.5    have *: "finite {1 .. n}" "0 \<notin> {1 .. n}" by auto
    10.6    have eq: "insert 0 {1 .. n} = {0..n}" by auto
    10.7 -  have **: "(\<Prod>n\<in>{1\<Colon>nat..n}. a + of_nat n) = (\<Prod>n\<in>{0\<Colon>nat..n - 1}. a + 1 + of_nat n)"
    10.8 +  have **: "(\<Prod>n\<in>{1::nat..n}. a + of_nat n) = (\<Prod>n\<in>{0::nat..n - 1}. a + 1 + of_nat n)"
    10.9      apply (rule setprod.reindex_cong [where l = Suc])
   10.10      using False
   10.11      apply (auto simp add: fun_eq_iff field_simps)
   10.12 @@ -564,7 +564,7 @@
   10.13  next
   10.14    case False
   10.15    from this setprod_constant[of "{0 .. n - 1}" "- (1:: 'a)"]
   10.16 -  have eq: "(- (1\<Colon>'a)) ^ n = setprod (\<lambda>i. - 1) {0 .. n - 1}"
   10.17 +  have eq: "(- (1::'a)) ^ n = setprod (\<lambda>i. - 1) {0 .. n - 1}"
   10.18      by auto
   10.19    from False show ?thesis
   10.20      by (simp add: pochhammer_def gbinomial_def field_simps
   10.21 @@ -687,7 +687,7 @@
   10.22                     (of_nat h * (\<Prod>i = 0..h. a - of_nat i) + 2 * (\<Prod>i = 0..h. a - of_nat i))"
   10.23      by (simp add: field_simps)
   10.24    also have "... = 
   10.25 -    ((a gchoose Suc h) * (fact (Suc h)) * of_nat (Suc k)) + (\<Prod>i\<in>{0\<Colon>nat..Suc h}. a - of_nat i)"
   10.26 +    ((a gchoose Suc h) * (fact (Suc h)) * of_nat (Suc k)) + (\<Prod>i\<in>{0::nat..Suc h}. a - of_nat i)"
   10.27      unfolding gbinomial_mult_fact'
   10.28      by (simp add: comm_semiring_class.distrib field_simps Suc)
   10.29    also have "\<dots> = (\<Prod>i\<in>{0..h}. a - of_nat i) * (a + 1)"
    11.1 --- a/src/HOL/Code_Evaluation.thy	Tue Sep 01 17:25:36 2015 +0200
    11.2 +++ b/src/HOL/Code_Evaluation.thy	Tue Sep 01 22:32:58 2015 +0200
    11.3 @@ -93,7 +93,7 @@
    11.4  begin
    11.5  
    11.6  definition
    11.7 -  "term_of (f \<Colon> 'a \<Rightarrow> 'b) =
    11.8 +  "term_of (f :: 'a \<Rightarrow> 'b) =
    11.9      Const (STR ''Pure.dummy_pattern'')
   11.10        (Typerep.Typerep (STR ''fun'') [Typerep.typerep TYPE('a), Typerep.typerep TYPE('b)])"
   11.11  
   11.12 @@ -119,8 +119,8 @@
   11.13    by (subst term_of_anything) rule 
   11.14    
   11.15  code_printing
   11.16 -  constant "term_of \<Colon> integer \<Rightarrow> term" \<rightharpoonup> (Eval) "HOLogic.mk'_number/ HOLogic.code'_integerT"
   11.17 -| constant "term_of \<Colon> String.literal \<Rightarrow> term" \<rightharpoonup> (Eval) "HOLogic.mk'_literal"
   11.18 +  constant "term_of :: integer \<Rightarrow> term" \<rightharpoonup> (Eval) "HOLogic.mk'_number/ HOLogic.code'_integerT"
   11.19 +| constant "term_of :: String.literal \<Rightarrow> term" \<rightharpoonup> (Eval) "HOLogic.mk'_literal"
   11.20  
   11.21  declare [[code drop: "term_of :: integer \<Rightarrow> _"]]
   11.22  
    12.1 --- a/src/HOL/Code_Numeral.thy	Tue Sep 01 17:25:36 2015 +0200
    12.2 +++ b/src/HOL/Code_Numeral.thy	Tue Sep 01 22:32:58 2015 +0200
    12.3 @@ -10,7 +10,7 @@
    12.4  
    12.5  subsection \<open>Type of target language integers\<close>
    12.6  
    12.7 -typedef integer = "UNIV \<Colon> int set"
    12.8 +typedef integer = "UNIV :: int set"
    12.9    morphisms int_of_integer integer_of_int ..
   12.10  
   12.11  setup_lifting type_definition_integer
   12.12 @@ -615,7 +615,7 @@
   12.13  
   12.14  subsection \<open>Type of target language naturals\<close>
   12.15  
   12.16 -typedef natural = "UNIV \<Colon> nat set"
   12.17 +typedef natural = "UNIV :: nat set"
   12.18    morphisms nat_of_natural natural_of_nat ..
   12.19  
   12.20  setup_lifting type_definition_natural
    13.1 --- a/src/HOL/Complex.thy	Tue Sep 01 17:25:36 2015 +0200
    13.2 +++ b/src/HOL/Complex.thy	Tue Sep 01 22:32:58 2015 +0200
    13.3 @@ -70,7 +70,7 @@
    13.4    "Re (inverse x) = Re x / ((Re x)\<^sup>2 + (Im x)\<^sup>2)"
    13.5  | "Im (inverse x) = - Im x / ((Re x)\<^sup>2 + (Im x)\<^sup>2)"
    13.6  
    13.7 -definition "x div (y\<Colon>complex) = x * inverse y"
    13.8 +definition "x div (y::complex) = x * inverse y"
    13.9  
   13.10  instance
   13.11    by intro_classes
    14.1 --- a/src/HOL/Datatype_Examples/Misc_Primcorec.thy	Tue Sep 01 17:25:36 2015 +0200
    14.2 +++ b/src/HOL/Datatype_Examples/Misc_Primcorec.thy	Tue Sep 01 22:32:58 2015 +0200
    14.3 @@ -30,7 +30,7 @@
    14.4        else if ys = MyNil then xs
    14.5        else MyCons (myhd xs) (myapp (mytl xs) ys))"
    14.6  
    14.7 -primcorec shuffle_sp :: "('a \<Colon> ord, 'b \<Colon> ord, 'c, 'd) some_passive \<Rightarrow> ('d, 'a, 'b, 'c) some_passive" where
    14.8 +primcorec shuffle_sp :: "('a :: ord, 'b :: ord, 'c, 'd) some_passive \<Rightarrow> ('d, 'a, 'b, 'c) some_passive" where
    14.9    "shuffle_sp sp =
   14.10       (case sp of
   14.11         SP1 sp' \<Rightarrow> SP1 (shuffle_sp sp')
   14.12 @@ -48,7 +48,7 @@
   14.13       | Let SL l \<Rightarrow> Let (fimage (map_prod f (rename_lam f)) SL) (rename_lam f l))"
   14.14  
   14.15  primcorec
   14.16 -  j1_sum :: "('a\<Colon>{zero,one,plus}) \<Rightarrow> 'a J1" and
   14.17 +  j1_sum :: "('a::{zero,one,plus}) \<Rightarrow> 'a J1" and
   14.18    j2_sum :: "'a \<Rightarrow> 'a J2"
   14.19  where
   14.20    "n = 0 \<Longrightarrow> is_J11 (j1_sum n)" |
    15.1 --- a/src/HOL/Datatype_Examples/Misc_Primrec.thy	Tue Sep 01 17:25:36 2015 +0200
    15.2 +++ b/src/HOL/Datatype_Examples/Misc_Primrec.thy	Tue Sep 01 22:32:58 2015 +0200
    15.3 @@ -35,7 +35,7 @@
    15.4    "myrev MyNil = MyNil" |
    15.5    "myrev (MyCons x xs) = myapp (myrev xs) (MyCons x MyNil)"
    15.6  
    15.7 -primrec shuffle_sp :: "('a \<Colon> ord, 'b \<Colon> ord, 'c, 'd) some_passive \<Rightarrow> ('d, 'a, 'b, 'c) some_passive" where
    15.8 +primrec shuffle_sp :: "('a :: ord, 'b :: ord, 'c, 'd) some_passive \<Rightarrow> ('d, 'a, 'b, 'c) some_passive" where
    15.9    "shuffle_sp (SP1 sp) = SP1 (shuffle_sp sp)" |
   15.10    "shuffle_sp (SP2 a) = SP3 a" |
   15.11    "shuffle_sp (SP3 b) = SP4 b" |
   15.12 @@ -54,7 +54,7 @@
   15.13    "rename_lam f (Let SL l) = Let (fimage (map_prod f (rename_lam f)) SL) (rename_lam f l)"
   15.14  
   15.15  primrec
   15.16 -  sum_i1 :: "('a\<Colon>{zero,plus}) I1 \<Rightarrow> 'a" and
   15.17 +  sum_i1 :: "('a::{zero,plus}) I1 \<Rightarrow> 'a" and
   15.18    sum_i2 :: "'a I2 \<Rightarrow> 'a"
   15.19  where
   15.20    "sum_i1 (I11 n i) = n + sum_i1 i" |
    16.1 --- a/src/HOL/Decision_Procs/MIR.thy	Tue Sep 01 17:25:36 2015 +0200
    16.2 +++ b/src/HOL/Decision_Procs/MIR.thy	Tue Sep 01 22:32:58 2015 +0200
    16.3 @@ -48,7 +48,7 @@
    16.4  
    16.5  (* The Divisibility relation between reals *)
    16.6  definition rdvd:: "real \<Rightarrow> real \<Rightarrow> bool" (infixl "rdvd" 50)
    16.7 -  where "x rdvd y \<longleftrightarrow> (\<exists>k\<Colon>int. y = x * real k)"
    16.8 +  where "x rdvd y \<longleftrightarrow> (\<exists>k::int. y = x * real k)"
    16.9  
   16.10  lemma int_rdvd_real: 
   16.11    "real (i::int) rdvd x = (i dvd (floor x) \<and> real (floor x) = x)" (is "?l = ?r")
   16.12 @@ -60,7 +60,7 @@
   16.13    hence "\<exists> k. floor x = i*k" by (simp only: real_of_int_inject)
   16.14    thus ?r  using th' by (simp add: dvd_def) 
   16.15  next
   16.16 -  assume "?r" hence "(i\<Colon>int) dvd \<lfloor>x\<Colon>real\<rfloor>" ..
   16.17 +  assume "?r" hence "(i::int) dvd \<lfloor>x::real\<rfloor>" ..
   16.18    hence "\<exists> k. real (floor x) = real (i*k)" 
   16.19      by (simp only: real_of_int_inject) (simp add: dvd_def)
   16.20    thus ?l using \<open>?r\<close> by (simp add: rdvd_def)
   16.21 @@ -2438,7 +2438,7 @@
   16.22      have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
   16.23      hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
   16.24        by simp
   16.25 -    hence "(real l * real x + real (l div c) * Inum (real x # bs) e < (0\<Colon>real)) =
   16.26 +    hence "(real l * real x + real (l div c) * Inum (real x # bs) e < (0::real)) =
   16.27            (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e < 0)"
   16.28        by simp
   16.29      also have "\<dots> = (real (l div c) * (real c * real x + Inum (real x # bs) e) < (real (l div c)) * 0)" by (simp add: algebra_simps)
   16.30 @@ -2456,7 +2456,7 @@
   16.31      have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
   16.32      hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
   16.33        by simp
   16.34 -    hence "(real l * real x + real (l div c) * Inum (real x # bs) e \<le> (0\<Colon>real)) =
   16.35 +    hence "(real l * real x + real (l div c) * Inum (real x # bs) e \<le> (0::real)) =
   16.36            (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e \<le> 0)"
   16.37        by simp
   16.38      also have "\<dots> = (real (l div c) * (real c * real x + Inum (real x # bs) e) \<le> (real (l div c)) * 0)" by (simp add: algebra_simps)
   16.39 @@ -2474,7 +2474,7 @@
   16.40      have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
   16.41      hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
   16.42        by simp
   16.43 -    hence "(real l * real x + real (l div c) * Inum (real x # bs) e > (0\<Colon>real)) =
   16.44 +    hence "(real l * real x + real (l div c) * Inum (real x # bs) e > (0::real)) =
   16.45            (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e > 0)"
   16.46        by simp
   16.47      also have "\<dots> = (real (l div c) * (real c * real x + Inum (real x # bs) e) > (real (l div c)) * 0)" by (simp add: algebra_simps)
   16.48 @@ -2492,7 +2492,7 @@
   16.49      have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
   16.50      hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
   16.51        by simp
   16.52 -    hence "(real l * real x + real (l div c) * Inum (real x # bs) e \<ge> (0\<Colon>real)) =
   16.53 +    hence "(real l * real x + real (l div c) * Inum (real x # bs) e \<ge> (0::real)) =
   16.54            (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e \<ge> 0)"
   16.55        by simp
   16.56      also have "\<dots> = (real (l div c) * (real c * real x + Inum (real x # bs) e) \<ge> (real (l div c)) * 0)" by (simp add: algebra_simps)
   16.57 @@ -2510,7 +2510,7 @@
   16.58      have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
   16.59      hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
   16.60        by simp
   16.61 -    hence "(real l * real x + real (l div c) * Inum (real x # bs) e = (0\<Colon>real)) =
   16.62 +    hence "(real l * real x + real (l div c) * Inum (real x # bs) e = (0::real)) =
   16.63            (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e = 0)"
   16.64        by simp
   16.65      also have "\<dots> = (real (l div c) * (real c * real x + Inum (real x # bs) e) = (real (l div c)) * 0)" by (simp add: algebra_simps)
   16.66 @@ -2528,7 +2528,7 @@
   16.67      have "c * (l div c) = c* (l div c) + l mod c" using d' dvd_eq_mod_eq_0[of "c" "l"] by simp
   16.68      hence cl:"c * (l div c) =l" using zmod_zdiv_equality[where a="l" and b="c", symmetric] 
   16.69        by simp
   16.70 -    hence "(real l * real x + real (l div c) * Inum (real x # bs) e \<noteq> (0\<Colon>real)) =
   16.71 +    hence "(real l * real x + real (l div c) * Inum (real x # bs) e \<noteq> (0::real)) =
   16.72            (real (c * (l div c)) * real x + real (l div c) * Inum (real x # bs) e \<noteq> 0)"
   16.73        by simp
   16.74      also have "\<dots> = (real (l div c) * (real c * real x + Inum (real x # bs) e) \<noteq> (real (l div c)) * 0)" by (simp add: algebra_simps)
   16.75 @@ -3431,7 +3431,7 @@
   16.76          and n0: "n = 0" 
   16.77          and s_def: "s = (Add (Floor s') (C j))" 
   16.78          and jp: "0 \<le> j" and jn: "j \<le> n'"
   16.79 -      from 5 pns have H:"(Ifm ((x\<Colon>real) # (bs\<Colon>real list)) p' \<longrightarrow>
   16.80 +      from 5 pns have H:"(Ifm ((x::real) # (bs::real list)) p' \<longrightarrow>
   16.81            Inum (x # bs) a = Inum (x # bs) (CN 0 n' s')) \<and>
   16.82            numbound0 s' \<and> isrlfm p'" by blast
   16.83        hence nb: "numbound0 s'" by simp
   16.84 @@ -3457,7 +3457,7 @@
   16.85          and n0: "n = 0" 
   16.86          and s_def: "s = (Add (Floor s') (C j))" 
   16.87          and jp: "n' \<le> j" and jn: "j \<le> 0"
   16.88 -      from 5 pns have H:"(Ifm ((x\<Colon>real) # (bs\<Colon>real list)) p' \<longrightarrow>
   16.89 +      from 5 pns have H:"(Ifm ((x::real) # (bs::real list)) p' \<longrightarrow>
   16.90            Inum (x # bs) a = Inum (x # bs) (CN 0 n' s')) \<and>
   16.91            numbound0 s' \<and> isrlfm p'" by blast
   16.92        hence nb: "numbound0 s'" by simp
    17.1 --- a/src/HOL/Divides.thy	Tue Sep 01 17:25:36 2015 +0200
    17.2 +++ b/src/HOL/Divides.thy	Tue Sep 01 22:32:58 2015 +0200
    17.3 @@ -814,8 +814,8 @@
    17.4  text \<open>
    17.5    We define @{const divide} and @{const mod} on @{typ nat} by means
    17.6    of a characteristic relation with two input arguments
    17.7 -  @{term "m\<Colon>nat"}, @{term "n\<Colon>nat"} and two output arguments
    17.8 -  @{term "q\<Colon>nat"}(uotient) and @{term "r\<Colon>nat"}(emainder).
    17.9 +  @{term "m::nat"}, @{term "n::nat"} and two output arguments
   17.10 +  @{term "q::nat"}(uotient) and @{term "r::nat"}(emainder).
   17.11  \<close>
   17.12  
   17.13  definition divmod_nat_rel :: "nat \<Rightarrow> nat \<Rightarrow> nat \<times> nat \<Rightarrow> bool" where
   17.14 @@ -835,7 +835,7 @@
   17.15    have "\<exists>q r. m = q * n + r \<and> r < n"
   17.16    proof (induct m)
   17.17      case 0 with \<open>n \<noteq> 0\<close>
   17.18 -    have "(0\<Colon>nat) = 0 * n + 0 \<and> 0 < n" by simp
   17.19 +    have "(0::nat) = 0 * n + 0 \<and> 0 < n" by simp
   17.20      then show ?case by blast
   17.21    next
   17.22      case (Suc m) then obtain q' r'
   17.23 @@ -868,7 +868,7 @@
   17.24        (simp add: divmod_nat_rel_def)
   17.25  next
   17.26    case False
   17.27 -  have aux: "\<And>q r q' r'. q' * n + r' = q * n + r \<Longrightarrow> r < n \<Longrightarrow> q' \<le> (q\<Colon>nat)"
   17.28 +  have aux: "\<And>q r q' r'. q' * n + r' = q * n + r \<Longrightarrow> r < n \<Longrightarrow> q' \<le> (q::nat)"
   17.29    apply (rule leI)
   17.30    apply (subst less_iff_Suc_add)
   17.31    apply (auto simp add: add_mult_distrib)
   17.32 @@ -1115,10 +1115,10 @@
   17.33    then show "m div n * n + m mod n \<le> m" by auto
   17.34  qed
   17.35  
   17.36 -lemma mod_geq: "\<not> m < (n\<Colon>nat) \<Longrightarrow> m mod n = (m - n) mod n"
   17.37 +lemma mod_geq: "\<not> m < (n::nat) \<Longrightarrow> m mod n = (m - n) mod n"
   17.38  by (simp add: le_mod_geq linorder_not_less)
   17.39  
   17.40 -lemma mod_if: "m mod (n\<Colon>nat) = (if m < n then m else (m - n) mod n)"
   17.41 +lemma mod_if: "m mod (n::nat) = (if m < n then m else (m - n) mod n)"
   17.42  by (simp add: le_mod_geq)
   17.43  
   17.44  lemma mod_1 [simp]: "m mod Suc 0 = 0"
   17.45 @@ -1313,7 +1313,7 @@
   17.46  
   17.47  lemma split_div_lemma:
   17.48    assumes "0 < n"
   17.49 -  shows "n * q \<le> m \<and> m < n * Suc q \<longleftrightarrow> q = ((m\<Colon>nat) div n)" (is "?lhs \<longleftrightarrow> ?rhs")
   17.50 +  shows "n * q \<le> m \<and> m < n * Suc q \<longleftrightarrow> q = ((m::nat) div n)" (is "?lhs \<longleftrightarrow> ?rhs")
   17.51  proof
   17.52    assume ?rhs
   17.53    with mult_div_cancel have nq: "n * q = m - (m mod n)" by simp
   17.54 @@ -1486,7 +1486,7 @@
   17.55  lemma add_self_div_2 [simp]: "(m + m) div 2 = (m::nat)"
   17.56  by (simp add: mult_2 [symmetric])
   17.57  
   17.58 -lemma mod2_gr_0 [simp]: "0 < (m\<Colon>nat) mod 2 \<longleftrightarrow> m mod 2 = 1"
   17.59 +lemma mod2_gr_0 [simp]: "0 < (m::nat) mod 2 \<longleftrightarrow> m mod 2 = 1"
   17.60  proof -
   17.61    { fix n :: nat have  "(n::nat) < 2 \<Longrightarrow> n = 0 \<or> n = 1" by (cases n) simp_all }
   17.62    moreover have "m mod 2 < 2" by simp
   17.63 @@ -1999,7 +1999,7 @@
   17.64  lemmas zmod_eq_0D [dest!] = zmod_eq_0_iff [THEN iffD1]
   17.65  
   17.66  lemma zmod_zdiv_equality' [nitpick_unfold]:
   17.67 -  "(m\<Colon>int) mod n = m - (m div n) * n"
   17.68 +  "(m::int) mod n = m - (m div n) * n"
   17.69    using mod_div_equality [of m n] by arith
   17.70  
   17.71  
    18.1 --- a/src/HOL/Enum.thy	Tue Sep 01 17:25:36 2015 +0200
    18.2 +++ b/src/HOL/Enum.thy	Tue Sep 01 22:32:58 2015 +0200
    18.3 @@ -144,7 +144,7 @@
    18.4    by (fact equal_refl)
    18.5  
    18.6  lemma order_fun [code]:
    18.7 -  fixes f g :: "'a\<Colon>enum \<Rightarrow> 'b\<Colon>order"
    18.8 +  fixes f g :: "'a::enum \<Rightarrow> 'b::order"
    18.9    shows "f \<le> g \<longleftrightarrow> enum_all (\<lambda>x. f x \<le> g x)"
   18.10      and "f < g \<longleftrightarrow> f \<le> g \<and> enum_ex (\<lambda>x. f x \<noteq> g x)"
   18.11    by (simp_all add: fun_eq_iff le_fun_def order_less_le)
   18.12 @@ -244,32 +244,32 @@
   18.13  subsection \<open>Default instances for @{class enum}\<close>
   18.14  
   18.15  lemma map_of_zip_enum_is_Some:
   18.16 -  assumes "length ys = length (enum \<Colon> 'a\<Colon>enum list)"
   18.17 -  shows "\<exists>y. map_of (zip (enum \<Colon> 'a\<Colon>enum list) ys) x = Some y"
   18.18 +  assumes "length ys = length (enum :: 'a::enum list)"
   18.19 +  shows "\<exists>y. map_of (zip (enum :: 'a::enum list) ys) x = Some y"
   18.20  proof -
   18.21 -  from assms have "x \<in> set (enum \<Colon> 'a\<Colon>enum list) \<longleftrightarrow>
   18.22 -    (\<exists>y. map_of (zip (enum \<Colon> 'a\<Colon>enum list) ys) x = Some y)"
   18.23 +  from assms have "x \<in> set (enum :: 'a::enum list) \<longleftrightarrow>
   18.24 +    (\<exists>y. map_of (zip (enum :: 'a::enum list) ys) x = Some y)"
   18.25      by (auto intro!: map_of_zip_is_Some)
   18.26    then show ?thesis using enum_UNIV by auto
   18.27  qed
   18.28  
   18.29  lemma map_of_zip_enum_inject:
   18.30 -  fixes xs ys :: "'b\<Colon>enum list"
   18.31 -  assumes length: "length xs = length (enum \<Colon> 'a\<Colon>enum list)"
   18.32 -      "length ys = length (enum \<Colon> 'a\<Colon>enum list)"
   18.33 -    and map_of: "the \<circ> map_of (zip (enum \<Colon> 'a\<Colon>enum list) xs) = the \<circ> map_of (zip (enum \<Colon> 'a\<Colon>enum list) ys)"
   18.34 +  fixes xs ys :: "'b::enum list"
   18.35 +  assumes length: "length xs = length (enum :: 'a::enum list)"
   18.36 +      "length ys = length (enum :: 'a::enum list)"
   18.37 +    and map_of: "the \<circ> map_of (zip (enum :: 'a::enum list) xs) = the \<circ> map_of (zip (enum :: 'a::enum list) ys)"
   18.38    shows "xs = ys"
   18.39  proof -
   18.40 -  have "map_of (zip (enum \<Colon> 'a list) xs) = map_of (zip (enum \<Colon> 'a list) ys)"
   18.41 +  have "map_of (zip (enum :: 'a list) xs) = map_of (zip (enum :: 'a list) ys)"
   18.42    proof
   18.43      fix x :: 'a
   18.44      from length map_of_zip_enum_is_Some obtain y1 y2
   18.45 -      where "map_of (zip (enum \<Colon> 'a list) xs) x = Some y1"
   18.46 -        and "map_of (zip (enum \<Colon> 'a list) ys) x = Some y2" by blast
   18.47 +      where "map_of (zip (enum :: 'a list) xs) x = Some y1"
   18.48 +        and "map_of (zip (enum :: 'a list) ys) x = Some y2" by blast
   18.49      moreover from map_of
   18.50 -      have "the (map_of (zip (enum \<Colon> 'a\<Colon>enum list) xs) x) = the (map_of (zip (enum \<Colon> 'a\<Colon>enum list) ys) x)"
   18.51 +      have "the (map_of (zip (enum :: 'a::enum list) xs) x) = the (map_of (zip (enum :: 'a::enum list) ys) x)"
   18.52        by (auto dest: fun_cong)
   18.53 -    ultimately show "map_of (zip (enum \<Colon> 'a\<Colon>enum list) xs) x = map_of (zip (enum \<Colon> 'a\<Colon>enum list) ys) x"
   18.54 +    ultimately show "map_of (zip (enum :: 'a::enum list) xs) x = map_of (zip (enum :: 'a::enum list) ys) x"
   18.55        by simp
   18.56    qed
   18.57    with length enum_distinct show "xs = ys" by (rule map_of_zip_inject)
   18.58 @@ -297,7 +297,7 @@
   18.59  begin
   18.60  
   18.61  definition
   18.62 -  "enum = map (\<lambda>ys. the o map_of (zip (enum\<Colon>'a list) ys)) (List.n_lists (length (enum\<Colon>'a\<Colon>enum list)) enum)"
   18.63 +  "enum = map (\<lambda>ys. the o map_of (zip (enum::'a list) ys)) (List.n_lists (length (enum::'a::enum list)) enum)"
   18.64  
   18.65  definition
   18.66    "enum_all P = all_n_lists (\<lambda>bs. P (the o map_of (zip enum bs))) (length (enum :: 'a list))"
   18.67 @@ -306,17 +306,17 @@
   18.68    "enum_ex P = ex_n_lists (\<lambda>bs. P (the o map_of (zip enum bs))) (length (enum :: 'a list))"
   18.69  
   18.70  instance proof
   18.71 -  show "UNIV = set (enum \<Colon> ('a \<Rightarrow> 'b) list)"
   18.72 +  show "UNIV = set (enum :: ('a \<Rightarrow> 'b) list)"
   18.73    proof (rule UNIV_eq_I)
   18.74      fix f :: "'a \<Rightarrow> 'b"
   18.75 -    have "f = the \<circ> map_of (zip (enum \<Colon> 'a\<Colon>enum list) (map f enum))"
   18.76 +    have "f = the \<circ> map_of (zip (enum :: 'a::enum list) (map f enum))"
   18.77        by (auto simp add: map_of_zip_map fun_eq_iff intro: in_enum)
   18.78      then show "f \<in> set enum"
   18.79        by (auto simp add: enum_fun_def set_n_lists intro: in_enum)
   18.80    qed
   18.81  next
   18.82    from map_of_zip_enum_inject
   18.83 -  show "distinct (enum \<Colon> ('a \<Rightarrow> 'b) list)"
   18.84 +  show "distinct (enum :: ('a \<Rightarrow> 'b) list)"
   18.85      by (auto intro!: inj_onI simp add: enum_fun_def
   18.86        distinct_map distinct_n_lists enum_distinct set_n_lists)
   18.87  next
   18.88 @@ -327,7 +327,7 @@
   18.89      show "Ball UNIV P"
   18.90      proof
   18.91        fix f :: "'a \<Rightarrow> 'b"
   18.92 -      have f: "f = the \<circ> map_of (zip (enum \<Colon> 'a\<Colon>enum list) (map f enum))"
   18.93 +      have f: "f = the \<circ> map_of (zip (enum :: 'a::enum list) (map f enum))"
   18.94          by (auto simp add: map_of_zip_map fun_eq_iff intro: in_enum)
   18.95        from \<open>enum_all P\<close> have "P (the \<circ> map_of (zip enum (map f enum)))"
   18.96          unfolding enum_all_fun_def all_n_lists_def
   18.97 @@ -352,9 +352,9 @@
   18.98    next
   18.99      assume "Bex UNIV P"
  18.100      from this obtain f where "P f" ..
  18.101 -    have f: "f = the \<circ> map_of (zip (enum \<Colon> 'a\<Colon>enum list) (map f enum))"
  18.102 +    have f: "f = the \<circ> map_of (zip (enum :: 'a::enum list) (map f enum))"
  18.103        by (auto simp add: map_of_zip_map fun_eq_iff intro: in_enum) 
  18.104 -    from \<open>P f\<close> this have "P (the \<circ> map_of (zip (enum \<Colon> 'a\<Colon>enum list) (map f enum)))"
  18.105 +    from \<open>P f\<close> this have "P (the \<circ> map_of (zip (enum :: 'a::enum list) (map f enum)))"
  18.106        by auto
  18.107      from  this show "enum_ex P"
  18.108        unfolding enum_ex_fun_def ex_n_lists_def
  18.109 @@ -367,7 +367,7 @@
  18.110  
  18.111  end
  18.112  
  18.113 -lemma enum_fun_code [code]: "enum = (let enum_a = (enum \<Colon> 'a\<Colon>{enum, equal} list)
  18.114 +lemma enum_fun_code [code]: "enum = (let enum_a = (enum :: 'a::{enum, equal} list)
  18.115    in map (\<lambda>ys. the o map_of (zip enum_a ys)) (List.n_lists (length enum_a) enum))"
  18.116    by (simp add: enum_fun_def Let_def)
  18.117  
    19.1 --- a/src/HOL/Fields.thy	Tue Sep 01 17:25:36 2015 +0200
    19.2 +++ b/src/HOL/Fields.thy	Tue Sep 01 22:32:58 2015 +0200
    19.3 @@ -1161,7 +1161,7 @@
    19.4      unfolding le_divide_eq if_P[OF \<open>0 < x\<close>] by simp
    19.5  next
    19.6    assume "\<not>0 < x" hence "x \<le> 0" by simp
    19.7 -  obtain s::'a where s: "0 < s" "s < 1" using dense[of 0 "1\<Colon>'a"] by auto
    19.8 +  obtain s::'a where s: "0 < s" "s < 1" using dense[of 0 "1::'a"] by auto
    19.9    hence "x \<le> s * x" using mult_le_cancel_right[of 1 x s] \<open>x \<le> 0\<close> by auto
   19.10    also note *[OF s]
   19.11    finally show ?thesis .
    20.1 --- a/src/HOL/Finite_Set.thy	Tue Sep 01 17:25:36 2015 +0200
    20.2 +++ b/src/HOL/Finite_Set.thy	Tue Sep 01 22:32:58 2015 +0200
    20.3 @@ -561,13 +561,13 @@
    20.4  subsection \<open>Class @{text finite}\<close>
    20.5  
    20.6  class finite =
    20.7 -  assumes finite_UNIV: "finite (UNIV \<Colon> 'a set)"
    20.8 +  assumes finite_UNIV: "finite (UNIV :: 'a set)"
    20.9  begin
   20.10  
   20.11 -lemma finite [simp]: "finite (A \<Colon> 'a set)"
   20.12 +lemma finite [simp]: "finite (A :: 'a set)"
   20.13    by (rule subset_UNIV finite_UNIV finite_subset)+
   20.14  
   20.15 -lemma finite_code [code]: "finite (A \<Colon> 'a set) \<longleftrightarrow> True"
   20.16 +lemma finite_code [code]: "finite (A :: 'a set) \<longleftrightarrow> True"
   20.17    by simp
   20.18  
   20.19  end
    21.1 --- a/src/HOL/Groups.thy	Tue Sep 01 17:25:36 2015 +0200
    21.2 +++ b/src/HOL/Groups.thy	Tue Sep 01 22:32:58 2015 +0200
    21.3 @@ -1392,7 +1392,7 @@
    21.4  subsection \<open>Tools setup\<close>
    21.5  
    21.6  lemma add_mono_thms_linordered_semiring:
    21.7 -  fixes i j k :: "'a\<Colon>ordered_ab_semigroup_add"
    21.8 +  fixes i j k :: "'a::ordered_ab_semigroup_add"
    21.9    shows "i \<le> j \<and> k \<le> l \<Longrightarrow> i + k \<le> j + l"
   21.10      and "i = j \<and> k \<le> l \<Longrightarrow> i + k \<le> j + l"
   21.11      and "i \<le> j \<and> k = l \<Longrightarrow> i + k \<le> j + l"
   21.12 @@ -1400,7 +1400,7 @@
   21.13  by (rule add_mono, clarify+)+
   21.14  
   21.15  lemma add_mono_thms_linordered_field:
   21.16 -  fixes i j k :: "'a\<Colon>ordered_cancel_ab_semigroup_add"
   21.17 +  fixes i j k :: "'a::ordered_cancel_ab_semigroup_add"
   21.18    shows "i < j \<and> k = l \<Longrightarrow> i + k < j + l"
   21.19      and "i = j \<and> k < l \<Longrightarrow> i + k < j + l"
   21.20      and "i < j \<and> k \<le> l \<Longrightarrow> i + k < j + l"
    22.1 --- a/src/HOL/HOL.thy	Tue Sep 01 17:25:36 2015 +0200
    22.2 +++ b/src/HOL/HOL.thy	Tue Sep 01 22:32:58 2015 +0200
    22.3 @@ -1792,7 +1792,7 @@
    22.4    "equal TYPE('a) TYPE('a) \<longleftrightarrow> True"
    22.5    by (simp add: equal)
    22.6  
    22.7 -setup \<open>Sign.add_const_constraint (@{const_name equal}, SOME @{typ "'a\<Colon>type \<Rightarrow> 'a \<Rightarrow> bool"})\<close>
    22.8 +setup \<open>Sign.add_const_constraint (@{const_name equal}, SOME @{typ "'a::type \<Rightarrow> 'a \<Rightarrow> bool"})\<close>
    22.9  
   22.10  lemma equal_alias_cert: "OFCLASS('a, equal_class) \<equiv> ((op = :: 'a \<Rightarrow> 'a \<Rightarrow> bool) \<equiv> equal)" (is "?ofclass \<equiv> ?equal")
   22.11  proof
   22.12 @@ -1806,7 +1806,7 @@
   22.13    qed (simp add: \<open>PROP ?equal\<close>)
   22.14  qed
   22.15  
   22.16 -setup \<open>Sign.add_const_constraint (@{const_name equal}, SOME @{typ "'a\<Colon>equal \<Rightarrow> 'a \<Rightarrow> bool"})\<close>
   22.17 +setup \<open>Sign.add_const_constraint (@{const_name equal}, SOME @{typ "'a::equal \<Rightarrow> 'a \<Rightarrow> bool"})\<close>
   22.18  
   22.19  setup \<open>Nbe.add_const_alias @{thm equal_alias_cert}\<close>
   22.20  
    23.1 --- a/src/HOL/HOLCF/Lift.thy	Tue Sep 01 17:25:36 2015 +0200
    23.2 +++ b/src/HOL/HOLCF/Lift.thy	Tue Sep 01 22:32:58 2015 +0200
    23.3 @@ -29,7 +29,7 @@
    23.4  apply (simp add: Def_def)
    23.5  done
    23.6  
    23.7 -old_rep_datatype "\<bottom>\<Colon>'a lift" Def
    23.8 +old_rep_datatype "\<bottom>::'a lift" Def
    23.9    by (erule lift_induct) (simp_all add: Def_def Abs_lift_inject inst_lift_pcpo)
   23.10  
   23.11  text {* @{term bottom} and @{term Def} *}
    24.1 --- a/src/HOL/Hahn_Banach/Linearform.thy	Tue Sep 01 17:25:36 2015 +0200
    24.2 +++ b/src/HOL/Hahn_Banach/Linearform.thy	Tue Sep 01 22:32:58 2015 +0200
    24.3 @@ -14,7 +14,7 @@
    24.4  \<close>
    24.5  
    24.6  locale linearform =
    24.7 -  fixes V :: "'a\<Colon>{minus, plus, zero, uminus} set" and f
    24.8 +  fixes V :: "'a::{minus, plus, zero, uminus} set" and f
    24.9    assumes add [iff]: "x \<in> V \<Longrightarrow> y \<in> V \<Longrightarrow> f (x + y) = f x + f y"
   24.10      and mult [iff]: "x \<in> V \<Longrightarrow> f (a \<cdot> x) = a * f x"
   24.11  
    25.1 --- a/src/HOL/Hahn_Banach/Normed_Space.thy	Tue Sep 01 17:25:36 2015 +0200
    25.2 +++ b/src/HOL/Hahn_Banach/Normed_Space.thy	Tue Sep 01 22:32:58 2015 +0200
    25.3 @@ -17,7 +17,7 @@
    25.4  \<close>
    25.5  
    25.6  locale seminorm =
    25.7 -  fixes V :: "'a\<Colon>{minus, plus, zero, uminus} set"
    25.8 +  fixes V :: "'a::{minus, plus, zero, uminus} set"
    25.9    fixes norm :: "'a \<Rightarrow> real"    ("\<parallel>_\<parallel>")
   25.10    assumes ge_zero [iff?]: "x \<in> V \<Longrightarrow> 0 \<le> \<parallel>x\<parallel>"
   25.11      and abs_homogenous [iff?]: "x \<in> V \<Longrightarrow> \<parallel>a \<cdot> x\<parallel> = \<bar>a\<bar> * \<parallel>x\<parallel>"
    26.1 --- a/src/HOL/Hahn_Banach/Subspace.thy	Tue Sep 01 17:25:36 2015 +0200
    26.2 +++ b/src/HOL/Hahn_Banach/Subspace.thy	Tue Sep 01 22:32:58 2015 +0200
    26.3 @@ -17,7 +17,7 @@
    26.4  \<close>
    26.5  
    26.6  locale subspace =
    26.7 -  fixes U :: "'a\<Colon>{minus, plus, zero, uminus} set" and V
    26.8 +  fixes U :: "'a::{minus, plus, zero, uminus} set" and V
    26.9    assumes non_empty [iff, intro]: "U \<noteq> {}"
   26.10      and subset [iff]: "U \<subseteq> V"
   26.11      and add_closed [iff]: "x \<in> U \<Longrightarrow> y \<in> U \<Longrightarrow> x + y \<in> U"
    27.1 --- a/src/HOL/Hilbert_Choice.thy	Tue Sep 01 17:25:36 2015 +0200
    27.2 +++ b/src/HOL/Hilbert_Choice.thy	Tue Sep 01 22:32:58 2015 +0200
    27.3 @@ -287,7 +287,7 @@
    27.4    proof (rule UNIV_eq_I)
    27.5      fix x :: 'a
    27.6      from b1b2 have "x = inv (\<lambda>y. if y = x then b1 else b2) b1" by (simp add: inv_into_def)
    27.7 -    thus "x \<in> range (\<lambda>f\<Colon>'a \<Rightarrow> 'b. inv f b1)" by blast
    27.8 +    thus "x \<in> range (\<lambda>f::'a \<Rightarrow> 'b. inv f b1)" by blast
    27.9    qed
   27.10    ultimately show "finite (UNIV :: 'a set)" by simp
   27.11  qed
    28.1 --- a/src/HOL/IMP/Abs_Int_ITP/Abs_Int3_ITP.thy	Tue Sep 01 17:25:36 2015 +0200
    28.2 +++ b/src/HOL/IMP/Abs_Int_ITP/Abs_Int3_ITP.thy	Tue Sep 01 22:32:58 2015 +0200
    28.3 @@ -494,7 +494,7 @@
    28.4  
    28.5  definition "m_c m c = (let as = annos c in \<Sum>i=0..<size as. m(as!i))"
    28.6  
    28.7 -lemma measure_m_c: "finite X \<Longrightarrow> {(c, c \<nabla>\<^sub>c c') |c c'\<Colon>ivl st option acom.
    28.8 +lemma measure_m_c: "finite X \<Longrightarrow> {(c, c \<nabla>\<^sub>c c') |c c'::ivl st option acom.
    28.9       strip c' = strip c \<and> c : Com X \<and> c' : Com X \<and> \<not> c' \<sqsubseteq> c}\<inverse>
   28.10      \<subseteq> measure(m_c(m_o (m_st m_ivl) (2*card(X))))"
   28.11  apply(auto simp: m_c_def Let_def Com_def)
    29.1 --- a/src/HOL/Imperative_HOL/Array.thy	Tue Sep 01 17:25:36 2015 +0200
    29.2 +++ b/src/HOL/Imperative_HOL/Array.thy	Tue Sep 01 22:32:58 2015 +0200
    29.3 @@ -10,63 +10,63 @@
    29.4  
    29.5  subsection {* Primitives *}
    29.6  
    29.7 -definition present :: "heap \<Rightarrow> 'a\<Colon>heap array \<Rightarrow> bool" where
    29.8 +definition present :: "heap \<Rightarrow> 'a::heap array \<Rightarrow> bool" where
    29.9    "present h a \<longleftrightarrow> addr_of_array a < lim h"
   29.10  
   29.11 -definition get :: "heap \<Rightarrow> 'a\<Colon>heap array \<Rightarrow> 'a list" where
   29.12 +definition get :: "heap \<Rightarrow> 'a::heap array \<Rightarrow> 'a list" where
   29.13    "get h a = map from_nat (arrays h (TYPEREP('a)) (addr_of_array a))"
   29.14  
   29.15 -definition set :: "'a\<Colon>heap array \<Rightarrow> 'a list \<Rightarrow> heap \<Rightarrow> heap" where
   29.16 +definition set :: "'a::heap array \<Rightarrow> 'a list \<Rightarrow> heap \<Rightarrow> heap" where
   29.17    "set a x = arrays_update (\<lambda>h. h(TYPEREP('a) := ((h(TYPEREP('a))) (addr_of_array a:=map to_nat x))))"
   29.18  
   29.19 -definition alloc :: "'a list \<Rightarrow> heap \<Rightarrow> 'a\<Colon>heap array \<times> heap" where
   29.20 +definition alloc :: "'a list \<Rightarrow> heap \<Rightarrow> 'a::heap array \<times> heap" where
   29.21    "alloc xs h = (let
   29.22       l = lim h;
   29.23       r = Array l;
   29.24       h'' = set r xs (h\<lparr>lim := l + 1\<rparr>)
   29.25     in (r, h''))"
   29.26  
   29.27 -definition length :: "heap \<Rightarrow> 'a\<Colon>heap array \<Rightarrow> nat" where
   29.28 +definition length :: "heap \<Rightarrow> 'a::heap array \<Rightarrow> nat" where
   29.29    "length h a = List.length (get h a)"
   29.30    
   29.31 -definition update :: "'a\<Colon>heap array \<Rightarrow> nat \<Rightarrow> 'a \<Rightarrow> heap \<Rightarrow> heap" where
   29.32 +definition update :: "'a::heap array \<Rightarrow> nat \<Rightarrow> 'a \<Rightarrow> heap \<Rightarrow> heap" where
   29.33    "update a i x h = set a ((get h a)[i:=x]) h"
   29.34  
   29.35 -definition noteq :: "'a\<Colon>heap array \<Rightarrow> 'b\<Colon>heap array \<Rightarrow> bool" (infix "=!!=" 70) where
   29.36 +definition noteq :: "'a::heap array \<Rightarrow> 'b::heap array \<Rightarrow> bool" (infix "=!!=" 70) where
   29.37    "r =!!= s \<longleftrightarrow> TYPEREP('a) \<noteq> TYPEREP('b) \<or> addr_of_array r \<noteq> addr_of_array s"
   29.38  
   29.39  
   29.40  subsection {* Monad operations *}
   29.41  
   29.42 -definition new :: "nat \<Rightarrow> 'a\<Colon>heap \<Rightarrow> 'a array Heap" where
   29.43 +definition new :: "nat \<Rightarrow> 'a::heap \<Rightarrow> 'a array Heap" where
   29.44    [code del]: "new n x = Heap_Monad.heap (alloc (replicate n x))"
   29.45  
   29.46 -definition of_list :: "'a\<Colon>heap list \<Rightarrow> 'a array Heap" where
   29.47 +definition of_list :: "'a::heap list \<Rightarrow> 'a array Heap" where
   29.48    [code del]: "of_list xs = Heap_Monad.heap (alloc xs)"
   29.49  
   29.50 -definition make :: "nat \<Rightarrow> (nat \<Rightarrow> 'a\<Colon>heap) \<Rightarrow> 'a array Heap" where
   29.51 +definition make :: "nat \<Rightarrow> (nat \<Rightarrow> 'a::heap) \<Rightarrow> 'a array Heap" where
   29.52    [code del]: "make n f = Heap_Monad.heap (alloc (map f [0 ..< n]))"
   29.53  
   29.54 -definition len :: "'a\<Colon>heap array \<Rightarrow> nat Heap" where
   29.55 +definition len :: "'a::heap array \<Rightarrow> nat Heap" where
   29.56    [code del]: "len a = Heap_Monad.tap (\<lambda>h. length h a)"
   29.57  
   29.58 -definition nth :: "'a\<Colon>heap array \<Rightarrow> nat \<Rightarrow> 'a Heap" where
   29.59 +definition nth :: "'a::heap array \<Rightarrow> nat \<Rightarrow> 'a Heap" where
   29.60    [code del]: "nth a i = Heap_Monad.guard (\<lambda>h. i < length h a)
   29.61      (\<lambda>h. (get h a ! i, h))"
   29.62  
   29.63 -definition upd :: "nat \<Rightarrow> 'a \<Rightarrow> 'a\<Colon>heap array \<Rightarrow> 'a\<Colon>heap array Heap" where
   29.64 +definition upd :: "nat \<Rightarrow> 'a \<Rightarrow> 'a::heap array \<Rightarrow> 'a::heap array Heap" where
   29.65    [code del]: "upd i x a = Heap_Monad.guard (\<lambda>h. i < length h a)
   29.66      (\<lambda>h. (a, update a i x h))"
   29.67  
   29.68 -definition map_entry :: "nat \<Rightarrow> ('a\<Colon>heap \<Rightarrow> 'a) \<Rightarrow> 'a array \<Rightarrow> 'a array Heap" where
   29.69 +definition map_entry :: "nat \<Rightarrow> ('a::heap \<Rightarrow> 'a) \<Rightarrow> 'a array \<Rightarrow> 'a array Heap" where
   29.70    [code del]: "map_entry i f a = Heap_Monad.guard (\<lambda>h. i < length h a)
   29.71      (\<lambda>h. (a, update a i (f (get h a ! i)) h))"
   29.72  
   29.73 -definition swap :: "nat \<Rightarrow> 'a \<Rightarrow> 'a\<Colon>heap array \<Rightarrow> 'a Heap" where
   29.74 +definition swap :: "nat \<Rightarrow> 'a \<Rightarrow> 'a::heap array \<Rightarrow> 'a Heap" where
   29.75    [code del]: "swap i x a = Heap_Monad.guard (\<lambda>h. i < length h a)
   29.76      (\<lambda>h. (get h a ! i, update a i x h))"
   29.77  
   29.78 -definition freeze :: "'a\<Colon>heap array \<Rightarrow> 'a list Heap" where
   29.79 +definition freeze :: "'a::heap array \<Rightarrow> 'a list Heap" where
   29.80    [code del]: "freeze a = Heap_Monad.tap (\<lambda>h. get h a)"
   29.81  
   29.82  
    30.1 --- a/src/HOL/Imperative_HOL/Heap.thy	Tue Sep 01 17:25:36 2015 +0200
    30.2 +++ b/src/HOL/Imperative_HOL/Heap.thy	Tue Sep 01 22:32:58 2015 +0200
    30.3 @@ -79,10 +79,10 @@
    30.4  text {* Syntactic convenience *}
    30.5  
    30.6  setup {*
    30.7 -  Sign.add_const_constraint (@{const_name Array}, SOME @{typ "nat \<Rightarrow> 'a\<Colon>heap array"})
    30.8 -  #> Sign.add_const_constraint (@{const_name Ref}, SOME @{typ "nat \<Rightarrow> 'a\<Colon>heap ref"})
    30.9 -  #> Sign.add_const_constraint (@{const_name addr_of_array}, SOME @{typ "'a\<Colon>heap array \<Rightarrow> nat"})
   30.10 -  #> Sign.add_const_constraint (@{const_name addr_of_ref}, SOME @{typ "'a\<Colon>heap ref \<Rightarrow> nat"})
   30.11 +  Sign.add_const_constraint (@{const_name Array}, SOME @{typ "nat \<Rightarrow> 'a::heap array"})
   30.12 +  #> Sign.add_const_constraint (@{const_name Ref}, SOME @{typ "nat \<Rightarrow> 'a::heap ref"})
   30.13 +  #> Sign.add_const_constraint (@{const_name addr_of_array}, SOME @{typ "'a::heap array \<Rightarrow> nat"})
   30.14 +  #> Sign.add_const_constraint (@{const_name addr_of_ref}, SOME @{typ "'a::heap ref \<Rightarrow> nat"})
   30.15  *}
   30.16  
   30.17  hide_const (open) empty
    31.1 --- a/src/HOL/Imperative_HOL/Ref.thy	Tue Sep 01 17:25:36 2015 +0200
    31.2 +++ b/src/HOL/Imperative_HOL/Ref.thy	Tue Sep 01 22:32:58 2015 +0200
    31.3 @@ -16,38 +16,38 @@
    31.4  
    31.5  subsection {* Primitives *}
    31.6  
    31.7 -definition present :: "heap \<Rightarrow> 'a\<Colon>heap ref \<Rightarrow> bool" where
    31.8 +definition present :: "heap \<Rightarrow> 'a::heap ref \<Rightarrow> bool" where
    31.9    "present h r \<longleftrightarrow> addr_of_ref r < lim h"
   31.10  
   31.11 -definition get :: "heap \<Rightarrow> 'a\<Colon>heap ref \<Rightarrow> 'a" where
   31.12 +definition get :: "heap \<Rightarrow> 'a::heap ref \<Rightarrow> 'a" where
   31.13    "get h = from_nat \<circ> refs h TYPEREP('a) \<circ> addr_of_ref"
   31.14  
   31.15 -definition set :: "'a\<Colon>heap ref \<Rightarrow> 'a \<Rightarrow> heap \<Rightarrow> heap" where
   31.16 +definition set :: "'a::heap ref \<Rightarrow> 'a \<Rightarrow> heap \<Rightarrow> heap" where
   31.17    "set r x = refs_update
   31.18      (\<lambda>h. h(TYPEREP('a) := ((h (TYPEREP('a))) (addr_of_ref r := to_nat x))))"
   31.19  
   31.20 -definition alloc :: "'a \<Rightarrow> heap \<Rightarrow> 'a\<Colon>heap ref \<times> heap" where
   31.21 +definition alloc :: "'a \<Rightarrow> heap \<Rightarrow> 'a::heap ref \<times> heap" where
   31.22    "alloc x h = (let
   31.23       l = lim h;
   31.24       r = Ref l
   31.25     in (r, set r x (h\<lparr>lim := l + 1\<rparr>)))"
   31.26  
   31.27 -definition noteq :: "'a\<Colon>heap ref \<Rightarrow> 'b\<Colon>heap ref \<Rightarrow> bool" (infix "=!=" 70) where
   31.28 +definition noteq :: "'a::heap ref \<Rightarrow> 'b::heap ref \<Rightarrow> bool" (infix "=!=" 70) where
   31.29    "r =!= s \<longleftrightarrow> TYPEREP('a) \<noteq> TYPEREP('b) \<or> addr_of_ref r \<noteq> addr_of_ref s"
   31.30  
   31.31  
   31.32  subsection {* Monad operations *}
   31.33  
   31.34 -definition ref :: "'a\<Colon>heap \<Rightarrow> 'a ref Heap" where
   31.35 +definition ref :: "'a::heap \<Rightarrow> 'a ref Heap" where
   31.36    [code del]: "ref v = Heap_Monad.heap (alloc v)"
   31.37  
   31.38 -definition lookup :: "'a\<Colon>heap ref \<Rightarrow> 'a Heap" ("!_" 61) where
   31.39 +definition lookup :: "'a::heap ref \<Rightarrow> 'a Heap" ("!_" 61) where
   31.40    [code del]: "lookup r = Heap_Monad.tap (\<lambda>h. get h r)"
   31.41  
   31.42 -definition update :: "'a ref \<Rightarrow> 'a\<Colon>heap \<Rightarrow> unit Heap" ("_ := _" 62) where
   31.43 +definition update :: "'a ref \<Rightarrow> 'a::heap \<Rightarrow> unit Heap" ("_ := _" 62) where
   31.44    [code del]: "update r v = Heap_Monad.heap (\<lambda>h. ((), set r v h))"
   31.45  
   31.46 -definition change :: "('a\<Colon>heap \<Rightarrow> 'a) \<Rightarrow> 'a ref \<Rightarrow> 'a Heap" where
   31.47 +definition change :: "('a::heap \<Rightarrow> 'a) \<Rightarrow> 'a ref \<Rightarrow> 'a Heap" where
   31.48    "change f r = do {
   31.49       x \<leftarrow> ! r;
   31.50       let y = f x;
    32.1 --- a/src/HOL/Imperative_HOL/ex/Imperative_Reverse.thy	Tue Sep 01 17:25:36 2015 +0200
    32.2 +++ b/src/HOL/Imperative_HOL/ex/Imperative_Reverse.thy	Tue Sep 01 22:32:58 2015 +0200
    32.3 @@ -8,7 +8,7 @@
    32.4  imports Subarray "~~/src/HOL/Imperative_HOL/Imperative_HOL"
    32.5  begin
    32.6  
    32.7 -fun swap :: "'a\<Colon>heap array \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> unit Heap" where
    32.8 +fun swap :: "'a::heap array \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> unit Heap" where
    32.9    "swap a i j = do {
   32.10       x \<leftarrow> Array.nth a i;
   32.11       y \<leftarrow> Array.nth a j;
   32.12 @@ -17,7 +17,7 @@
   32.13       return ()
   32.14     }"
   32.15  
   32.16 -fun rev :: "'a\<Colon>heap array \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> unit Heap" where
   32.17 +fun rev :: "'a::heap array \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> unit Heap" where
   32.18    "rev a i j = (if (i < j) then do {
   32.19       swap a i j;
   32.20       rev a (i + 1) (j - 1)
    33.1 --- a/src/HOL/Imperative_HOL/ex/Linked_Lists.thy	Tue Sep 01 17:25:36 2015 +0200
    33.2 +++ b/src/HOL/Imperative_HOL/ex/Linked_Lists.thy	Tue Sep 01 22:32:58 2015 +0200
    33.3 @@ -10,25 +10,25 @@
    33.4  
    33.5  section {* Definition of Linked Lists *}
    33.6  
    33.7 -setup {* Sign.add_const_constraint (@{const_name Ref}, SOME @{typ "nat \<Rightarrow> 'a\<Colon>type ref"}) *}
    33.8 +setup {* Sign.add_const_constraint (@{const_name Ref}, SOME @{typ "nat \<Rightarrow> 'a::type ref"}) *}
    33.9  datatype 'a node = Empty | Node 'a "'a node ref"
   33.10  
   33.11  primrec
   33.12 -  node_encode :: "'a\<Colon>countable node \<Rightarrow> nat"
   33.13 +  node_encode :: "'a::countable node \<Rightarrow> nat"
   33.14  where
   33.15    "node_encode Empty = 0"
   33.16    | "node_encode (Node x r) = Suc (to_nat (x, r))"
   33.17  
   33.18  instance node :: (countable) countable
   33.19  proof (rule countable_classI [of "node_encode"])
   33.20 -  fix x y :: "'a\<Colon>countable node"
   33.21 +  fix x y :: "'a::countable node"
   33.22    show "node_encode x = node_encode y \<Longrightarrow> x = y"
   33.23    by (induct x, auto, induct y, auto, induct y, auto)
   33.24  qed
   33.25  
   33.26  instance node :: (heap) heap ..
   33.27  
   33.28 -primrec make_llist :: "'a\<Colon>heap list \<Rightarrow> 'a node Heap"
   33.29 +primrec make_llist :: "'a::heap list \<Rightarrow> 'a node Heap"
   33.30  where 
   33.31    [simp del]: "make_llist []     = return Empty"
   33.32              | "make_llist (x#xs) = do { tl \<leftarrow> make_llist xs;
   33.33 @@ -37,7 +37,7 @@
   33.34                                     }"
   33.35  
   33.36  
   33.37 -partial_function (heap) traverse :: "'a\<Colon>heap node \<Rightarrow> 'a list Heap"
   33.38 +partial_function (heap) traverse :: "'a::heap node \<Rightarrow> 'a list Heap"
   33.39  where
   33.40    [code del]: "traverse l =
   33.41      (case l of Empty \<Rightarrow> return []
    34.1 --- a/src/HOL/Imperative_HOL/ex/SatChecker.thy	Tue Sep 01 17:25:36 2015 +0200
    34.2 +++ b/src/HOL/Imperative_HOL/ex/SatChecker.thy	Tue Sep 01 22:32:58 2015 +0200
    34.3 @@ -119,7 +119,7 @@
    34.4  text {* Specific definition for derived clauses in the Array *}
    34.5  
    34.6  definition
    34.7 -  array_ran :: "('a\<Colon>heap) option array \<Rightarrow> heap \<Rightarrow> 'a set" where
    34.8 +  array_ran :: "('a::heap) option array \<Rightarrow> heap \<Rightarrow> 'a set" where
    34.9    "array_ran a h = {e. Some e \<in> set (Array.get h a)}"
   34.10      -- {*FIXME*}
   34.11  
    35.1 --- a/src/HOL/Import/HOL_Light_Maps.thy	Tue Sep 01 17:25:36 2015 +0200
    35.2 +++ b/src/HOL/Import/HOL_Light_Maps.thy	Tue Sep 01 22:32:58 2015 +0200
    35.3 @@ -16,19 +16,19 @@
    35.4    by simp
    35.5  
    35.6  lemma [import_const "/\\"]:
    35.7 -  "(op \<and>) = (\<lambda>p q. (\<lambda>f. f p q \<Colon> bool) = (\<lambda>f. f True True))"
    35.8 +  "(op \<and>) = (\<lambda>p q. (\<lambda>f. f p q :: bool) = (\<lambda>f. f True True))"
    35.9    by metis
   35.10  
   35.11  lemma [import_const "==>"]:
   35.12 -  "(op \<longrightarrow>) = (\<lambda>(p\<Colon>bool) q\<Colon>bool. (p \<and> q) = p)"
   35.13 +  "(op \<longrightarrow>) = (\<lambda>(p::bool) q::bool. (p \<and> q) = p)"
   35.14    by auto
   35.15  
   35.16  lemma [import_const "!"]:
   35.17 -  "All = (\<lambda>P\<Colon>'A \<Rightarrow> bool. P = (\<lambda>x\<Colon>'A. True))"
   35.18 +  "All = (\<lambda>P::'A \<Rightarrow> bool. P = (\<lambda>x::'A. True))"
   35.19    by auto
   35.20  
   35.21  lemma [import_const "?"]:
   35.22 -  "Ex = (\<lambda>P\<Colon>'A \<Rightarrow> bool. All (\<lambda>q\<Colon>bool. (All (\<lambda>x\<Colon>'A\<Colon>type. (P x) \<longrightarrow> q)) \<longrightarrow> q))"
   35.23 +  "Ex = (\<lambda>P::'A \<Rightarrow> bool. All (\<lambda>q::bool. (All (\<lambda>x::'A::type. (P x) \<longrightarrow> q)) \<longrightarrow> q))"
   35.24    by auto
   35.25  
   35.26  lemma [import_const "\\/"]:
   35.27 @@ -44,16 +44,16 @@
   35.28    by simp
   35.29  
   35.30  lemma [import_const "?!"]:
   35.31 -  "Ex1 = (\<lambda>P\<Colon>'A \<Rightarrow> bool. Ex P \<and> (\<forall>x y. P x \<and> P y \<longrightarrow> x = y))"
   35.32 +  "Ex1 = (\<lambda>P::'A \<Rightarrow> bool. Ex P \<and> (\<forall>x y. P x \<and> P y \<longrightarrow> x = y))"
   35.33    by auto
   35.34  
   35.35  lemma [import_const "_FALSITY_"]: "False = False"
   35.36    by simp
   35.37  
   35.38 -lemma hl_ax1: "\<forall>t\<Colon>'A \<Rightarrow> 'B. (\<lambda>x. t x) = t"
   35.39 +lemma hl_ax1: "\<forall>t::'A \<Rightarrow> 'B. (\<lambda>x. t x) = t"
   35.40    by metis
   35.41  
   35.42 -lemma hl_ax2: "\<forall>P x\<Colon>'A. P x \<longrightarrow> P (Eps P)"
   35.43 +lemma hl_ax2: "\<forall>P x::'A. P x \<longrightarrow> P (Eps P)"
   35.44    by (auto intro: someI)
   35.45  
   35.46  lemma [import_const COND]:
   35.47 @@ -61,51 +61,51 @@
   35.48    unfolding fun_eq_iff by auto
   35.49  
   35.50  lemma [import_const o]:
   35.51 -  "(op \<circ>) = (\<lambda>(f\<Colon>'B \<Rightarrow> 'C) g x\<Colon>'A. f (g x))"
   35.52 +  "(op \<circ>) = (\<lambda>(f::'B \<Rightarrow> 'C) g x::'A. f (g x))"
   35.53    unfolding fun_eq_iff by simp
   35.54  
   35.55 -lemma [import_const I]: "id = (\<lambda>x\<Colon>'A. x)"
   35.56 +lemma [import_const I]: "id = (\<lambda>x::'A. x)"
   35.57    by auto
   35.58  
   35.59  lemma [import_type 1 one_ABS one_REP]:
   35.60    "type_definition Rep_unit Abs_unit (Collect (\<lambda>b. b))"
   35.61    by (metis (full_types) Collect_cong singleton_conv2 type_definition_unit)
   35.62  
   35.63 -lemma [import_const one]: "() = (SOME x\<Colon>unit. True)"
   35.64 +lemma [import_const one]: "() = (SOME x::unit. True)"
   35.65    by auto
   35.66  
   35.67  lemma [import_const mk_pair]:
   35.68 -  "Pair_Rep = (\<lambda>(x\<Colon>'A) (y\<Colon>'B) (a\<Colon>'A) b\<Colon>'B. a = x \<and> b = y)"
   35.69 +  "Pair_Rep = (\<lambda>(x::'A) (y::'B) (a::'A) b::'B. a = x \<and> b = y)"
   35.70    by (simp add: Pair_Rep_def fun_eq_iff)
   35.71  
   35.72  lemma [import_type prod ABS_prod REP_prod]:
   35.73 -  "type_definition Rep_prod Abs_prod (Collect (\<lambda>x\<Colon>'A \<Rightarrow> 'B \<Rightarrow> bool. \<exists>a b. x = Pair_Rep a b))"
   35.74 +  "type_definition Rep_prod Abs_prod (Collect (\<lambda>x::'A \<Rightarrow> 'B \<Rightarrow> bool. \<exists>a b. x = Pair_Rep a b))"
   35.75    using type_definition_prod[unfolded Product_Type.prod_def] by simp
   35.76  
   35.77 -lemma [import_const ","]: "Pair = (\<lambda>(x\<Colon>'A) y\<Colon>'B. Abs_prod (Pair_Rep x y))"
   35.78 +lemma [import_const ","]: "Pair = (\<lambda>(x::'A) y::'B. Abs_prod (Pair_Rep x y))"
   35.79    by (metis Pair_def)
   35.80  
   35.81  lemma [import_const FST]:
   35.82 -  "fst = (\<lambda>p\<Colon>'A \<times> 'B. SOME x\<Colon>'A. \<exists>y\<Colon>'B. p = (x, y))"
   35.83 +  "fst = (\<lambda>p::'A \<times> 'B. SOME x::'A. \<exists>y::'B. p = (x, y))"
   35.84    by auto
   35.85  
   35.86  lemma [import_const SND]:
   35.87 -  "snd = (\<lambda>p\<Colon>'A \<times> 'B. SOME y\<Colon>'B. \<exists>x\<Colon>'A. p = (x, y))"
   35.88 +  "snd = (\<lambda>p::'A \<times> 'B. SOME y::'B. \<exists>x::'A. p = (x, y))"
   35.89    by auto
   35.90  
   35.91  lemma CURRY_DEF[import_const CURRY]:
   35.92 -  "curry = (\<lambda>(f\<Colon>'A \<times> 'B \<Rightarrow> 'C) x y. f (x, y))"
   35.93 +  "curry = (\<lambda>(f::'A \<times> 'B \<Rightarrow> 'C) x y. f (x, y))"
   35.94    using curry_def .
   35.95  
   35.96  lemma [import_const ONE_ONE : inj]:
   35.97 -  "inj = (\<lambda>(f\<Colon>'A \<Rightarrow> 'B). \<forall>x1 x2. f x1 = f x2 \<longrightarrow> x1 = x2)"
   35.98 +  "inj = (\<lambda>(f::'A \<Rightarrow> 'B). \<forall>x1 x2. f x1 = f x2 \<longrightarrow> x1 = x2)"
   35.99    by (auto simp add: fun_eq_iff inj_on_def)
  35.100  
  35.101  lemma [import_const ONTO : surj]:
  35.102 -  "surj = (\<lambda>(f\<Colon>'A \<Rightarrow> 'B). \<forall>y. \<exists>x. y = f x)"
  35.103 +  "surj = (\<lambda>(f::'A \<Rightarrow> 'B). \<forall>y. \<exists>x. y = f x)"
  35.104    by (auto simp add: fun_eq_iff)
  35.105  
  35.106 -lemma hl_ax3: "\<exists>f\<Colon>ind \<Rightarrow> ind. inj f \<and> \<not> surj f"
  35.107 +lemma hl_ax3: "\<exists>f::ind \<Rightarrow> ind. inj f \<and> \<not> surj f"
  35.108    by (rule_tac x="Suc_Rep" in exI)
  35.109       (metis Suc_Rep_inject' injI Suc_Rep_not_Zero_Rep surjD)
  35.110  
  35.111 @@ -142,7 +142,7 @@
  35.112  definition [simp]: "pred n = n - 1"
  35.113  
  35.114  lemma PRE[import_const PRE : pred]:
  35.115 -  "pred (id (0\<Colon>nat)) = id (0\<Colon>nat) \<and> (\<forall>n\<Colon>nat. pred (Suc n) = n)"
  35.116 +  "pred (id (0::nat)) = id (0::nat) \<and> (\<forall>n::nat. pred (Suc n) = n)"
  35.117    by simp
  35.118  
  35.119  lemma ADD[import_const "+" : plus]:
  35.120 @@ -186,11 +186,11 @@
  35.121    "even = Parity.even"
  35.122    
  35.123  lemma EVEN[import_const "EVEN" : even]:
  35.124 -  "even (id 0\<Colon>nat) = True \<and> (\<forall>n. even (Suc n) = (\<not> even n))"
  35.125 +  "even (id 0::nat) = True \<and> (\<forall>n. even (Suc n) = (\<not> even n))"
  35.126    by (simp add: even_def)
  35.127  
  35.128  lemma SUB[import_const "-" : minus]:
  35.129 -  "(\<forall>m\<Colon>nat. m - (id 0) = m) \<and> (\<forall>m n. m - (Suc n) = pred (m - n))"
  35.130 +  "(\<forall>m::nat. m - (id 0) = m) \<and> (\<forall>m n. m - (Suc n) = pred (m - n))"
  35.131    by simp
  35.132  
  35.133  lemma FACT[import_const "FACT" : fact]:
  35.134 @@ -201,7 +201,7 @@
  35.135  import_const_map DIV : divide
  35.136  
  35.137  lemma DIVISION_0:
  35.138 -  "\<forall>m n\<Colon>nat. if n = id 0 then m div n = id 0 \<and> m mod n = m else m = m div n * n + m mod n \<and> m mod n < n"
  35.139 +  "\<forall>m n::nat. if n = id 0 then m div n = id 0 \<and> m mod n = m else m = m div n * n + m mod n \<and> m mod n < n"
  35.140    by simp
  35.141  
  35.142  lemmas [import_type sum "_dest_sum" "_mk_sum"] = type_definition_sum[where 'a="'A" and 'b="'B"]
  35.143 @@ -229,40 +229,40 @@
  35.144  import_const_map CONS : Cons
  35.145  
  35.146  lemma list_INDUCT:
  35.147 -  "\<forall>P\<Colon>'A list \<Rightarrow> bool. P [] \<and> (\<forall>a0 a1. P a1 \<longrightarrow> P (a0 # a1)) \<longrightarrow> (\<forall>x. P x)"
  35.148 +  "\<forall>P::'A list \<Rightarrow> bool. P [] \<and> (\<forall>a0 a1. P a1 \<longrightarrow> P (a0 # a1)) \<longrightarrow> (\<forall>x. P x)"
  35.149    using list.induct by auto
  35.150  
  35.151  lemma list_RECURSION:
  35.152 - "\<forall>nil' cons'. \<exists>fn\<Colon>'A list \<Rightarrow> 'Z. fn [] = nil' \<and> (\<forall>(a0\<Colon>'A) a1\<Colon>'A list. fn (a0 # a1) = cons' a0 a1 (fn a1))"
  35.153 + "\<forall>nil' cons'. \<exists>fn::'A list \<Rightarrow> 'Z. fn [] = nil' \<and> (\<forall>(a0::'A) a1::'A list. fn (a0 # a1) = cons' a0 a1 (fn a1))"
  35.154    by (intro allI, rule_tac x="rec_list nil' cons'" in exI) auto
  35.155  
  35.156  lemma HD[import_const HD : hd]:
  35.157 -  "hd ((h\<Colon>'A) # t) = h"
  35.158 +  "hd ((h::'A) # t) = h"
  35.159    by simp
  35.160  
  35.161  lemma TL[import_const TL : tl]:
  35.162 -  "tl ((h\<Colon>'A) # t) = t"
  35.163 +  "tl ((h::'A) # t) = t"
  35.164    by simp
  35.165  
  35.166  lemma APPEND[import_const APPEND : append]:
  35.167 -  "(\<forall>l\<Colon>'A list. [] @ l = l) \<and> (\<forall>(h\<Colon>'A) t l. (h # t) @ l = h # t @ l)"
  35.168 +  "(\<forall>l::'A list. [] @ l = l) \<and> (\<forall>(h::'A) t l. (h # t) @ l = h # t @ l)"
  35.169    by simp
  35.170  
  35.171  lemma REVERSE[import_const REVERSE : rev]:
  35.172 -  "rev [] = ([] :: 'A list) \<and> rev ((x\<Colon>'A) # l) = rev l @ [x]"
  35.173 +  "rev [] = ([] :: 'A list) \<and> rev ((x::'A) # l) = rev l @ [x]"
  35.174    by simp
  35.175  
  35.176  lemma LENGTH[import_const LENGTH : length]:
  35.177 -  "length ([] :: 'A list) = id 0 \<and> (\<forall>(h\<Colon>'A) t. length (h # t) = Suc (length t))"
  35.178 +  "length ([] :: 'A list) = id 0 \<and> (\<forall>(h::'A) t. length (h # t) = Suc (length t))"
  35.179    by simp
  35.180  
  35.181  lemma MAP[import_const MAP : map]:
  35.182 -  "(\<forall>f\<Colon>'A \<Rightarrow> 'B. map f [] = []) \<and>
  35.183 -       (\<forall>(f\<Colon>'A \<Rightarrow> 'B) h t. map f (h # t) = f h # map f t)"
  35.184 +  "(\<forall>f::'A \<Rightarrow> 'B. map f [] = []) \<and>
  35.185 +       (\<forall>(f::'A \<Rightarrow> 'B) h t. map f (h # t) = f h # map f t)"
  35.186    by simp
  35.187  
  35.188  lemma LAST[import_const LAST : last]:
  35.189 -  "last ((h\<Colon>'A) # t) = (if t = [] then h else last t)"
  35.190 +  "last ((h::'A) # t) = (if t = [] then h else last t)"
  35.191    by simp
  35.192  
  35.193  lemma BUTLAST[import_const BUTLAST : butlast]:
  35.194 @@ -271,43 +271,43 @@
  35.195    by simp
  35.196  
  35.197  lemma REPLICATE[import_const REPLICATE : replicate]:
  35.198 -  "replicate (id (0\<Colon>nat)) (x\<Colon>'t18358) = [] \<and>
  35.199 +  "replicate (id (0::nat)) (x::'t18358) = [] \<and>
  35.200     replicate (Suc n) x = x # replicate n x"
  35.201    by simp
  35.202  
  35.203  lemma NULL[import_const NULL : List.null]:
  35.204 -  "List.null ([]\<Colon>'t18373 list) = True \<and> List.null ((h\<Colon>'t18373) # t) = False"
  35.205 +  "List.null ([]::'t18373 list) = True \<and> List.null ((h::'t18373) # t) = False"
  35.206    unfolding null_def by simp
  35.207  
  35.208  lemma ALL[import_const ALL : list_all]:
  35.209 -  "list_all (P\<Colon>'t18393 \<Rightarrow> bool) [] = True \<and>
  35.210 +  "list_all (P::'t18393 \<Rightarrow> bool) [] = True \<and>
  35.211    list_all P (h # t) = (P h \<and> list_all P t)"
  35.212    by simp
  35.213  
  35.214  lemma EX[import_const EX : list_ex]:
  35.215 -  "list_ex (P\<Colon>'t18414 \<Rightarrow> bool) [] = False \<and>
  35.216 +  "list_ex (P::'t18414 \<Rightarrow> bool) [] = False \<and>
  35.217    list_ex P (h # t) = (P h \<or> list_ex P t)"
  35.218    by simp
  35.219  
  35.220  lemma ITLIST[import_const ITLIST : foldr]:
  35.221 -  "foldr (f\<Colon>'t18437 \<Rightarrow> 't18436 \<Rightarrow> 't18436) [] b = b \<and>
  35.222 +  "foldr (f::'t18437 \<Rightarrow> 't18436 \<Rightarrow> 't18436) [] b = b \<and>
  35.223    foldr f (h # t) b = f h (foldr f t b)"
  35.224    by simp
  35.225  
  35.226  lemma ALL2_DEF[import_const ALL2 : list_all2]:
  35.227 -  "list_all2 (P\<Colon>'t18495 \<Rightarrow> 't18502 \<Rightarrow> bool) [] (l2\<Colon>'t18502 list) = (l2 = []) \<and>
  35.228 -  list_all2 P ((h1\<Colon>'t18495) # (t1\<Colon>'t18495 list)) l2 =
  35.229 +  "list_all2 (P::'t18495 \<Rightarrow> 't18502 \<Rightarrow> bool) [] (l2::'t18502 list) = (l2 = []) \<and>
  35.230 +  list_all2 P ((h1::'t18495) # (t1::'t18495 list)) l2 =
  35.231    (if l2 = [] then False else P h1 (hd l2) \<and> list_all2 P t1 (tl l2))"
  35.232    by simp (induct_tac l2, simp_all)
  35.233  
  35.234  lemma FILTER[import_const FILTER : filter]:
  35.235 -  "filter (P\<Colon>'t18680 \<Rightarrow> bool) [] = [] \<and>
  35.236 -  filter P ((h\<Colon>'t18680) # t) = (if P h then h # filter P t else filter P t)"
  35.237 +  "filter (P::'t18680 \<Rightarrow> bool) [] = [] \<and>
  35.238 +  filter P ((h::'t18680) # t) = (if P h then h # filter P t else filter P t)"
  35.239    by simp
  35.240  
  35.241  lemma ZIP[import_const ZIP : zip]:
  35.242   "zip [] [] = ([] :: ('t18824 \<times> 't18825) list) \<and>
  35.243 -  zip ((h1\<Colon>'t18849) # t1) ((h2\<Colon>'t18850) # t2) = (h1, h2) # zip t1 t2"
  35.244 +  zip ((h1::'t18849) # t1) ((h2::'t18850) # t2) = (h1, h2) # zip t1 t2"
  35.245    by simp
  35.246  
  35.247  lemma WF[import_const WF : wfP]:
    36.1 --- a/src/HOL/Inductive.thy	Tue Sep 01 17:25:36 2015 +0200
    36.2 +++ b/src/HOL/Inductive.thy	Tue Sep 01 22:32:58 2015 +0200
    36.3 @@ -57,7 +57,7 @@
    36.4  subsection \<open>General induction rules for least fixed points\<close>
    36.5  
    36.6  lemma lfp_ordinal_induct[case_names mono step union]:
    36.7 -  fixes f :: "'a\<Colon>complete_lattice \<Rightarrow> 'a"
    36.8 +  fixes f :: "'a::complete_lattice \<Rightarrow> 'a"
    36.9    assumes mono: "mono f"
   36.10    and P_f: "\<And>S. P S \<Longrightarrow> S \<le> lfp f \<Longrightarrow> P (f S)"
   36.11    and P_Union: "\<And>M. \<forall>S\<in>M. P S \<Longrightarrow> P (Sup M)"
   36.12 @@ -177,7 +177,7 @@
   36.13    by (blast dest: gfp_lemma2 mono_Un)
   36.14  
   36.15  lemma gfp_ordinal_induct[case_names mono step union]:
   36.16 -  fixes f :: "'a\<Colon>complete_lattice \<Rightarrow> 'a"
   36.17 +  fixes f :: "'a::complete_lattice \<Rightarrow> 'a"
   36.18    assumes mono: "mono f"
   36.19    and P_f: "\<And>S. P S \<Longrightarrow> gfp f \<le> S \<Longrightarrow> P (f S)"
   36.20    and P_Union: "\<And>M. \<forall>S\<in>M. P S \<Longrightarrow> P (Inf M)"
    37.1 --- a/src/HOL/Int.thy	Tue Sep 01 17:25:36 2015 +0200
    37.2 +++ b/src/HOL/Int.thy	Tue Sep 01 22:32:58 2015 +0200
    37.3 @@ -107,10 +107,10 @@
    37.4  begin
    37.5  
    37.6  definition
    37.7 -  "(inf \<Colon> int \<Rightarrow> int \<Rightarrow> int) = min"
    37.8 +  "(inf :: int \<Rightarrow> int \<Rightarrow> int) = min"
    37.9  
   37.10  definition
   37.11 -  "(sup \<Colon> int \<Rightarrow> int \<Rightarrow> int) = max"
   37.12 +  "(sup :: int \<Rightarrow> int \<Rightarrow> int) = max"
   37.13  
   37.14  instance
   37.15    by intro_classes
   37.16 @@ -161,10 +161,10 @@
   37.17  begin
   37.18  
   37.19  definition
   37.20 -  zabs_def: "\<bar>i\<Colon>int\<bar> = (if i < 0 then - i else i)"
   37.21 +  zabs_def: "\<bar>i::int\<bar> = (if i < 0 then - i else i)"
   37.22  
   37.23  definition
   37.24 -  zsgn_def: "sgn (i\<Colon>int) = (if i=0 then 0 else if 0<i then 1 else - 1)"
   37.25 +  zsgn_def: "sgn (i::int) = (if i=0 then 0 else if 0<i then 1 else - 1)"
   37.26  
   37.27  instance proof
   37.28    fix i j k :: int
   37.29 @@ -172,17 +172,17 @@
   37.30      by (rule zmult_zless_mono2)
   37.31    show "\<bar>i\<bar> = (if i < 0 then -i else i)"
   37.32      by (simp only: zabs_def)
   37.33 -  show "sgn (i\<Colon>int) = (if i=0 then 0 else if 0<i then 1 else - 1)"
   37.34 +  show "sgn (i::int) = (if i=0 then 0 else if 0<i then 1 else - 1)"
   37.35      by (simp only: zsgn_def)
   37.36  qed
   37.37  
   37.38  end
   37.39  
   37.40 -lemma zless_imp_add1_zle: "w < z \<Longrightarrow> w + (1\<Colon>int) \<le> z"
   37.41 +lemma zless_imp_add1_zle: "w < z \<Longrightarrow> w + (1::int) \<le> z"
   37.42    by transfer clarsimp
   37.43  
   37.44  lemma zless_iff_Suc_zadd:
   37.45 -  "(w \<Colon> int) < z \<longleftrightarrow> (\<exists>n. z = w + int (Suc n))"
   37.46 +  "(w :: int) < z \<longleftrightarrow> (\<exists>n. z = w + int (Suc n))"
   37.47  apply transfer
   37.48  apply auto
   37.49  apply (rename_tac a b c d)
   37.50 @@ -438,7 +438,7 @@
   37.51  
   37.52  subsection\<open>Lemmas about the Function @{term of_nat} and Orderings\<close>
   37.53  
   37.54 -lemma negative_zless_0: "- (int (Suc n)) < (0 \<Colon> int)"
   37.55 +lemma negative_zless_0: "- (int (Suc n)) < (0 :: int)"
   37.56  by (simp add: order_less_le del: of_nat_Suc)
   37.57  
   37.58  lemma negative_zless [iff]: "- (int (Suc n)) < int m"
   37.59 @@ -1117,9 +1117,9 @@
   37.60  lemma infinite_UNIV_int: "\<not> finite (UNIV::int set)"
   37.61  proof
   37.62    assume "finite (UNIV::int set)"
   37.63 -  moreover have "inj (\<lambda>i\<Colon>int. 2 * i)"
   37.64 +  moreover have "inj (\<lambda>i::int. 2 * i)"
   37.65      by (rule injI) simp
   37.66 -  ultimately have "surj (\<lambda>i\<Colon>int. 2 * i)"
   37.67 +  ultimately have "surj (\<lambda>i::int. 2 * i)"
   37.68      by (rule finite_UNIV_inj_surj)
   37.69    then obtain i :: int where "1 = 2 * i" by (rule surjE)
   37.70    then show False by (simp add: pos_zmult_eq_1_iff)
    38.1 --- a/src/HOL/Lattice/Orders.thy	Tue Sep 01 17:25:36 2015 +0200
    38.2 +++ b/src/HOL/Lattice/Orders.thy	Tue Sep 01 22:32:58 2015 +0200
    38.3 @@ -10,7 +10,7 @@
    38.4  
    38.5  text {*
    38.6    We define several classes of ordered structures over some type @{typ
    38.7 -  'a} with relation @{text "\<sqsubseteq> \<Colon> 'a \<Rightarrow> 'a \<Rightarrow> bool"}.  For a
    38.8 +  'a} with relation @{text "\<sqsubseteq> :: 'a \<Rightarrow> 'a \<Rightarrow> bool"}.  For a
    38.9    \emph{quasi-order} that relation is required to be reflexive and
   38.10    transitive, for a \emph{partial order} it also has to be
   38.11    anti-symmetric, while for a \emph{linear order} all elements are
    39.1 --- a/src/HOL/Lattices.thy	Tue Sep 01 17:25:36 2015 +0200
    39.2 +++ b/src/HOL/Lattices.thy	Tue Sep 01 22:32:58 2015 +0200
    39.3 @@ -222,7 +222,7 @@
    39.4    by (fast intro: inf_greatest le_infI1 le_infI2)
    39.5  
    39.6  lemma mono_inf:
    39.7 -  fixes f :: "'a \<Rightarrow> 'b\<Colon>semilattice_inf"
    39.8 +  fixes f :: "'a \<Rightarrow> 'b::semilattice_inf"
    39.9    shows "mono f \<Longrightarrow> f (A \<sqinter> B) \<sqsubseteq> f A \<sqinter> f B"
   39.10    by (auto simp add: mono_def intro: Lattices.inf_greatest)
   39.11  
   39.12 @@ -259,7 +259,7 @@
   39.13    by (fast intro: sup_least le_supI1 le_supI2)
   39.14  
   39.15  lemma mono_sup:
   39.16 -  fixes f :: "'a \<Rightarrow> 'b\<Colon>semilattice_sup"
   39.17 +  fixes f :: "'a \<Rightarrow> 'b::semilattice_sup"
   39.18    shows "mono f \<Longrightarrow> f A \<squnion> f B \<sqsubseteq> f (A \<squnion> B)"
   39.19    by (auto simp add: mono_def intro: Lattices.sup_least)
   39.20  
   39.21 @@ -770,21 +770,21 @@
   39.22    by (simp add: max_def)
   39.23  
   39.24  lemma min_of_mono:
   39.25 -  fixes f :: "'a \<Rightarrow> 'b\<Colon>linorder"
   39.26 +  fixes f :: "'a \<Rightarrow> 'b::linorder"
   39.27    shows "mono f \<Longrightarrow> min (f m) (f n) = f (min m n)"
   39.28    by (auto simp: mono_def Orderings.min_def min_def intro: Orderings.antisym)
   39.29  
   39.30  lemma max_of_mono:
   39.31 -  fixes f :: "'a \<Rightarrow> 'b\<Colon>linorder"
   39.32 +  fixes f :: "'a \<Rightarrow> 'b::linorder"
   39.33    shows "mono f \<Longrightarrow> max (f m) (f n) = f (max m n)"
   39.34    by (auto simp: mono_def Orderings.max_def max_def intro: Orderings.antisym)
   39.35  
   39.36  end
   39.37  
   39.38 -lemma inf_min: "inf = (min \<Colon> 'a\<Colon>{semilattice_inf, linorder} \<Rightarrow> 'a \<Rightarrow> 'a)"
   39.39 +lemma inf_min: "inf = (min :: 'a::{semilattice_inf,linorder} \<Rightarrow> 'a \<Rightarrow> 'a)"
   39.40    by (auto intro: antisym simp add: min_def fun_eq_iff)
   39.41  
   39.42 -lemma sup_max: "sup = (max \<Colon> 'a\<Colon>{semilattice_sup, linorder} \<Rightarrow> 'a \<Rightarrow> 'a)"
   39.43 +lemma sup_max: "sup = (max :: 'a::{semilattice_sup,linorder} \<Rightarrow> 'a \<Rightarrow> 'a)"
   39.44    by (auto intro: antisym simp add: max_def fun_eq_iff)
   39.45  
   39.46  
    40.1 --- a/src/HOL/Library/Cardinality.thy	Tue Sep 01 17:25:36 2015 +0200
    40.2 +++ b/src/HOL/Library/Cardinality.thy	Tue Sep 01 22:32:58 2015 +0200
    40.3 @@ -41,7 +41,7 @@
    40.4  
    40.5  syntax "_type_card" :: "type => nat" ("(1CARD/(1'(_')))")
    40.6  
    40.7 -translations "CARD('t)" => "CONST card (CONST UNIV \<Colon> 't set)"
    40.8 +translations "CARD('t)" => "CONST card (CONST UNIV :: 't set)"
    40.9  
   40.10  print_translation \<open>
   40.11    let
    41.1 --- a/src/HOL/Library/Char_ord.thy	Tue Sep 01 17:25:36 2015 +0200
    41.2 +++ b/src/HOL/Library/Char_ord.thy	Tue Sep 01 22:32:58 2015 +0200
    41.3 @@ -22,8 +22,8 @@
    41.4  instantiation nibble :: distrib_lattice
    41.5  begin
    41.6  
    41.7 -definition "(inf \<Colon> nibble \<Rightarrow> _) = min"
    41.8 -definition "(sup \<Colon> nibble \<Rightarrow> _) = max"
    41.9 +definition "(inf :: nibble \<Rightarrow> _) = min"
   41.10 +definition "(sup :: nibble \<Rightarrow> _) = max"
   41.11  
   41.12  instance
   41.13    by standard (auto simp add: inf_nibble_def sup_nibble_def max_min_distrib2)
   41.14 @@ -74,8 +74,8 @@
   41.15  instantiation char :: distrib_lattice
   41.16  begin
   41.17  
   41.18 -definition "(inf \<Colon> char \<Rightarrow> _) = min"
   41.19 -definition "(sup \<Colon> char \<Rightarrow> _) = max"
   41.20 +definition "(inf :: char \<Rightarrow> _) = min"
   41.21 +definition "(sup :: char \<Rightarrow> _) = max"
   41.22  
   41.23  instance
   41.24    by standard (auto simp add: inf_char_def sup_char_def max_min_distrib2)
    42.1 --- a/src/HOL/Library/Code_Binary_Nat.thy	Tue Sep 01 17:25:36 2015 +0200
    42.2 +++ b/src/HOL/Library/Code_Binary_Nat.thy	Tue Sep 01 22:32:58 2015 +0200
    42.3 @@ -27,10 +27,10 @@
    42.4    by (simp_all add: nat_of_num_inverse)
    42.5  
    42.6  lemma [code]:
    42.7 -  "(1\<Colon>nat) = Numeral1"
    42.8 +  "(1::nat) = Numeral1"
    42.9    by simp
   42.10  
   42.11 -lemma [code_abbrev]: "Numeral1 = (1\<Colon>nat)"
   42.12 +lemma [code_abbrev]: "Numeral1 = (1::nat)"
   42.13    by simp
   42.14  
   42.15  lemma [code]:
    43.1 --- a/src/HOL/Library/Code_Char.thy	Tue Sep 01 17:25:36 2015 +0200
    43.2 +++ b/src/HOL/Library/Code_Char.thy	Tue Sep 01 22:32:58 2015 +0200
    43.3 @@ -28,7 +28,7 @@
    43.4      and (OCaml) "!((_ : char) = _)"
    43.5      and (Haskell) infix 4 "=="
    43.6      and (Scala) infixl 5 "=="
    43.7 -| constant "Code_Evaluation.term_of \<Colon> char \<Rightarrow> term" \<rightharpoonup>
    43.8 +| constant "Code_Evaluation.term_of :: char \<Rightarrow> term" \<rightharpoonup>
    43.9      (Eval) "HOLogic.mk'_char/ (IntInf.fromInt/ (Char.ord/ _))"
   43.10  
   43.11  code_reserved SML
    44.1 --- a/src/HOL/Library/Countable.thy	Tue Sep 01 17:25:36 2015 +0200
    44.2 +++ b/src/HOL/Library/Countable.thy	Tue Sep 01 22:32:58 2015 +0200
    44.3 @@ -13,7 +13,7 @@
    44.4  subsection \<open>The class of countable types\<close>
    44.5  
    44.6  class countable =
    44.7 -  assumes ex_inj: "\<exists>to_nat \<Colon> 'a \<Rightarrow> nat. inj to_nat"
    44.8 +  assumes ex_inj: "\<exists>to_nat :: 'a \<Rightarrow> nat. inj to_nat"
    44.9  
   44.10  lemma countable_classI:
   44.11    fixes f :: "'a \<Rightarrow> nat"
   44.12 @@ -27,11 +27,11 @@
   44.13  
   44.14  subsection \<open>Conversion functions\<close>
   44.15  
   44.16 -definition to_nat :: "'a\<Colon>countable \<Rightarrow> nat" where
   44.17 +definition to_nat :: "'a::countable \<Rightarrow> nat" where
   44.18    "to_nat = (SOME f. inj f)"
   44.19  
   44.20 -definition from_nat :: "nat \<Rightarrow> 'a\<Colon>countable" where
   44.21 -  "from_nat = inv (to_nat \<Colon> 'a \<Rightarrow> nat)"
   44.22 +definition from_nat :: "nat \<Rightarrow> 'a::countable" where
   44.23 +  "from_nat = inv (to_nat :: 'a \<Rightarrow> nat)"
   44.24  
   44.25  lemma inj_to_nat [simp]: "inj to_nat"
   44.26    by (rule exE_some [OF ex_inj]) (simp add: to_nat_def)
   44.27 @@ -54,13 +54,13 @@
   44.28  
   44.29  subclass (in finite) countable
   44.30  proof
   44.31 -  have "finite (UNIV\<Colon>'a set)" by (rule finite_UNIV)
   44.32 +  have "finite (UNIV::'a set)" by (rule finite_UNIV)
   44.33    with finite_conv_nat_seg_image [of "UNIV::'a set"]
   44.34    obtain n and f :: "nat \<Rightarrow> 'a" 
   44.35      where "UNIV = f ` {i. i < n}" by auto
   44.36    then have "surj f" unfolding surj_def by auto
   44.37    then have "inj (inv f)" by (rule surj_imp_inj_inv)
   44.38 -  then show "\<exists>to_nat \<Colon> 'a \<Rightarrow> nat. inj to_nat" by (rule exI[of inj])
   44.39 +  then show "\<exists>to_nat :: 'a \<Rightarrow> nat. inj to_nat" by (rule exI[of inj])
   44.40  qed
   44.41  
   44.42  
    45.1 --- a/src/HOL/Library/Extended_Nat.thy	Tue Sep 01 17:25:36 2015 +0200
    45.2 +++ b/src/HOL/Library/Extended_Nat.thy	Tue Sep 01 22:32:58 2015 +0200
    45.3 @@ -112,8 +112,8 @@
    45.4    by (simp add: zero_enat_def)
    45.5  
    45.6  lemma zero_one_enat_neq [simp]:
    45.7 -  "\<not> 0 = (1\<Colon>enat)"
    45.8 -  "\<not> 1 = (0\<Colon>enat)"
    45.9 +  "\<not> 0 = (1::enat)"
   45.10 +  "\<not> 1 = (0::enat)"
   45.11    unfolding zero_enat_def one_enat_def by simp_all
   45.12  
   45.13  lemma infinity_ne_i1 [simp]: "(\<infinity>::enat) \<noteq> 1"
   45.14 @@ -380,14 +380,14 @@
   45.15  a generalize linordered_semidom to a new class that includes enat? *)
   45.16  
   45.17  lemma enat_ord_number [simp]:
   45.18 -  "(numeral m \<Colon> enat) \<le> numeral n \<longleftrightarrow> (numeral m \<Colon> nat) \<le> numeral n"
   45.19 -  "(numeral m \<Colon> enat) < numeral n \<longleftrightarrow> (numeral m \<Colon> nat) < numeral n"
   45.20 +  "(numeral m :: enat) \<le> numeral n \<longleftrightarrow> (numeral m :: nat) \<le> numeral n"
   45.21 +  "(numeral m :: enat) < numeral n \<longleftrightarrow> (numeral m :: nat) < numeral n"
   45.22    by (simp_all add: numeral_eq_enat)
   45.23  
   45.24 -lemma i0_lb [simp]: "(0\<Colon>enat) \<le> n"
   45.25 +lemma i0_lb [simp]: "(0::enat) \<le> n"
   45.26    by (simp add: zero_enat_def less_eq_enat_def split: enat.splits)
   45.27  
   45.28 -lemma ile0_eq [simp]: "n \<le> (0\<Colon>enat) \<longleftrightarrow> n = 0"
   45.29 +lemma ile0_eq [simp]: "n \<le> (0::enat) \<longleftrightarrow> n = 0"
   45.30    by (simp add: zero_enat_def less_eq_enat_def split: enat.splits)
   45.31  
   45.32  lemma infinity_ileE [elim!]: "\<infinity> \<le> enat m \<Longrightarrow> R"
   45.33 @@ -396,10 +396,10 @@
   45.34  lemma infinity_ilessE [elim!]: "\<infinity> < enat m \<Longrightarrow> R"
   45.35    by simp
   45.36  
   45.37 -lemma not_iless0 [simp]: "\<not> n < (0\<Colon>enat)"
   45.38 +lemma not_iless0 [simp]: "\<not> n < (0::enat)"
   45.39    by (simp add: zero_enat_def less_enat_def split: enat.splits)
   45.40  
   45.41 -lemma i0_less [simp]: "(0\<Colon>enat) < n \<longleftrightarrow> n \<noteq> 0"
   45.42 +lemma i0_less [simp]: "(0::enat) < n \<longleftrightarrow> n \<noteq> 0"
   45.43    by (simp add: zero_enat_def less_enat_def split: enat.splits)
   45.44  
   45.45  lemma eSuc_ile_mono [simp]: "eSuc n \<le> eSuc m \<longleftrightarrow> n \<le> m"
   45.46 @@ -623,7 +623,7 @@
   45.47  instance enat :: wellorder
   45.48  proof
   45.49    fix P and n
   45.50 -  assume hyp: "(\<And>n\<Colon>enat. (\<And>m\<Colon>enat. m < n \<Longrightarrow> P m) \<Longrightarrow> P n)"
   45.51 +  assume hyp: "(\<And>n::enat. (\<And>m::enat. m < n \<Longrightarrow> P m) \<Longrightarrow> P n)"
   45.52    show "P n" by (blast intro: enat_less_induct hyp)
   45.53  qed
   45.54  
    46.1 --- a/src/HOL/Library/Fraction_Field.thy	Tue Sep 01 17:25:36 2015 +0200
    46.2 +++ b/src/HOL/Library/Fraction_Field.thy	Tue Sep 01 22:32:58 2015 +0200
    46.3 @@ -416,10 +416,10 @@
    46.4        eq_fract zero_less_mult_iff mult_less_0_iff split: abs_split)
    46.5  
    46.6  definition inf_fract_def:
    46.7 -  "(inf \<Colon> 'a fract \<Rightarrow> 'a fract \<Rightarrow> 'a fract) = min"
    46.8 +  "(inf :: 'a fract \<Rightarrow> 'a fract \<Rightarrow> 'a fract) = min"
    46.9  
   46.10  definition sup_fract_def:
   46.11 -  "(sup \<Colon> 'a fract \<Rightarrow> 'a fract \<Rightarrow> 'a fract) = max"
   46.12 +  "(sup :: 'a fract \<Rightarrow> 'a fract \<Rightarrow> 'a fract) = max"
   46.13  
   46.14  instance
   46.15    by intro_classes
    47.1 --- a/src/HOL/Library/List_lexord.thy	Tue Sep 01 17:25:36 2015 +0200
    47.2 +++ b/src/HOL/Library/List_lexord.thy	Tue Sep 01 22:32:58 2015 +0200
    47.3 @@ -69,9 +69,9 @@
    47.4  instantiation list :: (linorder) distrib_lattice
    47.5  begin
    47.6  
    47.7 -definition "(inf \<Colon> 'a list \<Rightarrow> _) = min"
    47.8 +definition "(inf :: 'a list \<Rightarrow> _) = min"
    47.9  
   47.10 -definition "(sup \<Colon> 'a list \<Rightarrow> _) = max"
   47.11 +definition "(sup :: 'a list \<Rightarrow> _) = max"
   47.12  
   47.13  instance
   47.14    by standard (auto simp add: inf_list_def sup_list_def max_min_distrib2)
   47.15 @@ -107,15 +107,15 @@
   47.16  end
   47.17  
   47.18  lemma less_list_code [code]:
   47.19 -  "xs < ([]\<Colon>'a\<Colon>{equal, order} list) \<longleftrightarrow> False"
   47.20 -  "[] < (x\<Colon>'a\<Colon>{equal, order}) # xs \<longleftrightarrow> True"
   47.21 -  "(x\<Colon>'a\<Colon>{equal, order}) # xs < y # ys \<longleftrightarrow> x < y \<or> x = y \<and> xs < ys"
   47.22 +  "xs < ([]::'a::{equal, order} list) \<longleftrightarrow> False"
   47.23 +  "[] < (x::'a::{equal, order}) # xs \<longleftrightarrow> True"
   47.24 +  "(x::'a::{equal, order}) # xs < y # ys \<longleftrightarrow> x < y \<or> x = y \<and> xs < ys"
   47.25    by simp_all
   47.26  
   47.27  lemma less_eq_list_code [code]:
   47.28 -  "x # xs \<le> ([]\<Colon>'a\<Colon>{equal, order} list) \<longleftrightarrow> False"
   47.29 -  "[] \<le> (xs\<Colon>'a\<Colon>{equal, order} list) \<longleftrightarrow> True"
   47.30 -  "(x\<Colon>'a\<Colon>{equal, order}) # xs \<le> y # ys \<longleftrightarrow> x < y \<or> x = y \<and> xs \<le> ys"
   47.31 +  "x # xs \<le> ([]::'a::{equal, order} list) \<longleftrightarrow> False"
   47.32 +  "[] \<le> (xs::'a::{equal, order} list) \<longleftrightarrow> True"
   47.33 +  "(x::'a::{equal, order}) # xs \<le> y # ys \<longleftrightarrow> x < y \<or> x = y \<and> xs \<le> ys"
   47.34    by simp_all
   47.35  
   47.36  end
    48.1 --- a/src/HOL/Library/Mapping.thy	Tue Sep 01 17:25:36 2015 +0200
    48.2 +++ b/src/HOL/Library/Mapping.thy	Tue Sep 01 22:32:58 2015 +0200
    48.3 @@ -138,7 +138,7 @@
    48.4  
    48.5  subsection \<open>Derived operations\<close>
    48.6  
    48.7 -definition ordered_keys :: "('a\<Colon>linorder, 'b) mapping \<Rightarrow> 'a list"
    48.8 +definition ordered_keys :: "('a::linorder, 'b) mapping \<Rightarrow> 'a list"
    48.9  where
   48.10    "ordered_keys m = (if finite (keys m) then sorted_list_of_set (keys m) else [])"
   48.11  
    49.1 --- a/src/HOL/Library/Multiset.thy	Tue Sep 01 17:25:36 2015 +0200
    49.2 +++ b/src/HOL/Library/Multiset.thy	Tue Sep 01 22:32:58 2015 +0200
    49.3 @@ -1205,7 +1205,7 @@
    49.4  
    49.5  end
    49.6  
    49.7 -lemma comp_fun_commute_plus_mset[simp]: "comp_fun_commute (op + \<Colon> 'a multiset \<Rightarrow> _ \<Rightarrow> _)"
    49.8 +lemma comp_fun_commute_plus_mset[simp]: "comp_fun_commute (op + :: 'a multiset \<Rightarrow> _ \<Rightarrow> _)"
    49.9    by standard (simp add: add_ac comp_def)
   49.10  
   49.11  declare comp_fun_commute.fold_mset_insert[OF comp_fun_commute_plus_mset, simp]
   49.12 @@ -1240,7 +1240,7 @@
   49.13  end
   49.14  
   49.15  lemma msetsum_diff:
   49.16 -  fixes M N :: "('a \<Colon> ordered_cancel_comm_monoid_diff) multiset"
   49.17 +  fixes M N :: "('a :: ordered_cancel_comm_monoid_diff) multiset"
   49.18    shows "N \<le># M \<Longrightarrow> msetsum (M - N) = msetsum M - msetsum N"
   49.19    by (metis add_diff_cancel_right' msetsum.union subset_mset.diff_add)
   49.20  
   49.21 @@ -1756,10 +1756,10 @@
   49.22  
   49.23  subsubsection \<open>Partial-order properties\<close>
   49.24  
   49.25 -definition less_multiset :: "'a\<Colon>order multiset \<Rightarrow> 'a multiset \<Rightarrow> bool" (infix "#<#" 50) where
   49.26 +definition less_multiset :: "'a::order multiset \<Rightarrow> 'a multiset \<Rightarrow> bool" (infix "#<#" 50) where
   49.27    "M' #<# M \<longleftrightarrow> (M', M) \<in> mult {(x', x). x' < x}"
   49.28  
   49.29 -definition le_multiset :: "'a\<Colon>order multiset \<Rightarrow> 'a multiset \<Rightarrow> bool" (infix "#<=#" 50) where
   49.30 +definition le_multiset :: "'a::order multiset \<Rightarrow> 'a multiset \<Rightarrow> bool" (infix "#<=#" 50) where
   49.31    "M' #<=# M \<longleftrightarrow> M' #<# M \<or> M' = M"
   49.32  
   49.33  notation (xsymbols) less_multiset (infix "#\<subset>#" 50)
   49.34 @@ -2210,7 +2210,7 @@
   49.35  text \<open>Quickcheck generators\<close>
   49.36  
   49.37  definition (in term_syntax)
   49.38 -  msetify :: "'a\<Colon>typerep list \<times> (unit \<Rightarrow> Code_Evaluation.term)
   49.39 +  msetify :: "'a::typerep list \<times> (unit \<Rightarrow> Code_Evaluation.term)
   49.40      \<Rightarrow> 'a multiset \<times> (unit \<Rightarrow> Code_Evaluation.term)" where
   49.41    [code_unfold]: "msetify xs = Code_Evaluation.valtermify mset {\<cdot>} xs"
   49.42  
    50.1 --- a/src/HOL/Library/Multiset_Order.thy	Tue Sep 01 17:25:36 2015 +0200
    50.2 +++ b/src/HOL/Library/Multiset_Order.thy	Tue Sep 01 22:32:58 2015 +0200
    50.3 @@ -178,10 +178,10 @@
    50.4  context linorder
    50.5  begin
    50.6  
    50.7 -lemma total_le: "total {(a \<Colon> 'a, b). a \<le> b}"
    50.8 +lemma total_le: "total {(a :: 'a, b). a \<le> b}"
    50.9    unfolding total_on_def by auto
   50.10  
   50.11 -lemma total_less: "total {(a \<Colon> 'a, b). a < b}"
   50.12 +lemma total_less: "total {(a :: 'a, b). a < b}"
   50.13    unfolding total_on_def by auto
   50.14  
   50.15  lemma linorder_mult: "class.linorder
   50.16 @@ -205,78 +205,78 @@
   50.17  lemmas less_multiset\<^sub>H\<^sub>O = mult\<^sub>H\<^sub>O[folded less_multiset_def]
   50.18  
   50.19  lemma le_multiset\<^sub>H\<^sub>O:
   50.20 -  fixes M N :: "('a \<Colon> linorder) multiset"
   50.21 +  fixes M N :: "('a :: linorder) multiset"
   50.22    shows "M #\<subseteq># N \<longleftrightarrow> (\<forall>y. count N y < count M y \<longrightarrow> (\<exists>x. y < x \<and> count M x < count N x))"
   50.23    by (auto simp: le_multiset_def less_multiset\<^sub>H\<^sub>O)
   50.24  
   50.25 -lemma wf_less_multiset: "wf {(M \<Colon> ('a \<Colon> wellorder) multiset, N). M #\<subset># N}"
   50.26 +lemma wf_less_multiset: "wf {(M :: ('a :: wellorder) multiset, N). M #\<subset># N}"
   50.27    unfolding less_multiset_def by (auto intro: wf_mult wf)
   50.28  
   50.29  lemma order_multiset: "class.order
   50.30 -  (le_multiset :: ('a \<Colon> order) multiset \<Rightarrow> ('a \<Colon> order) multiset \<Rightarrow> bool)
   50.31 -  (less_multiset :: ('a \<Colon> order) multiset \<Rightarrow> ('a \<Colon> order) multiset \<Rightarrow> bool)"
   50.32 +  (le_multiset :: ('a :: order) multiset \<Rightarrow> ('a :: order) multiset \<Rightarrow> bool)
   50.33 +  (less_multiset :: ('a :: order) multiset \<Rightarrow> ('a :: order) multiset \<Rightarrow> bool)"
   50.34    by unfold_locales
   50.35  
   50.36  lemma linorder_multiset: "class.linorder
   50.37 -  (le_multiset :: ('a \<Colon> linorder) multiset \<Rightarrow> ('a \<Colon> linorder) multiset \<Rightarrow> bool)
   50.38 -  (less_multiset :: ('a \<Colon> linorder) multiset \<Rightarrow> ('a \<Colon> linorder) multiset \<Rightarrow> bool)"
   50.39 +  (le_multiset :: ('a :: linorder) multiset \<Rightarrow> ('a :: linorder) multiset \<Rightarrow> bool)
   50.40 +  (less_multiset :: ('a :: linorder) multiset \<Rightarrow> ('a :: linorder) multiset \<Rightarrow> bool)"
   50.41    by unfold_locales (fastforce simp add: less_multiset\<^sub>H\<^sub>O le_multiset_def not_less_iff_gr_or_eq)
   50.42  
   50.43  interpretation multiset_linorder: linorder
   50.44 -  "le_multiset :: ('a \<Colon> linorder) multiset \<Rightarrow> ('a \<Colon> linorder) multiset \<Rightarrow> bool"
   50.45 -  "less_multiset :: ('a \<Colon> linorder) multiset \<Rightarrow> ('a \<Colon> linorder) multiset \<Rightarrow> bool"
   50.46 +  "le_multiset :: ('a :: linorder) multiset \<Rightarrow> ('a :: linorder) multiset \<Rightarrow> bool"
   50.47 +  "less_multiset :: ('a :: linorder) multiset \<Rightarrow> ('a :: linorder) multiset \<Rightarrow> bool"
   50.48    by (rule linorder_multiset)
   50.49  
   50.50  interpretation multiset_wellorder: wellorder
   50.51 -  "le_multiset :: ('a \<Colon> wellorder) multiset \<Rightarrow> ('a \<Colon> wellorder) multiset \<Rightarrow> bool"
   50.52 -  "less_multiset :: ('a \<Colon> wellorder) multiset \<Rightarrow> ('a \<Colon> wellorder) multiset \<Rightarrow> bool"
   50.53 +  "le_multiset :: ('a :: wellorder) multiset \<Rightarrow> ('a :: wellorder) multiset \<Rightarrow> bool"
   50.54 +  "less_multiset :: ('a :: wellorder) multiset \<Rightarrow> ('a :: wellorder) multiset \<Rightarrow> bool"
   50.55    by unfold_locales (blast intro: wf_less_multiset[unfolded wf_def, rule_format])
   50.56  
   50.57  lemma le_multiset_total:
   50.58 -  fixes M N :: "('a \<Colon> linorder) multiset"
   50.59 +  fixes M N :: "('a :: linorder) multiset"
   50.60    shows "\<not> M #\<subseteq># N \<Longrightarrow> N #\<subseteq># M"
   50.61    by (metis multiset_linorder.le_cases)
   50.62  
   50.63  lemma less_eq_imp_le_multiset:
   50.64 -  fixes M N :: "('a \<Colon> linorder) multiset"
   50.65 +  fixes M N :: "('a :: linorder) multiset"
   50.66    shows "M \<le># N \<Longrightarrow> M #\<subseteq># N"
   50.67    unfolding le_multiset_def less_multiset\<^sub>H\<^sub>O
   50.68    by (simp add: less_le_not_le subseteq_mset_def)
   50.69  
   50.70  lemma less_multiset_right_total:
   50.71 -  fixes M :: "('a \<Colon> linorder) multiset"
   50.72 +  fixes M :: "('a :: linorder) multiset"
   50.73    shows "M #\<subset># M + {#undefined#}"
   50.74    unfolding le_multiset_def less_multiset\<^sub>H\<^sub>O by simp
   50.75  
   50.76  lemma le_multiset_empty_left[simp]:
   50.77 -  fixes M :: "('a \<Colon> linorder) multiset"
   50.78 +  fixes M :: "('a :: linorder) multiset"
   50.79    shows "{#} #\<subseteq># M"
   50.80    by (simp add: less_eq_imp_le_multiset)
   50.81  
   50.82  lemma le_multiset_empty_right[simp]:
   50.83 -  fixes M :: "('a \<Colon> linorder) multiset"
   50.84 +  fixes M :: "('a :: linorder) multiset"
   50.85    shows "M \<noteq> {#} \<Longrightarrow> \<not> M #\<subseteq># {#}"
   50.86    by (metis le_multiset_empty_left multiset_order.antisym)
   50.87  
   50.88  lemma less_multiset_empty_left[simp]:
   50.89 -  fixes M :: "('a \<Colon> linorder) multiset"
   50.90 +  fixes M :: "('a :: linorder) multiset"
   50.91    shows "M \<noteq> {#} \<Longrightarrow> {#} #\<subset># M"
   50.92    by (simp add: less_multiset\<^sub>H\<^sub>O)
   50.93  
   50.94  lemma less_multiset_empty_right[simp]:
   50.95 -  fixes M :: "('a \<Colon> linorder) multiset"
   50.96 +  fixes M :: "('a :: linorder) multiset"
   50.97    shows "\<not> M #\<subset># {#}"
   50.98    using le_empty less_multiset\<^sub>D\<^sub>M by blast
   50.99  
  50.100  lemma
  50.101 -  fixes M N :: "('a \<Colon> linorder) multiset"
  50.102 +  fixes M N :: "('a :: linorder) multiset"
  50.103    shows
  50.104      le_multiset_plus_left[simp]: "N #\<subseteq># (M + N)" and
  50.105      le_multiset_plus_right[simp]: "M #\<subseteq># (M + N)"
  50.106    using [[metis_verbose = false]] by (metis less_eq_imp_le_multiset mset_le_add_left add.commute)+
  50.107  
  50.108  lemma
  50.109 -  fixes M N :: "('a \<Colon> linorder) multiset"
  50.110 +  fixes M N :: "('a :: linorder) multiset"
  50.111    shows
  50.112      less_multiset_plus_plus_left_iff[simp]: "M + N #\<subset># M' + N \<longleftrightarrow> M #\<subset># M'" and
  50.113      less_multiset_plus_plus_right_iff[simp]: "M + N #\<subset># M + N' \<longleftrightarrow> N #\<subset># N'"
  50.114 @@ -286,7 +286,7 @@
  50.115    by (metis add.commute add_diff_cancel_right' monoid_add_class.add.left_neutral)
  50.116  
  50.117  lemma
  50.118 -  fixes M N :: "('a \<Colon> linorder) multiset"
  50.119 +  fixes M N :: "('a :: linorder) multiset"
  50.120    shows
  50.121      less_multiset_plus_left_nonempty[simp]: "M \<noteq> {#} \<Longrightarrow> N #\<subset># M + N" and
  50.122      less_multiset_plus_right_nonempty[simp]: "N \<noteq> {#} \<Longrightarrow> M #\<subset># M + N"
  50.123 @@ -294,11 +294,11 @@
  50.124    by (metis add.right_neutral less_multiset_empty_left less_multiset_plus_plus_right_iff
  50.125      add.commute)+
  50.126  
  50.127 -lemma ex_gt_imp_less_multiset: "(\<exists>y \<Colon> 'a \<Colon> linorder. y \<in># N \<and> (\<forall>x. x \<in># M \<longrightarrow> x < y)) \<Longrightarrow> M #\<subset># N"
  50.128 +lemma ex_gt_imp_less_multiset: "(\<exists>y :: 'a :: linorder. y \<in># N \<and> (\<forall>x. x \<in># M \<longrightarrow> x < y)) \<Longrightarrow> M #\<subset># N"
  50.129    unfolding less_multiset\<^sub>H\<^sub>O by (metis less_irrefl less_nat_zero_code not_gr0)
  50.130  
  50.131  lemma ex_gt_count_imp_less_multiset:
  50.132 -  "(\<forall>y \<Colon> 'a \<Colon> linorder. y \<in># M + N \<longrightarrow> y \<le> x) \<Longrightarrow> count M x < count N x \<Longrightarrow> M #\<subset># N"
  50.133 +  "(\<forall>y :: 'a :: linorder. y \<in># M + N \<longrightarrow> y \<le> x) \<Longrightarrow> count M x < count N x \<Longrightarrow> M #\<subset># N"
  50.134    unfolding less_multiset\<^sub>H\<^sub>O by (metis add.left_neutral add_lessD1 dual_order.strict_iff_order
  50.135      less_not_sym mset_leD mset_le_add_left)  
  50.136  
    51.1 --- a/src/HOL/Library/RBT.thy	Tue Sep 01 17:25:36 2015 +0200
    51.2 +++ b/src/HOL/Library/RBT.thy	Tue Sep 01 22:32:58 2015 +0200
    51.3 @@ -10,7 +10,7 @@
    51.4  
    51.5  subsection \<open>Type definition\<close>
    51.6  
    51.7 -typedef ('a, 'b) rbt = "{t :: ('a\<Colon>linorder, 'b) RBT_Impl.rbt. is_rbt t}"
    51.8 +typedef ('a, 'b) rbt = "{t :: ('a::linorder, 'b) RBT_Impl.rbt. is_rbt t}"
    51.9    morphisms impl_of RBT
   51.10  proof -
   51.11    have "RBT_Impl.Empty \<in> ?rbt" by simp
   51.12 @@ -37,32 +37,32 @@
   51.13  
   51.14  setup_lifting type_definition_rbt
   51.15  
   51.16 -lift_definition lookup :: "('a\<Colon>linorder, 'b) rbt \<Rightarrow> 'a \<rightharpoonup> 'b" is "rbt_lookup" .
   51.17 +lift_definition lookup :: "('a::linorder, 'b) rbt \<Rightarrow> 'a \<rightharpoonup> 'b" is "rbt_lookup" .
   51.18  
   51.19 -lift_definition empty :: "('a\<Colon>linorder, 'b) rbt" is RBT_Impl.Empty 
   51.20 +lift_definition empty :: "('a::linorder, 'b) rbt" is RBT_Impl.Empty 
   51.21  by (simp add: empty_def)
   51.22  
   51.23 -lift_definition insert :: "'a\<Colon>linorder \<Rightarrow> 'b \<Rightarrow> ('a, 'b) rbt \<Rightarrow> ('a, 'b) rbt" is "rbt_insert" 
   51.24 +lift_definition insert :: "'a::linorder \<Rightarrow> 'b \<Rightarrow> ('a, 'b) rbt \<Rightarrow> ('a, 'b) rbt" is "rbt_insert" 
   51.25  by simp
   51.26  
   51.27 -lift_definition delete :: "'a\<Colon>linorder \<Rightarrow> ('a, 'b) rbt \<Rightarrow> ('a, 'b) rbt" is "rbt_delete" 
   51.28 +lift_definition delete :: "'a::linorder \<Rightarrow> ('a, 'b) rbt \<Rightarrow> ('a, 'b) rbt" is "rbt_delete" 
   51.29  by simp
   51.30  
   51.31 -lift_definition entries :: "('a\<Colon>linorder, 'b) rbt \<Rightarrow> ('a \<times> 'b) list" is RBT_Impl.entries .
   51.32 +lift_definition entries :: "('a::linorder, 'b) rbt \<Rightarrow> ('a \<times> 'b) list" is RBT_Impl.entries .
   51.33  
   51.34 -lift_definition keys :: "('a\<Colon>linorder, 'b) rbt \<Rightarrow> 'a list" is RBT_Impl.keys .
   51.35 +lift_definition keys :: "('a::linorder, 'b) rbt \<Rightarrow> 'a list" is RBT_Impl.keys .
   51.36  
   51.37 -lift_definition bulkload :: "('a\<Colon>linorder \<times> 'b) list \<Rightarrow> ('a, 'b) rbt" is "rbt_bulkload" ..
   51.38 +lift_definition bulkload :: "('a::linorder \<times> 'b) list \<Rightarrow> ('a, 'b) rbt" is "rbt_bulkload" ..
   51.39  
   51.40 -lift_definition map_entry :: "'a \<Rightarrow> ('b \<Rightarrow> 'b) \<Rightarrow> ('a\<Colon>linorder, 'b) rbt \<Rightarrow> ('a, 'b) rbt" is rbt_map_entry
   51.41 +lift_definition map_entry :: "'a \<Rightarrow> ('b \<Rightarrow> 'b) \<Rightarrow> ('a::linorder, 'b) rbt \<Rightarrow> ('a, 'b) rbt" is rbt_map_entry
   51.42  by simp
   51.43  
   51.44 -lift_definition map :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> ('a\<Colon>linorder, 'b) rbt \<Rightarrow> ('a, 'c) rbt" is RBT_Impl.map
   51.45 +lift_definition map :: "('a \<Rightarrow> 'b \<Rightarrow> 'c) \<Rightarrow> ('a::linorder, 'b) rbt \<Rightarrow> ('a, 'c) rbt" is RBT_Impl.map
   51.46  by simp
   51.47  
   51.48 -lift_definition fold :: "('a \<Rightarrow> 'b \<Rightarrow> 'c \<Rightarrow> 'c) \<Rightarrow> ('a\<Colon>linorder, 'b) rbt \<Rightarrow> 'c \<Rightarrow> 'c"  is RBT_Impl.fold .
   51.49 +lift_definition fold :: "('a \<Rightarrow> 'b \<Rightarrow> 'c \<Rightarrow> 'c) \<Rightarrow> ('a::linorder, 'b) rbt \<Rightarrow> 'c \<Rightarrow> 'c"  is RBT_Impl.fold .
   51.50  
   51.51 -lift_definition union :: "('a\<Colon>linorder, 'b) rbt \<Rightarrow> ('a, 'b) rbt \<Rightarrow> ('a, 'b) rbt" is "rbt_union"
   51.52 +lift_definition union :: "('a::linorder, 'b) rbt \<Rightarrow> ('a, 'b) rbt \<Rightarrow> ('a, 'b) rbt" is "rbt_union"
   51.53  by (simp add: rbt_union_is_rbt)
   51.54  
   51.55  lift_definition foldi :: "('c \<Rightarrow> bool) \<Rightarrow> ('a \<Rightarrow> 'b \<Rightarrow> 'c \<Rightarrow> 'c) \<Rightarrow> ('a :: linorder, 'b) rbt \<Rightarrow> 'c \<Rightarrow> 'c"
   51.56 @@ -70,7 +70,7 @@
   51.57  
   51.58  subsection \<open>Derived operations\<close>
   51.59  
   51.60 -definition is_empty :: "('a\<Colon>linorder, 'b) rbt \<Rightarrow> bool" where
   51.61 +definition is_empty :: "('a::linorder, 'b) rbt \<Rightarrow> bool" where
   51.62    [code]: "is_empty t = (case impl_of t of RBT_Impl.Empty \<Rightarrow> True | _ \<Rightarrow> False)"
   51.63  
   51.64  
    52.1 --- a/src/HOL/Library/RBT_Impl.thy	Tue Sep 01 17:25:36 2015 +0200
    52.2 +++ b/src/HOL/Library/RBT_Impl.thy	Tue Sep 01 22:32:58 2015 +0200
    52.3 @@ -2060,19 +2060,19 @@
    52.4       (@{const_name rbt_sorted}, SOME @{typ "('a :: linorder, 'b) rbt \<Rightarrow> bool"}),
    52.5       (@{const_name rbt_lookup}, SOME @{typ "('a :: linorder, 'b) rbt \<Rightarrow> 'a \<rightharpoonup> 'b"}),
    52.6       (@{const_name is_rbt}, SOME @{typ "('a :: linorder, 'b) rbt \<Rightarrow> bool"}),
    52.7 -     (@{const_name rbt_ins}, SOME @{typ "('a\<Colon>linorder \<Rightarrow> 'b \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
    52.8 -     (@{const_name rbt_insert_with_key}, SOME @{typ "('a\<Colon>linorder \<Rightarrow> 'b \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
    52.9 +     (@{const_name rbt_ins}, SOME @{typ "('a::linorder \<Rightarrow> 'b \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.10 +     (@{const_name rbt_insert_with_key}, SOME @{typ "('a::linorder \<Rightarrow> 'b \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.11       (@{const_name rbt_insert_with}, SOME @{typ "('b \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> ('a :: linorder) \<Rightarrow> 'b \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.12       (@{const_name rbt_insert}, SOME @{typ "('a :: linorder) \<Rightarrow> 'b \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.13 -     (@{const_name rbt_del_from_left}, SOME @{typ "('a\<Colon>linorder) \<Rightarrow> ('a,'b) rbt \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.14 -     (@{const_name rbt_del_from_right}, SOME @{typ "('a\<Colon>linorder) \<Rightarrow> ('a,'b) rbt \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.15 -     (@{const_name rbt_del}, SOME @{typ "('a\<Colon>linorder) \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.16 -     (@{const_name rbt_delete}, SOME @{typ "('a\<Colon>linorder) \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.17 -     (@{const_name rbt_union_with_key}, SOME @{typ "('a\<Colon>linorder \<Rightarrow> 'b \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.18 -     (@{const_name rbt_union_with}, SOME @{typ "('b \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> ('a\<Colon>linorder,'b) rbt \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.19 -     (@{const_name rbt_union}, SOME @{typ "('a\<Colon>linorder,'b) rbt \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.20 -     (@{const_name rbt_map_entry}, SOME @{typ "'a\<Colon>linorder \<Rightarrow> ('b \<Rightarrow> 'b) \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.21 -     (@{const_name rbt_bulkload}, SOME @{typ "('a \<times> 'b) list \<Rightarrow> ('a\<Colon>linorder,'b) rbt"})]
   52.22 +     (@{const_name rbt_del_from_left}, SOME @{typ "('a::linorder) \<Rightarrow> ('a,'b) rbt \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.23 +     (@{const_name rbt_del_from_right}, SOME @{typ "('a::linorder) \<Rightarrow> ('a,'b) rbt \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.24 +     (@{const_name rbt_del}, SOME @{typ "('a::linorder) \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.25 +     (@{const_name rbt_delete}, SOME @{typ "('a::linorder) \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.26 +     (@{const_name rbt_union_with_key}, SOME @{typ "('a::linorder \<Rightarrow> 'b \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.27 +     (@{const_name rbt_union_with}, SOME @{typ "('b \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> ('a::linorder,'b) rbt \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.28 +     (@{const_name rbt_union}, SOME @{typ "('a::linorder,'b) rbt \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.29 +     (@{const_name rbt_map_entry}, SOME @{typ "'a::linorder \<Rightarrow> ('b \<Rightarrow> 'b) \<Rightarrow> ('a,'b) rbt \<Rightarrow> ('a,'b) rbt"}),
   52.30 +     (@{const_name rbt_bulkload}, SOME @{typ "('a \<times> 'b) list \<Rightarrow> ('a::linorder,'b) rbt"})]
   52.31  \<close>
   52.32  
   52.33  hide_const (open) R B Empty entries keys fold gen_keys gen_entries
    53.1 --- a/src/HOL/Library/RBT_Mapping.thy	Tue Sep 01 17:25:36 2015 +0200
    53.2 +++ b/src/HOL/Library/RBT_Mapping.thy	Tue Sep 01 22:32:58 2015 +0200
    53.3 @@ -12,7 +12,7 @@
    53.4  subsection \<open>Implementation of mappings\<close>
    53.5  
    53.6  context includes rbt.lifting begin
    53.7 -lift_definition Mapping :: "('a\<Colon>linorder, 'b) rbt \<Rightarrow> ('a, 'b) mapping" is RBT.lookup .
    53.8 +lift_definition Mapping :: "('a::linorder, 'b) rbt \<Rightarrow> ('a, 'b) mapping" is RBT.lookup .
    53.9  end
   53.10  
   53.11  code_datatype Mapping
    54.1 --- a/src/HOL/Library/RBT_Set.thy	Tue Sep 01 17:25:36 2015 +0200
    54.2 +++ b/src/HOL/Library/RBT_Set.thy	Tue Sep 01 22:32:58 2015 +0200
    54.3 @@ -18,10 +18,10 @@
    54.4  
    54.5  section \<open>Definition of code datatype constructors\<close>
    54.6  
    54.7 -definition Set :: "('a\<Colon>linorder, unit) rbt \<Rightarrow> 'a set" 
    54.8 +definition Set :: "('a::linorder, unit) rbt \<Rightarrow> 'a set" 
    54.9    where "Set t = {x . RBT.lookup t x = Some ()}"
   54.10  
   54.11 -definition Coset :: "('a\<Colon>linorder, unit) rbt \<Rightarrow> 'a set" 
   54.12 +definition Coset :: "('a::linorder, unit) rbt \<Rightarrow> 'a set" 
   54.13    where [simp]: "Coset t = - Set t"
   54.14  
   54.15  
    55.1 --- a/src/HOL/Library/Sublist.thy	Tue Sep 01 17:25:36 2015 +0200
    55.2 +++ b/src/HOL/Library/Sublist.thy	Tue Sep 01 22:32:58 2015 +0200
    55.3 @@ -111,7 +111,7 @@
    55.4      assume a1: "\<exists>zs. ys = xs @ zs"
    55.5      then obtain sk :: "'a list" where sk: "ys = xs @ sk" by fastforce
    55.6      assume a2: "length xs < length ys"
    55.7 -    have f1: "\<And>v. ([]\<Colon>'a list) @ v = v" using append_Nil2 by simp
    55.8 +    have f1: "\<And>v. ([]::'a list) @ v = v" using append_Nil2 by simp
    55.9      have "[] \<noteq> sk" using a1 a2 sk less_not_refl by force
   55.10      hence "\<exists>v. xs @ hd sk # v = ys" using sk by (metis hd_Cons_tl)
   55.11      thus "\<exists>zs. ys = (xs @ [ys ! length xs]) @ zs" using f1 by fastforce
    56.1 --- a/src/HOL/Limits.thy	Tue Sep 01 17:25:36 2015 +0200
    56.2 +++ b/src/HOL/Limits.thy	Tue Sep 01 22:32:58 2015 +0200
    56.3 @@ -22,7 +22,7 @@
    56.4       (auto simp: subset_eq eventually_principal intro!: exI[of _ "max a b" for a b])
    56.5  
    56.6  lemma at_infinity_eq_at_top_bot:
    56.7 -  "(at_infinity \<Colon> real filter) = sup at_top at_bot"
    56.8 +  "(at_infinity :: real filter) = sup at_top at_bot"
    56.9    apply (simp add: filter_eq_iff eventually_sup eventually_at_infinity
   56.10                     eventually_at_top_linorder eventually_at_bot_linorder)
   56.11    apply safe
   56.12 @@ -872,7 +872,7 @@
   56.13    using assms unfolding continuous_on_def by (fast intro: tendsto_sgn)
   56.14  
   56.15  lemma filterlim_at_infinity:
   56.16 -  fixes f :: "_ \<Rightarrow> 'a\<Colon>real_normed_vector"
   56.17 +  fixes f :: "_ \<Rightarrow> 'a::real_normed_vector"
   56.18    assumes "0 \<le> c"
   56.19    shows "(LIM x F. f x :> at_infinity) \<longleftrightarrow> (\<forall>r>c. eventually (\<lambda>x. r \<le> norm (f x)) F)"
   56.20    unfolding filterlim_iff eventually_at_infinity
   56.21 @@ -983,7 +983,7 @@
   56.22  qed
   56.23  
   56.24  lemma tendsto_inverse_0:
   56.25 -  fixes x :: "_ \<Rightarrow> 'a\<Colon>real_normed_div_algebra"
   56.26 +  fixes x :: "_ \<Rightarrow> 'a::real_normed_div_algebra"
   56.27    shows "(inverse ---> (0::'a)) at_infinity"
   56.28    unfolding tendsto_Zfun_iff diff_0_right Zfun_def eventually_at_infinity
   56.29  proof safe
   56.30 @@ -1041,7 +1041,7 @@
   56.31    unfolding filterlim_def at_top_to_right filtermap_filtermap ..
   56.32  
   56.33  lemma filterlim_inverse_at_infinity:
   56.34 -  fixes x :: "_ \<Rightarrow> 'a\<Colon>{real_normed_div_algebra, division_ring}"
   56.35 +  fixes x :: "_ \<Rightarrow> 'a::{real_normed_div_algebra, division_ring}"
   56.36    shows "filterlim inverse at_infinity (at (0::'a))"
   56.37    unfolding filterlim_at_infinity[OF order_refl]
   56.38  proof safe
   56.39 @@ -1053,7 +1053,7 @@
   56.40  qed
   56.41  
   56.42  lemma filterlim_inverse_at_iff:
   56.43 -  fixes g :: "'a \<Rightarrow> 'b\<Colon>{real_normed_div_algebra, division_ring}"
   56.44 +  fixes g :: "'a \<Rightarrow> 'b::{real_normed_div_algebra, division_ring}"
   56.45    shows "(LIM x F. inverse (g x) :> at 0) \<longleftrightarrow> (LIM x F. g x :> at_infinity)"
   56.46    unfolding filterlim_def filtermap_filtermap[symmetric]
   56.47  proof
   56.48 @@ -1078,7 +1078,7 @@
   56.49  
   56.50  
   56.51  lemma at_to_infinity:
   56.52 -  fixes x :: "'a \<Colon> {real_normed_field,field}"
   56.53 +  fixes x :: "'a :: {real_normed_field,field}"
   56.54    shows "(at (0::'a)) = filtermap inverse at_infinity"
   56.55  proof (rule antisym)
   56.56    have "(inverse ---> (0::'a)) at_infinity"
   56.57 @@ -1226,7 +1226,7 @@
   56.58  qed
   56.59  
   56.60  lemma tendsto_divide_0:
   56.61 -  fixes f :: "_ \<Rightarrow> 'a\<Colon>{real_normed_div_algebra, division_ring}"
   56.62 +  fixes f :: "_ \<Rightarrow> 'a::{real_normed_div_algebra, division_ring}"
   56.63    assumes f: "(f ---> c) F"
   56.64    assumes g: "LIM x F. g x :> at_infinity"
   56.65    shows "((\<lambda>x. f x / g x) ---> 0) F"
    57.1 --- a/src/HOL/List.thy	Tue Sep 01 17:25:36 2015 +0200
    57.2 +++ b/src/HOL/List.thy	Tue Sep 01 22:32:58 2015 +0200
    57.3 @@ -6280,19 +6280,19 @@
    57.4    by auto
    57.5  
    57.6  lemma all_nat_less_eq [code_unfold]:
    57.7 -  "(\<forall>m<n\<Colon>nat. P m) \<longleftrightarrow> (\<forall>m \<in> {0..<n}. P m)"
    57.8 +  "(\<forall>m<n::nat. P m) \<longleftrightarrow> (\<forall>m \<in> {0..<n}. P m)"
    57.9    by auto
   57.10  
   57.11  lemma ex_nat_less_eq [code_unfold]:
   57.12 -  "(\<exists>m<n\<Colon>nat. P m) \<longleftrightarrow> (\<exists>m \<in> {0..<n}. P m)"
   57.13 +  "(\<exists>m<n::nat. P m) \<longleftrightarrow> (\<exists>m \<in> {0..<n}. P m)"
   57.14    by auto
   57.15  
   57.16  lemma all_nat_less [code_unfold]:
   57.17 -  "(\<forall>m\<le>n\<Colon>nat. P m) \<longleftrightarrow> (\<forall>m \<in> {0..n}. P m)"
   57.18 +  "(\<forall>m\<le>n::nat. P m) \<longleftrightarrow> (\<forall>m \<in> {0..n}. P m)"
   57.19    by auto
   57.20  
   57.21  lemma ex_nat_less [code_unfold]:
   57.22 -  "(\<exists>m\<le>n\<Colon>nat. P m) \<longleftrightarrow> (\<exists>m \<in> {0..n}. P m)"
   57.23 +  "(\<exists>m\<le>n::nat. P m) \<longleftrightarrow> (\<exists>m \<in> {0..n}. P m)"
   57.24    by auto
   57.25  
   57.26  text\<open>Bounded @{text LEAST} operator:\<close>
    58.1 --- a/src/HOL/MacLaurin.thy	Tue Sep 01 17:25:36 2015 +0200
    58.2 +++ b/src/HOL/MacLaurin.thy	Tue Sep 01 22:32:58 2015 +0200
    58.3 @@ -83,7 +83,7 @@
    58.4      by (cases n) (simp add: n)
    58.5  
    58.6    obtain B where f_h: "f h =
    58.7 -        (\<Sum>m<n. diff m (0\<Colon>real) / (fact m) * h ^ m) + B * (h ^ n / (fact n))"
    58.8 +        (\<Sum>m<n. diff m (0::real) / (fact m) * h ^ m) + B * (h ^ n / (fact n))"
    58.9      using Maclaurin_lemma [OF h] ..
   58.10  
   58.11    def g \<equiv> "(\<lambda>t. f t -
   58.12 @@ -99,8 +99,8 @@
   58.13    have difg_0: "difg 0 = g"
   58.14      unfolding difg_def g_def by (simp add: diff_0)
   58.15  
   58.16 -  have difg_Suc: "\<forall>(m\<Colon>nat) t\<Colon>real.
   58.17 -        m < n \<and> (0\<Colon>real) \<le> t \<and> t \<le> h \<longrightarrow> DERIV (difg m) t :> difg (Suc m) t"
   58.18 +  have difg_Suc: "\<forall>(m::nat) t::real.
   58.19 +        m < n \<and> (0::real) \<le> t \<and> t \<le> h \<longrightarrow> DERIV (difg m) t :> difg (Suc m) t"
   58.20      using diff_Suc m unfolding difg_def by (rule Maclaurin_lemma2)
   58.21  
   58.22    have difg_eq_0: "\<forall>m<n. difg m 0 = 0"
   58.23 @@ -127,9 +127,9 @@
   58.24      proof (rule Rolle)
   58.25        show "0 < h" by fact
   58.26        show "difg 0 0 = difg 0 h" by (simp add: difg_0 g2)
   58.27 -      show "\<forall>x. 0 \<le> x \<and> x \<le> h \<longrightarrow> isCont (difg (0\<Colon>nat)) x"
   58.28 +      show "\<forall>x. 0 \<le> x \<and> x \<le> h \<longrightarrow> isCont (difg (0::nat)) x"
   58.29          by (simp add: isCont_difg n)
   58.30 -      show "\<forall>x. 0 < x \<and> x < h \<longrightarrow> difg (0\<Colon>nat) differentiable (at x)"
   58.31 +      show "\<forall>x. 0 < x \<and> x < h \<longrightarrow> difg (0::nat) differentiable (at x)"
   58.32          by (simp add: differentiable_difg n)
   58.33      qed
   58.34    next
    59.1 --- a/src/HOL/Matrix_LP/Matrix.thy	Tue Sep 01 17:25:36 2015 +0200
    59.2 +++ b/src/HOL/Matrix_LP/Matrix.thy	Tue Sep 01 22:32:58 2015 +0200
    59.3 @@ -1290,7 +1290,7 @@
    59.4    le_matrix_def: "A \<le> B \<longleftrightarrow> (\<forall>j i. Rep_matrix A j i \<le> Rep_matrix B j i)"
    59.5  
    59.6  definition
    59.7 -  less_def: "A < (B\<Colon>'a matrix) \<longleftrightarrow> A \<le> B \<and> \<not> B \<le> A"
    59.8 +  less_def: "A < (B::'a matrix) \<longleftrightarrow> A \<le> B \<and> \<not> B \<le> A"
    59.9  
   59.10  instance ..
   59.11  
   59.12 @@ -1496,7 +1496,7 @@
   59.13  begin
   59.14  
   59.15  definition
   59.16 -  abs_matrix_def: "abs (A \<Colon> 'a matrix) = sup A (- A)"
   59.17 +  abs_matrix_def: "abs (A :: 'a matrix) = sup A (- A)"
   59.18  
   59.19  instance ..
   59.20  
    60.1 --- a/src/HOL/Matrix_LP/SparseMatrix.thy	Tue Sep 01 17:25:36 2015 +0200
    60.2 +++ b/src/HOL/Matrix_LP/SparseMatrix.thy	Tue Sep 01 22:32:58 2015 +0200
    60.3 @@ -834,14 +834,14 @@
    60.4  
    60.5  lemma bool1: "(\<not> True) = False"  by blast
    60.6  lemma bool2: "(\<not> False) = True"  by blast
    60.7 -lemma bool3: "((P\<Colon>bool) \<and> True) = P" by blast
    60.8 -lemma bool4: "(True \<and> (P\<Colon>bool)) = P" by blast
    60.9 -lemma bool5: "((P\<Colon>bool) \<and> False) = False" by blast
   60.10 -lemma bool6: "(False \<and> (P\<Colon>bool)) = False" by blast
   60.11 -lemma bool7: "((P\<Colon>bool) \<or> True) = True" by blast
   60.12 -lemma bool8: "(True \<or> (P\<Colon>bool)) = True" by blast
   60.13 -lemma bool9: "((P\<Colon>bool) \<or> False) = P" by blast
   60.14 -lemma bool10: "(False \<or> (P\<Colon>bool)) = P" by blast
   60.15 +lemma bool3: "((P::bool) \<and> True) = P" by blast
   60.16 +lemma bool4: "(True \<and> (P::bool)) = P" by blast
   60.17 +lemma bool5: "((P::bool) \<and> False) = False" by blast
   60.18 +lemma bool6: "(False \<and> (P::bool)) = False" by blast
   60.19 +lemma bool7: "((P::bool) \<or> True) = True" by blast
   60.20 +lemma bool8: "(True \<or> (P::bool)) = True" by blast
   60.21 +lemma bool9: "((P::bool) \<or> False) = P" by blast
   60.22 +lemma bool10: "(False \<or> (P::bool)) = P" by blast
   60.23  lemmas boolarith = bool1 bool2 bool3 bool4 bool5 bool6 bool7 bool8 bool9 bool10
   60.24  
   60.25  lemma if_case_eq: "(if b then x else y) = (case b of True => x | False => y)" by simp
    61.1 --- a/src/HOL/Meson.thy	Tue Sep 01 17:25:36 2015 +0200
    61.2 +++ b/src/HOL/Meson.thy	Tue Sep 01 22:32:58 2015 +0200
    61.3 @@ -182,7 +182,7 @@
    61.4  definition skolem :: "'a \<Rightarrow> 'a" where
    61.5  "skolem = (\<lambda>x. x)"
    61.6  
    61.7 -lemma skolem_COMBK_iff: "P \<longleftrightarrow> skolem (COMBK P (i\<Colon>nat))"
    61.8 +lemma skolem_COMBK_iff: "P \<longleftrightarrow> skolem (COMBK P (i::nat))"
    61.9  unfolding skolem_def COMBK_def by (rule refl)
   61.10  
   61.11  lemmas skolem_COMBK_I = iffD1 [OF skolem_COMBK_iff]
    62.1 --- a/src/HOL/Metis_Examples/Big_O.thy	Tue Sep 01 17:25:36 2015 +0200
    62.2 +++ b/src/HOL/Metis_Examples/Big_O.thy	Tue Sep 01 22:32:58 2015 +0200
    62.3 @@ -16,11 +16,11 @@
    62.4  
    62.5  subsection {* Definitions *}
    62.6  
    62.7 -definition bigo :: "('a => 'b\<Colon>linordered_idom) => ('a => 'b) set" ("(1O'(_'))") where
    62.8 -  "O(f\<Colon>('a => 'b)) == {h. \<exists>c. \<forall>x. abs (h x) <= c * abs (f x)}"
    62.9 +definition bigo :: "('a => 'b::linordered_idom) => ('a => 'b) set" ("(1O'(_'))") where
   62.10 +  "O(f::('a => 'b)) == {h. \<exists>c. \<forall>x. abs (h x) <= c * abs (f x)}"
   62.11  
   62.12  lemma bigo_pos_const:
   62.13 -  "(\<exists>c\<Colon>'a\<Colon>linordered_idom.
   62.14 +  "(\<exists>c::'a::linordered_idom.
   62.15      \<forall>x. abs (h x) \<le> c * abs (f x))
   62.16      \<longleftrightarrow> (\<exists>c. 0 < c \<and> (\<forall>x. abs(h x) \<le> c * abs (f x)))"
   62.17    by (metis (no_types) abs_ge_zero
   62.18 @@ -32,7 +32,7 @@
   62.19  sledgehammer_params [isar_proofs, compress = 1]
   62.20  
   62.21  lemma
   62.22 -  "(\<exists>c\<Colon>'a\<Colon>linordered_idom.
   62.23 +  "(\<exists>c::'a::linordered_idom.
   62.24      \<forall>x. abs (h x) \<le> c * abs (f x))
   62.25      \<longleftrightarrow> (\<exists>c. 0 < c \<and> (\<forall>x. abs(h x) \<le> c * abs (f x)))"
   62.26    apply auto
   62.27 @@ -42,19 +42,19 @@
   62.28  proof -
   62.29    fix c :: 'a and x :: 'b
   62.30    assume A1: "\<forall>x. \<bar>h x\<bar> \<le> c * \<bar>f x\<bar>"
   62.31 -  have F1: "\<forall>x\<^sub>1\<Colon>'a\<Colon>linordered_idom. 0 \<le> \<bar>x\<^sub>1\<bar>" by (metis abs_ge_zero)
   62.32 -  have F2: "\<forall>x\<^sub>1\<Colon>'a\<Colon>linordered_idom. 1 * x\<^sub>1 = x\<^sub>1" by (metis mult_1)
   62.33 +  have F1: "\<forall>x\<^sub>1::'a::linordered_idom. 0 \<le> \<bar>x\<^sub>1\<bar>" by (metis abs_ge_zero)
   62.34 +  have F2: "\<forall>x\<^sub>1::'a::linordered_idom. 1 * x\<^sub>1 = x\<^sub>1" by (metis mult_1)
   62.35    have F3: "\<forall>x\<^sub>1 x\<^sub>3. x\<^sub>3 \<le> \<bar>h x\<^sub>1\<bar> \<longrightarrow> x\<^sub>3 \<le> c * \<bar>f x\<^sub>1\<bar>" by (metis A1 order_trans)
   62.36 -  have F4: "\<forall>x\<^sub>2 x\<^sub>3\<Colon>'a\<Colon>linordered_idom. \<bar>x\<^sub>3\<bar> * \<bar>x\<^sub>2\<bar> = \<bar>x\<^sub>3 * x\<^sub>2\<bar>"
   62.37 +  have F4: "\<forall>x\<^sub>2 x\<^sub>3::'a::linordered_idom. \<bar>x\<^sub>3\<bar> * \<bar>x\<^sub>2\<bar> = \<bar>x\<^sub>3 * x\<^sub>2\<bar>"
   62.38      by (metis abs_mult)
   62.39 -  have F5: "\<forall>x\<^sub>3 x\<^sub>1\<Colon>'a\<Colon>linordered_idom. 0 \<le> x\<^sub>1 \<longrightarrow> \<bar>x\<^sub>3 * x\<^sub>1\<bar> = \<bar>x\<^sub>3\<bar> * x\<^sub>1"
   62.40 +  have F5: "\<forall>x\<^sub>3 x\<^sub>1::'a::linordered_idom. 0 \<le> x\<^sub>1 \<longrightarrow> \<bar>x\<^sub>3 * x\<^sub>1\<bar> = \<bar>x\<^sub>3\<bar> * x\<^sub>1"
   62.41      by (metis abs_mult_pos)
   62.42 -  hence "\<forall>x\<^sub>1\<ge>0. \<bar>x\<^sub>1\<Colon>'a\<Colon>linordered_idom\<bar> = \<bar>1\<bar> * x\<^sub>1" by (metis F2)
   62.43 -  hence "\<forall>x\<^sub>1\<ge>0. \<bar>x\<^sub>1\<Colon>'a\<Colon>linordered_idom\<bar> = x\<^sub>1" by (metis F2 abs_one)
   62.44 +  hence "\<forall>x\<^sub>1\<ge>0. \<bar>x\<^sub>1::'a::linordered_idom\<bar> = \<bar>1\<bar> * x\<^sub>1" by (metis F2)
   62.45 +  hence "\<forall>x\<^sub>1\<ge>0. \<bar>x\<^sub>1::'a::linordered_idom\<bar> = x\<^sub>1" by (metis F2 abs_one)
   62.46    hence "\<forall>x\<^sub>3. 0 \<le> \<bar>h x\<^sub>3\<bar> \<longrightarrow> \<bar>c * \<bar>f x\<^sub>3\<bar>\<bar> = c * \<bar>f x\<^sub>3\<bar>" by (metis F3)
   62.47    hence "\<forall>x\<^sub>3. \<bar>c * \<bar>f x\<^sub>3\<bar>\<bar> = c * \<bar>f x\<^sub>3\<bar>" by (metis F1)
   62.48 -  hence "\<forall>x\<^sub>3. (0\<Colon>'a) \<le> \<bar>f x\<^sub>3\<bar> \<longrightarrow> c * \<bar>f x\<^sub>3\<bar> = \<bar>c\<bar> * \<bar>f x\<^sub>3\<bar>" by (metis F5)
   62.49 -  hence "\<forall>x\<^sub>3. (0\<Colon>'a) \<le> \<bar>f x\<^sub>3\<bar> \<longrightarrow> c * \<bar>f x\<^sub>3\<bar> = \<bar>c * f x\<^sub>3\<bar>" by (metis F4)
   62.50 +  hence "\<forall>x\<^sub>3. (0::'a) \<le> \<bar>f x\<^sub>3\<bar> \<longrightarrow> c * \<bar>f x\<^sub>3\<bar> = \<bar>c\<bar> * \<bar>f x\<^sub>3\<bar>" by (metis F5)
   62.51 +  hence "\<forall>x\<^sub>3. (0::'a) \<le> \<bar>f x\<^sub>3\<bar> \<longrightarrow> c * \<bar>f x\<^sub>3\<bar> = \<bar>c * f x\<^sub>3\<bar>" by (metis F4)
   62.52    hence "\<forall>x\<^sub>3. c * \<bar>f x\<^sub>3\<bar> = \<bar>c * f x\<^sub>3\<bar>" by (metis F1)
   62.53    hence "\<bar>h x\<bar> \<le> \<bar>c * f x\<bar>" by (metis A1)
   62.54    thus "\<bar>h x\<bar> \<le> \<bar>c\<bar> * \<bar>f x\<bar>" by (metis F4)
   62.55 @@ -63,7 +63,7 @@
   62.56  sledgehammer_params [isar_proofs, compress = 2]
   62.57  
   62.58  lemma
   62.59 -  "(\<exists>c\<Colon>'a\<Colon>linordered_idom.
   62.60 +  "(\<exists>c::'a::linordered_idom.
   62.61      \<forall>x. abs (h x) \<le> c * abs (f x))
   62.62      \<longleftrightarrow> (\<exists>c. 0 < c \<and> (\<forall>x. abs(h x) \<le> c * abs (f x)))"
   62.63    apply auto
   62.64 @@ -73,10 +73,10 @@
   62.65  proof -
   62.66    fix c :: 'a and x :: 'b
   62.67    assume A1: "\<forall>x. \<bar>h x\<bar> \<le> c * \<bar>f x\<bar>"
   62.68 -  have F1: "\<forall>x\<^sub>1\<Colon>'a\<Colon>linordered_idom. 1 * x\<^sub>1 = x\<^sub>1" by (metis mult_1)
   62.69 -  have F2: "\<forall>x\<^sub>2 x\<^sub>3\<Colon>'a\<Colon>linordered_idom. \<bar>x\<^sub>3\<bar> * \<bar>x\<^sub>2\<bar> = \<bar>x\<^sub>3 * x\<^sub>2\<bar>"
   62.70 +  have F1: "\<forall>x\<^sub>1::'a::linordered_idom. 1 * x\<^sub>1 = x\<^sub>1" by (metis mult_1)
   62.71 +  have F2: "\<forall>x\<^sub>2 x\<^sub>3::'a::linordered_idom. \<bar>x\<^sub>3\<bar> * \<bar>x\<^sub>2\<bar> = \<bar>x\<^sub>3 * x\<^sub>2\<bar>"
   62.72      by (metis abs_mult)
   62.73 -  have "\<forall>x\<^sub>1\<ge>0. \<bar>x\<^sub>1\<Colon>'a\<Colon>linordered_idom\<bar> = x\<^sub>1" by (metis F1 abs_mult_pos abs_one)
   62.74 +  have "\<forall>x\<^sub>1\<ge>0. \<bar>x\<^sub>1::'a::linordered_idom\<bar> = x\<^sub>1" by (metis F1 abs_mult_pos abs_one)
   62.75    hence "\<forall>x\<^sub>3. \<bar>c * \<bar>f x\<^sub>3\<bar>\<bar> = c * \<bar>f x\<^sub>3\<bar>" by (metis A1 abs_ge_zero order_trans)
   62.76    hence "\<forall>x\<^sub>3. 0 \<le> \<bar>f x\<^sub>3\<bar> \<longrightarrow> c * \<bar>f x\<^sub>3\<bar> = \<bar>c * f x\<^sub>3\<bar>" by (metis F2 abs_mult_pos)
   62.77    hence "\<bar>h x\<bar> \<le> \<bar>c * f x\<bar>" by (metis A1 abs_ge_zero)
   62.78 @@ -86,7 +86,7 @@
   62.79  sledgehammer_params [isar_proofs, compress = 3]
   62.80  
   62.81  lemma
   62.82 -  "(\<exists>c\<Colon>'a\<Colon>linordered_idom.
   62.83 +  "(\<exists>c::'a::linordered_idom.
   62.84      \<forall>x. abs (h x) \<le> c * abs (f x))
   62.85      \<longleftrightarrow> (\<exists>c. 0 < c \<and> (\<forall>x. abs(h x) \<le> c * abs (f x)))"
   62.86    apply auto
   62.87 @@ -96,9 +96,9 @@
   62.88  proof -
   62.89    fix c :: 'a and x :: 'b
   62.90    assume A1: "\<forall>x. \<bar>h x\<bar> \<le> c * \<bar>f x\<bar>"
   62.91 -  have F1: "\<forall>x\<^sub>1\<Colon>'a\<Colon>linordered_idom. 1 * x\<^sub>1 = x\<^sub>1" by (metis mult_1)
   62.92 -  have F2: "\<forall>x\<^sub>3 x\<^sub>1\<Colon>'a\<Colon>linordered_idom. 0 \<le> x\<^sub>1 \<longrightarrow> \<bar>x\<^sub>3 * x\<^sub>1\<bar> = \<bar>x\<^sub>3\<bar> * x\<^sub>1" by (metis abs_mult_pos)
   62.93 -  hence "\<forall>x\<^sub>1\<ge>0. \<bar>x\<^sub>1\<Colon>'a\<Colon>linordered_idom\<bar> = x\<^sub>1" by (metis F1 abs_one)
   62.94 +  have F1: "\<forall>x\<^sub>1::'a::linordered_idom. 1 * x\<^sub>1 = x\<^sub>1" by (metis mult_1)
   62.95 +  have F2: "\<forall>x\<^sub>3 x\<^sub>1::'a::linordered_idom. 0 \<le> x\<^sub>1 \<longrightarrow> \<bar>x\<^sub>3 * x\<^sub>1\<bar> = \<bar>x\<^sub>3\<bar> * x\<^sub>1" by (metis abs_mult_pos)
   62.96 +  hence "\<forall>x\<^sub>1\<ge>0. \<bar>x\<^sub>1::'a::linordered_idom\<bar> = x\<^sub>1" by (metis F1 abs_one)
   62.97    hence "\<forall>x\<^sub>3. 0 \<le> \<bar>f x\<^sub>3\<bar> \<longrightarrow> c * \<bar>f x\<^sub>3\<bar> = \<bar>c\<bar> * \<bar>f x\<^sub>3\<bar>" by (metis F2 A1 abs_ge_zero order_trans)
   62.98    thus "\<bar>h x\<bar> \<le> \<bar>c\<bar> * \<bar>f x\<bar>" by (metis A1 abs_ge_zero)
   62.99  qed
  62.100 @@ -106,7 +106,7 @@
  62.101  sledgehammer_params [isar_proofs, compress = 4]
  62.102  
  62.103  lemma
  62.104 -  "(\<exists>c\<Colon>'a\<Colon>linordered_idom.
  62.105 +  "(\<exists>c::'a::linordered_idom.
  62.106      \<forall>x. abs (h x) \<le> c * abs (f x))
  62.107      \<longleftrightarrow> (\<exists>c. 0 < c \<and> (\<forall>x. abs(h x) \<le> c * abs (f x)))"
  62.108    apply auto
  62.109 @@ -116,7 +116,7 @@
  62.110  proof -
  62.111    fix c :: 'a and x :: 'b
  62.112    assume A1: "\<forall>x. \<bar>h x\<bar> \<le> c * \<bar>f x\<bar>"
  62.113 -  have "\<forall>x\<^sub>1\<Colon>'a\<Colon>linordered_idom. 1 * x\<^sub>1 = x\<^sub>1" by (metis mult_1)
  62.114 +  have "\<forall>x\<^sub>1::'a::linordered_idom. 1 * x\<^sub>1 = x\<^sub>1" by (metis mult_1)
  62.115    hence "\<forall>x\<^sub>3. \<bar>c * \<bar>f x\<^sub>3\<bar>\<bar> = c * \<bar>f x\<^sub>3\<bar>"
  62.116      by (metis A1 abs_ge_zero order_trans abs_mult_pos abs_one)
  62.117    hence "\<bar>h x\<bar> \<le> \<bar>c * f x\<bar>" by (metis A1 abs_ge_zero abs_mult_pos abs_mult)
  62.118 @@ -321,7 +321,7 @@
  62.119  by (metis bigo_mult2 set_plus_mono_b set_times_intro2 set_times_plus_distrib)
  62.120  
  62.121  lemma bigo_mult5: "\<forall>x. f x ~= 0 \<Longrightarrow>
  62.122 -    O(f * g) <= (f\<Colon>'a => ('b\<Colon>linordered_field)) *o O(g)"
  62.123 +    O(f * g) <= (f::'a => ('b::linordered_field)) *o O(g)"
  62.124  proof -
  62.125    assume a: "\<forall>x. f x ~= 0"
  62.126    show "O(f * g) <= f *o O(g)"
  62.127 @@ -334,31 +334,31 @@
  62.128        by (rule bigo_mult2)
  62.129      also have "(\<lambda>x. 1 / f x) * (f * g) = g"
  62.130        by (simp add: fun_eq_iff a)
  62.131 -    finally have "(\<lambda>x. (1\<Colon>'b) / f x) * h : O(g)".
  62.132 -    then have "f * ((\<lambda>x. (1\<Colon>'b) / f x) * h) : f *o O(g)"
  62.133 +    finally have "(\<lambda>x. (1::'b) / f x) * h : O(g)".
  62.134 +    then have "f * ((\<lambda>x. (1::'b) / f x) * h) : f *o O(g)"
  62.135        by auto
  62.136 -    also have "f * ((\<lambda>x. (1\<Colon>'b) / f x) * h) = h"
  62.137 +    also have "f * ((\<lambda>x. (1::'b) / f x) * h) = h"
  62.138        by (simp add: func_times fun_eq_iff a)
  62.139      finally show "h : f *o O(g)".
  62.140    qed
  62.141  qed
  62.142  
  62.143  lemma bigo_mult6:
  62.144 -"\<forall>x. f x \<noteq> 0 \<Longrightarrow> O(f * g) = (f\<Colon>'a \<Rightarrow> ('b\<Colon>linordered_field)) *o O(g)"
  62.145 +"\<forall>x. f x \<noteq> 0 \<Longrightarrow> O(f * g) = (f::'a \<Rightarrow> ('b::linordered_field)) *o O(g)"
  62.146  by (metis bigo_mult2 bigo_mult5 order_antisym)
  62.147  
  62.148  (*proof requires relaxing relevance: 2007-01-25*)
  62.149  declare bigo_mult6 [simp]
  62.150  
  62.151  lemma bigo_mult7:
  62.152 -"\<forall>x. f x \<noteq> 0 \<Longrightarrow> O(f * g) \<le> O(f\<Colon>'a \<Rightarrow> ('b\<Colon>linordered_field)) * O(g)"
  62.153 +"\<forall>x. f x \<noteq> 0 \<Longrightarrow> O(f * g) \<le> O(f::'a \<Rightarrow> ('b::linordered_field)) * O(g)"
  62.154  by (metis bigo_refl bigo_mult6 set_times_mono3)
  62.155  
  62.156  declare bigo_mult6 [simp del]
  62.157  declare bigo_mult7 [intro!]
  62.158  
  62.159  lemma bigo_mult8:
  62.160 -"\<forall>x. f x \<noteq> 0 \<Longrightarrow> O(f * g) = O(f\<Colon>'a \<Rightarrow> ('b\<Colon>linordered_field)) * O(g)"
  62.161 +"\<forall>x. f x \<noteq> 0 \<Longrightarrow> O(f * g) = O(f::'a \<Rightarrow> ('b::linordered_field)) * O(g)"
  62.162  by (metis bigo_mult bigo_mult7 order_antisym_conv)
  62.163  
  62.164  lemma bigo_minus [intro]: "f : O(g) \<Longrightarrow> - f : O(g)"
  62.165 @@ -397,14 +397,14 @@
  62.166  lemma bigo_const2 [intro]: "O(\<lambda>x. c) \<le> O(\<lambda>x. 1)"
  62.167  by (metis bigo_const1 bigo_elt_subset)
  62.168  
  62.169 -lemma bigo_const3: "(c\<Colon>'a\<Colon>linordered_field) ~= 0 \<Longrightarrow> (\<lambda>x. 1) : O(\<lambda>x. c)"
  62.170 +lemma bigo_const3: "(c::'a::linordered_field) ~= 0 \<Longrightarrow> (\<lambda>x. 1) : O(\<lambda>x. c)"
  62.171  apply (simp add: bigo_def)
  62.172  by (metis abs_eq_0 left_inverse order_refl)
  62.173  
  62.174 -lemma bigo_const4: "(c\<Colon>'a\<Colon>linordered_field) ~= 0 \<Longrightarrow> O(\<lambda>x. 1) <= O(\<lambda>x. c)"
  62.175 +lemma bigo_const4: "(c::'a::linordered_field) ~= 0 \<Longrightarrow> O(\<lambda>x. 1) <= O(\<lambda>x. c)"
  62.176  by (metis bigo_elt_subset bigo_const3)
  62.177  
  62.178 -lemma bigo_const [simp]: "(c\<Colon>'a\<Colon>linordered_field) ~= 0 \<Longrightarrow>
  62.179 +lemma bigo_const [simp]: "(c::'a::linordered_field) ~= 0 \<Longrightarrow>
  62.180      O(\<lambda>x. c) = O(\<lambda>x. 1)"
  62.181  by (metis bigo_const2 bigo_const4 equalityI)
  62.182  
  62.183 @@ -415,19 +415,19 @@
  62.184  lemma bigo_const_mult2: "O(\<lambda>x. c * f x) \<le> O(f)"
  62.185  by (rule bigo_elt_subset, rule bigo_const_mult1)
  62.186  
  62.187 -lemma bigo_const_mult3: "(c\<Colon>'a\<Colon>linordered_field) ~= 0 \<Longrightarrow> f : O(\<lambda>x. c * f x)"
  62.188 +lemma bigo_const_mult3: "(c::'a::linordered_field) ~= 0 \<Longrightarrow> f : O(\<lambda>x. c * f x)"
  62.189  apply (simp add: bigo_def)
  62.190  by (metis (no_types) abs_mult mult.assoc mult_1 order_refl left_inverse)
  62.191  
  62.192  lemma bigo_const_mult4:
  62.193 -"(c\<Colon>'a\<Colon>linordered_field) \<noteq> 0 \<Longrightarrow> O(f) \<le> O(\<lambda>x. c * f x)"
  62.194 +"(c::'a::linordered_field) \<noteq> 0 \<Longrightarrow> O(f) \<le> O(\<lambda>x. c * f x)"
  62.195  by (metis bigo_elt_subset bigo_const_mult3)
  62.196  
  62.197 -lemma bigo_const_mult [simp]: "(c\<Colon>'a\<Colon>linordered_field) ~= 0 \<Longrightarrow>
  62.198 +lemma bigo_const_mult [simp]: "(c::'a::linordered_field) ~= 0 \<Longrightarrow>
  62.199      O(\<lambda>x. c * f x) = O(f)"
  62.200  by (metis equalityI bigo_const_mult2 bigo_const_mult4)
  62.201  
  62.202 -lemma bigo_const_mult5 [simp]: "(c\<Colon>'a\<Colon>linordered_field) ~= 0 \<Longrightarrow>
  62.203 +lemma bigo_const_mult5 [simp]: "(c::'a::linordered_field) ~= 0 \<Longrightarrow>
  62.204      (\<lambda>x. c) *o O(f) = O(f)"
  62.205    apply (auto del: subsetI)
  62.206    apply (rule order_trans)
  62.207 @@ -444,20 +444,20 @@
  62.208    (* couldn't get this proof without the step above *)
  62.209  proof -
  62.210    fix g :: "'b \<Rightarrow> 'a" and d :: 'a
  62.211 -  assume A1: "c \<noteq> (0\<Colon>'a)"
  62.212 -  assume A2: "\<forall>x\<Colon>'b. \<bar>g x\<bar> \<le> d * \<bar>f x\<bar>"
  62.213 +  assume A1: "c \<noteq> (0::'a)"
  62.214 +  assume A2: "\<forall>x::'b. \<bar>g x\<bar> \<le> d * \<bar>f x\<bar>"
  62.215    have F1: "inverse \<bar>c\<bar> = \<bar>inverse c\<bar>" using A1 by (metis nonzero_abs_inverse)
  62.216 -  have F2: "(0\<Colon>'a) < \<bar>c\<bar>" using A1 by (metis zero_less_abs_iff)
  62.217 -  have "(0\<Colon>'a) < \<bar>c\<bar> \<longrightarrow> (0\<Colon>'a) < \<bar>inverse c\<bar>" using F1 by (metis positive_imp_inverse_positive)
  62.218 -  hence "(0\<Colon>'a) < \<bar>inverse c\<bar>" using F2 by metis
  62.219 -  hence F3: "(0\<Colon>'a) \<le> \<bar>inverse c\<bar>" by (metis order_le_less)
  62.220 -  have "\<exists>(u\<Colon>'a) SKF\<^sub>7\<Colon>'a \<Rightarrow> 'b. \<bar>g (SKF\<^sub>7 (\<bar>inverse c\<bar> * u))\<bar> \<le> u * \<bar>f (SKF\<^sub>7 (\<bar>inverse c\<bar> * u))\<bar>"
  62.221 +  have F2: "(0::'a) < \<bar>c\<bar>" using A1 by (metis zero_less_abs_iff)
  62.222 +  have "(0::'a) < \<bar>c\<bar> \<longrightarrow> (0::'a) < \<bar>inverse c\<bar>" using F1 by (metis positive_imp_inverse_positive)
  62.223 +  hence "(0::'a) < \<bar>inverse c\<bar>" using F2 by metis
  62.224 +  hence F3: "(0::'a) \<le> \<bar>inverse c\<bar>" by (metis order_le_less)
  62.225 +  have "\<exists>(u::'a) SKF\<^sub>7::'a \<Rightarrow> 'b. \<bar>g (SKF\<^sub>7 (\<bar>inverse c\<bar> * u))\<bar> \<le> u * \<bar>f (SKF\<^sub>7 (\<bar>inverse c\<bar> * u))\<bar>"
  62.226      using A2 by metis
  62.227 -  hence F4: "\<exists>(u\<Colon>'a) SKF\<^sub>7\<Colon>'a \<Rightarrow> 'b. \<bar>g (SKF\<^sub>7 (\<bar>inverse c\<bar> * u))\<bar> \<le> u * \<bar>f (SKF\<^sub>7 (\<bar>inverse c\<bar> * u))\<bar> \<and> (0\<Colon>'a) \<le> \<bar>inverse c\<bar>"
  62.228 +  hence F4: "\<exists>(u::'a) SKF\<^sub>7::'a \<Rightarrow> 'b. \<bar>g (SKF\<^sub>7 (\<bar>inverse c\<bar> * u))\<bar> \<le> u * \<bar>f (SKF\<^sub>7 (\<bar>inverse c\<bar> * u))\<bar> \<and> (0::'a) \<le> \<bar>inverse c\<bar>"
  62.229      using F3 by metis
  62.230 -  hence "\<exists>(v\<Colon>'a) (u\<Colon>'a) SKF\<^sub>7\<Colon>'a \<Rightarrow> 'b. \<bar>inverse c\<bar> * \<bar>g (SKF\<^sub>7 (u * v))\<bar> \<le> u * (v * \<bar>f (SKF\<^sub>7 (u * v))\<bar>)"
  62.231 +  hence "\<exists>(v::'a) (u::'a) SKF\<^sub>7::'a \<Rightarrow> 'b. \<bar>inverse c\<bar> * \<bar>g (SKF\<^sub>7 (u * v))\<bar> \<le> u * (v * \<bar>f (SKF\<^sub>7 (u * v))\<bar>)"
  62.232      by (metis mult_left_mono)
  62.233 -  then show "\<exists>ca\<Colon>'a. \<forall>x\<Colon>'b. inverse \<bar>c\<bar> * \<bar>g x\<bar> \<le> ca * \<bar>f x\<bar>"
  62.234 +  then show "\<exists>ca::'a. \<forall>x::'b. inverse \<bar>c\<bar> * \<bar>g x\<bar> \<le> ca * \<bar>f x\<bar>"
  62.235      using A2 F4 by (metis F1 `0 < \<bar>inverse c\<bar>` linordered_field_class.sign_simps(23) mult_le_cancel_left_pos)
  62.236  qed
  62.237  
  62.238 @@ -582,7 +582,7 @@
  62.239    apply assumption+
  62.240  done
  62.241  
  62.242 -lemma bigo_useful_const_mult: "(c\<Colon>'a\<Colon>linordered_field) ~= 0 \<Longrightarrow>
  62.243 +lemma bigo_useful_const_mult: "(c::'a::linordered_field) ~= 0 \<Longrightarrow>
  62.244      (\<lambda>x. c) * f =o O(h) \<Longrightarrow> f =o O(h)"
  62.245    apply (rule subsetD)
  62.246    apply (subgoal_tac "(\<lambda>x. 1 / c) *o O(h) <= O(h)")
  62.247 @@ -594,13 +594,13 @@
  62.248    apply (simp add: func_times)
  62.249  done
  62.250  
  62.251 -lemma bigo_fix: "(\<lambda>x. f ((x\<Colon>nat) + 1)) =o O(\<lambda>x. h(x + 1)) \<Longrightarrow> f 0 = 0 \<Longrightarrow>
  62.252 +lemma bigo_fix: "(\<lambda>x. f ((x::nat) + 1)) =o O(\<lambda>x. h(x + 1)) \<Longrightarrow> f 0 = 0 \<Longrightarrow>
  62.253      f =o O(h)"
  62.254  apply (simp add: bigo_alt_def)
  62.255  by (metis abs_ge_zero abs_mult abs_of_pos abs_zero not0_implies_Suc)
  62.256  
  62.257  lemma bigo_fix2:
  62.258 -    "(\<lambda>x. f ((x\<Colon>nat) + 1)) =o (\<lambda>x. g(x + 1)) +o O(\<lambda>x. h(x + 1)) \<Longrightarrow>
  62.259 +    "(\<lambda>x. f ((x::nat) + 1)) =o (\<lambda>x. g(x + 1)) +o O(\<lambda>x. h(x + 1)) \<Longrightarrow>
  62.260         f 0 = g 0 \<Longrightarrow> f =o g +o O(h)"
  62.261    apply (rule set_minus_imp_plus)
  62.262    apply (rule bigo_fix)
  62.263 @@ -613,7 +613,7 @@
  62.264  
  62.265  subsection {* Less than or equal to *}
  62.266  
  62.267 -definition lesso :: "('a => 'b\<Colon>linordered_idom) => ('a => 'b) => ('a => 'b)" (infixl "<o" 70) where
  62.268 +definition lesso :: "('a => 'b::linordered_idom) => ('a => 'b) => ('a => 'b)" (infixl "<o" 70) where
  62.269    "f <o g == (\<lambda>x. max (f x - g x) 0)"
  62.270  
  62.271  lemma bigo_lesseq1: "f =o O(h) \<Longrightarrow> \<forall>x. abs (g x) <= abs (f x) \<Longrightarrow>
  62.272 @@ -691,7 +691,7 @@
  62.273  by (metis abs_ge_zero linorder_linear max.absorb1 max.commute)
  62.274  
  62.275  lemma bigo_lesso4:
  62.276 -  "f <o g =o O(k\<Colon>'a=>'b\<Colon>{linordered_field}) \<Longrightarrow>
  62.277 +  "f <o g =o O(k::'a=>'b::{linordered_field}) \<Longrightarrow>
  62.278     g =o h +o O(k) \<Longrightarrow> f <o h =o O(k)"
  62.279  apply (unfold lesso_def)
  62.280  apply (drule set_plus_imp_minus)
    63.1 --- a/src/HOL/Metis_Examples/Clausification.thy	Tue Sep 01 17:25:36 2015 +0200
    63.2 +++ b/src/HOL/Metis_Examples/Clausification.thy	Tue Sep 01 22:32:58 2015 +0200
    63.3 @@ -140,7 +140,7 @@
    63.4  lemma ex_tl: "EX ys. tl ys = xs"
    63.5  using list.sel(3) by fast
    63.6  
    63.7 -lemma "(\<exists>ys\<Colon>nat list. tl ys = xs) \<and> (\<exists>bs\<Colon>int list. tl bs = as)"
    63.8 +lemma "(\<exists>ys::nat list. tl ys = xs) \<and> (\<exists>bs::int list. tl bs = as)"
    63.9  by (metis ex_tl)
   63.10  
   63.11  end
    64.1 --- a/src/HOL/Metis_Examples/Message.thy	Tue Sep 01 17:25:36 2015 +0200
    64.2 +++ b/src/HOL/Metis_Examples/Message.thy	Tue Sep 01 22:32:58 2015 +0200
    64.3 @@ -707,7 +707,7 @@
    64.4    have F2: "\<forall>x\<^sub>1. parts x\<^sub>1 \<union> synth (analz x\<^sub>1) = parts (synth (analz x\<^sub>1))"
    64.5      by (metis parts_analz parts_synth)
    64.6    have F3: "X \<in> synth (analz H)" using A1 by metis
    64.7 -  have "\<forall>x\<^sub>2 x\<^sub>1\<Colon>msg set. x\<^sub>1 \<le> sup x\<^sub>1 x\<^sub>2" by (metis inf_sup_ord(3))
    64.8 +  have "\<forall>x\<^sub>2 x\<^sub>1::msg set. x\<^sub>1 \<le> sup x\<^sub>1 x\<^sub>2" by (metis inf_sup_ord(3))
    64.9    hence F4: "\<forall>x\<^sub>1. analz x\<^sub>1 \<subseteq> analz (synth x\<^sub>1)" by (metis analz_synth)
   64.10    have F5: "X \<in> synth (analz H)" using F3 by metis
   64.11    have "\<forall>x\<^sub>1. analz x\<^sub>1 \<subseteq> synth (analz x\<^sub>1)
    65.1 --- a/src/HOL/Metis_Examples/Proxies.thy	Tue Sep 01 17:25:36 2015 +0200
    65.2 +++ b/src/HOL/Metis_Examples/Proxies.thy	Tue Sep 01 22:32:58 2015 +0200
    65.3 @@ -19,7 +19,7 @@
    65.4  
    65.5  text {* Extensionality and set constants *}
    65.6  
    65.7 -lemma plus_1_not_0: "n + (1\<Colon>nat) \<noteq> 0"
    65.8 +lemma plus_1_not_0: "n + (1::nat) \<noteq> 0"
    65.9  by simp
   65.10  
   65.11  definition inc :: "nat \<Rightarrow> nat" where
   65.12 @@ -40,7 +40,7 @@
   65.13  sledgehammer [expect = some] (add_swap_def)
   65.14  by (metis_exhaust add_swap_def)
   65.15  
   65.16 -definition "A = {xs\<Colon>'a list. True}"
   65.17 +definition "A = {xs::'a list. True}"
   65.18  
   65.19  lemma "xs \<in> A"
   65.20  (* The "add:" argument is unfortunate. *)
    66.1 --- a/src/HOL/Metis_Examples/Sets.thy	Tue Sep 01 17:25:36 2015 +0200
    66.2 +++ b/src/HOL/Metis_Examples/Sets.thy	Tue Sep 01 22:32:58 2015 +0200
    66.3 @@ -27,47 +27,47 @@
    66.4  lemma (*equal_union: *)
    66.5     "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
    66.6  proof -
    66.7 -  have F1: "\<forall>(x\<^sub>2\<Colon>'b set) x\<^sub>1\<Colon>'b set. x\<^sub>1 \<subseteq> x\<^sub>1 \<union> x\<^sub>2" by (metis Un_commute Un_upper2)
    66.8 -  have F2a: "\<forall>(x\<^sub>2\<Colon>'b set) x\<^sub>1\<Colon>'b set. x\<^sub>1 \<subseteq> x\<^sub>2 \<longrightarrow> x\<^sub>2 = x\<^sub>2 \<union> x\<^sub>1" by (metis Un_commute subset_Un_eq)
    66.9 -  have F2: "\<forall>(x\<^sub>2\<Colon>'b set) x\<^sub>1\<Colon>'b set. x\<^sub>1 \<subseteq> x\<^sub>2 \<and> x\<^sub>2 \<subseteq> x\<^sub>1 \<longrightarrow> x\<^sub>1 = x\<^sub>2" by (metis F2a subset_Un_eq)
   66.10 +  have F1: "\<forall>(x\<^sub>2::'b set) x\<^sub>1::'b set. x\<^sub>1 \<subseteq> x\<^sub>1 \<union> x\<^sub>2" by (metis Un_commute Un_upper2)
   66.11 +  have F2a: "\<forall>(x\<^sub>2::'b set) x\<^sub>1::'b set. x\<^sub>1 \<subseteq> x\<^sub>2 \<longrightarrow> x\<^sub>2 = x\<^sub>2 \<union> x\<^sub>1" by (metis Un_commute subset_Un_eq)
   66.12 +  have F2: "\<forall>(x\<^sub>2::'b set) x\<^sub>1::'b set. x\<^sub>1 \<subseteq> x\<^sub>2 \<and> x\<^sub>2 \<subseteq> x\<^sub>1 \<longrightarrow> x\<^sub>1 = x\<^sub>2" by (metis F2a subset_Un_eq)
   66.13    { assume "\<not> Z \<subseteq> X"
   66.14 -    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.15 +    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.16    moreover
   66.17    { assume AA1: "Y \<union> Z \<noteq> X"
   66.18      { assume "\<not> Y \<subseteq> X"
   66.19 -      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis F1) }
   66.20 +      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis F1) }
   66.21      moreover
   66.22      { assume AAA1: "Y \<subseteq> X \<and> Y \<union> Z \<noteq> X"
   66.23        { assume "\<not> Z \<subseteq> X"
   66.24 -        hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.25 +        hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.26        moreover
   66.27        { assume "(Z \<subseteq> X \<and> Y \<subseteq> X) \<and> Y \<union> Z \<noteq> X"
   66.28          hence "Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z" by (metis Un_subset_iff)
   66.29          hence "Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> Y \<union> Z" by (metis F2)
   66.30 -        hence "\<exists>x\<^sub>1\<Colon>'a set. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z" by (metis F1)
   66.31 -        hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.32 -      ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AAA1) }
   66.33 -    ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AA1) }
   66.34 +        hence "\<exists>x\<^sub>1::'a set. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z" by (metis F1)
   66.35 +        hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.36 +      ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AAA1) }
   66.37 +    ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AA1) }
   66.38    moreover
   66.39 -  { assume "\<exists>x\<^sub>1\<Colon>'a set. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1"
   66.40 +  { assume "\<exists>x\<^sub>1::'a set. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1"
   66.41      { assume "\<not> Y \<subseteq> X"
   66.42 -      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis F1) }
   66.43 +      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis F1) }
   66.44      moreover
   66.45      { assume AAA1: "Y \<subseteq> X \<and> Y \<union> Z \<noteq> X"
   66.46        { assume "\<not> Z \<subseteq> X"
   66.47 -        hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.48 +        hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.49        moreover
   66.50        { assume "(Z \<subseteq> X \<and> Y \<subseteq> X) \<and> Y \<union> Z \<noteq> X"
   66.51          hence "Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z" by (metis Un_subset_iff)
   66.52          hence "Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> Y \<union> Z" by (metis F2)
   66.53 -        hence "\<exists>x\<^sub>1\<Colon>'a set. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z" by (metis F1)
   66.54 -        hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.55 -      ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AAA1) }
   66.56 -    ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by blast }
   66.57 +        hence "\<exists>x\<^sub>1::'a set. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z" by (metis F1)
   66.58 +        hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.59 +      ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AAA1) }
   66.60 +    ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by blast }
   66.61    moreover
   66.62    { assume "\<not> Y \<subseteq> X"
   66.63 -    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis F1) }
   66.64 -  ultimately show "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by metis
   66.65 +    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis F1) }
   66.66 +  ultimately show "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by metis
   66.67  qed
   66.68  
   66.69  sledgehammer_params [isar_proofs, compress = 2]
   66.70 @@ -75,36 +75,36 @@
   66.71  lemma (*equal_union: *)
   66.72     "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
   66.73  proof -
   66.74 -  have F1: "\<forall>(x\<^sub>2\<Colon>'b set) x\<^sub>1\<Colon>'b set. x\<^sub>1 \<subseteq> x\<^sub>2 \<and> x\<^sub>2 \<subseteq> x\<^sub>1 \<longrightarrow> x\<^sub>1 = x\<^sub>2" by (metis Un_commute subset_Un_eq)
   66.75 -  { assume AA1: "\<exists>x\<^sub>1\<Colon>'a set. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1"
   66.76 +  have F1: "\<forall>(x\<^sub>2::'b set) x\<^sub>1::'b set. x\<^sub>1 \<subseteq> x\<^sub>2 \<and> x\<^sub>2 \<subseteq> x\<^sub>1 \<longrightarrow> x\<^sub>1 = x\<^sub>2" by (metis Un_commute subset_Un_eq)
   66.77 +  { assume AA1: "\<exists>x\<^sub>1::'a set. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1"
   66.78      { assume AAA1: "Y \<subseteq> X \<and> Y \<union> Z \<noteq> X"
   66.79        { assume "\<not> Z \<subseteq> X"
   66.80 -        hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.81 +        hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.82        moreover
   66.83        { assume "Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z"
   66.84 -        hence "\<exists>x\<^sub>1\<Colon>'a set. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z" by (metis F1 Un_commute Un_upper2)
   66.85 -        hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.86 -      ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AAA1 Un_subset_iff) }
   66.87 +        hence "\<exists>x\<^sub>1::'a set. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z" by (metis F1 Un_commute Un_upper2)
   66.88 +        hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.89 +      ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AAA1 Un_subset_iff) }
   66.90      moreover
   66.91      { assume "\<not> Y \<subseteq> X"
   66.92 -      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_commute Un_upper2) }
   66.93 -    ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AA1 Un_subset_iff) }
   66.94 +      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_commute Un_upper2) }
   66.95 +    ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AA1 Un_subset_iff) }
   66.96    moreover
   66.97    { assume "\<not> Z \<subseteq> X"
   66.98 -    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
   66.99 +    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
  66.100    moreover
  66.101    { assume "\<not> Y \<subseteq> X"
  66.102 -    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_commute Un_upper2) }
  66.103 +    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_commute Un_upper2) }
  66.104    moreover
  66.105    { assume AA1: "Y \<subseteq> X \<and> Y \<union> Z \<noteq> X"
  66.106      { assume "\<not> Z \<subseteq> X"
  66.107 -      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
  66.108 +      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
  66.109      moreover
  66.110      { assume "Y \<union> Z \<subseteq> X \<and> X \<noteq> Y \<union> Z"
  66.111 -      hence "\<exists>x\<^sub>1\<Colon>'a set. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z" by (metis F1 Un_commute Un_upper2)
  66.112 -      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
  66.113 -    ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AA1 Un_subset_iff) }
  66.114 -  ultimately show "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by metis
  66.115 +      hence "\<exists>x\<^sub>1::'a set. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z" by (metis F1 Un_commute Un_upper2)
  66.116 +      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
  66.117 +    ultimately have "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AA1 Un_subset_iff) }
  66.118 +  ultimately show "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by metis
  66.119  qed
  66.120  
  66.121  sledgehammer_params [isar_proofs, compress = 3]
  66.122 @@ -112,16 +112,16 @@
  66.123  lemma (*equal_union: *)
  66.124     "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
  66.125  proof -
  66.126 -  have F1a: "\<forall>(x\<^sub>2\<Colon>'b set) x\<^sub>1\<Colon>'b set. x\<^sub>1 \<subseteq> x\<^sub>2 \<longrightarrow> x\<^sub>2 = x\<^sub>2 \<union> x\<^sub>1" by (metis Un_commute subset_Un_eq)
  66.127 -  have F1: "\<forall>(x\<^sub>2\<Colon>'b set) x\<^sub>1\<Colon>'b set. x\<^sub>1 \<subseteq> x\<^sub>2 \<and> x\<^sub>2 \<subseteq> x\<^sub>1 \<longrightarrow> x\<^sub>1 = x\<^sub>2" by (metis F1a subset_Un_eq)
  66.128 +  have F1a: "\<forall>(x\<^sub>2::'b set) x\<^sub>1::'b set. x\<^sub>1 \<subseteq> x\<^sub>2 \<longrightarrow> x\<^sub>2 = x\<^sub>2 \<union> x\<^sub>1" by (metis Un_commute subset_Un_eq)
  66.129 +  have F1: "\<forall>(x\<^sub>2::'b set) x\<^sub>1::'b set. x\<^sub>1 \<subseteq> x\<^sub>2 \<and> x\<^sub>2 \<subseteq> x\<^sub>1 \<longrightarrow> x\<^sub>1 = x\<^sub>2" by (metis F1a subset_Un_eq)
  66.130    { assume "(Z \<subseteq> X \<and> Y \<subseteq> X) \<and> Y \<union> Z \<noteq> X"
  66.131 -    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis F1 Un_commute Un_subset_iff Un_upper2) }
  66.132 +    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis F1 Un_commute Un_subset_iff Un_upper2) }
  66.133    moreover
  66.134 -  { assume AA1: "\<exists>x\<^sub>1\<Colon>'a set. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1"
  66.135 +  { assume AA1: "\<exists>x\<^sub>1::'a set. (Z \<subseteq> x\<^sub>1 \<and> Y \<subseteq> x\<^sub>1) \<and> \<not> X \<subseteq> x\<^sub>1"
  66.136      { assume "(Z \<subseteq> X \<and> Y \<subseteq> X) \<and> Y \<union> Z \<noteq> X"
  66.137 -      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis F1 Un_commute Un_subset_iff Un_upper2) }
  66.138 -    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AA1 Un_commute Un_subset_iff Un_upper2) }
  66.139 -  ultimately show "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_commute Un_upper2)
  66.140 +      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis F1 Un_commute Un_subset_iff Un_upper2) }
  66.141 +    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AA1 Un_commute Un_subset_iff Un_upper2) }
  66.142 +  ultimately show "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_commute Un_upper2)
  66.143  qed
  66.144  
  66.145  sledgehammer_params [isar_proofs, compress = 4]
  66.146 @@ -129,15 +129,15 @@
  66.147  lemma (*equal_union: *)
  66.148     "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))"
  66.149  proof -
  66.150 -  have F1: "\<forall>(x\<^sub>2\<Colon>'b set) x\<^sub>1\<Colon>'b set. x\<^sub>1 \<subseteq> x\<^sub>2 \<and> x\<^sub>2 \<subseteq> x\<^sub>1 \<longrightarrow> x\<^sub>1 = x\<^sub>2" by (metis Un_commute subset_Un_eq)
  66.151 +  have F1: "\<forall>(x\<^sub>2::'b set) x\<^sub>1::'b set. x\<^sub>1 \<subseteq> x\<^sub>2 \<and> x\<^sub>2 \<subseteq> x\<^sub>1 \<longrightarrow> x\<^sub>1 = x\<^sub>2" by (metis Un_commute subset_Un_eq)
  66.152    { assume "\<not> Y \<subseteq> X"
  66.153 -    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_commute Un_upper2) }
  66.154 +    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_commute Un_upper2) }
  66.155    moreover
  66.156    { assume AA1: "Y \<subseteq> X \<and> Y \<union> Z \<noteq> X"
  66.157 -    { assume "\<exists>x\<^sub>1\<Colon>'a set. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z"
  66.158 -      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
  66.159 -    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AA1 F1 Un_commute Un_subset_iff Un_upper2) }
  66.160 -  ultimately show "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V\<Colon>'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_subset_iff Un_upper2)
  66.161 +    { assume "\<exists>x\<^sub>1::'a set. Y \<subseteq> x\<^sub>1 \<union> Z \<and> Y \<union> Z \<noteq> X \<and> \<not> X \<subseteq> x\<^sub>1 \<union> Z"
  66.162 +      hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_upper2) }
  66.163 +    hence "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis AA1 F1 Un_commute Un_subset_iff Un_upper2) }
  66.164 +  ultimately show "(X = Y \<union> Z) = (Y \<subseteq> X \<and> Z \<subseteq> X \<and> (\<forall>V::'a set. Y \<subseteq> V \<and> Z \<subseteq> V \<longrightarrow> X \<subseteq> V))" by (metis Un_subset_iff Un_upper2)
  66.165  qed
  66.166  
  66.167  sledgehammer_params [isar_proofs, compress = 1]
  66.168 @@ -154,8 +154,8 @@
  66.169  
  66.170  lemma (* fixedpoint: *) "\<exists>!x. f (g x) = x \<Longrightarrow> \<exists>!y. g (f y) = y"
  66.171  proof -
  66.172 -  assume "\<exists>!x\<Colon>'a. f (g x) = x"
  66.173 -  thus "\<exists>!y\<Colon>'b. g (f y) = y" by metis
  66.174 +  assume "\<exists>!x::'a. f (g x) = x"
  66.175 +  thus "\<exists>!y::'b. g (f y) = y" by metis
  66.176  qed
  66.177  
  66.178  lemma (* singleton_example_2: *)
  66.179 @@ -172,8 +172,8 @@
  66.180    assume "\<forall>x \<in> S. \<Union>S \<subseteq> x"
  66.181    hence "\<forall>x\<^sub>1. x\<^sub>1 \<subseteq> \<Union>S \<and> x\<^sub>1 \<in> S \<longrightarrow> x\<^sub>1 = \<Union>S" by (metis set_eq_subset)
  66.182    hence "\<forall>x\<^sub>1. x\<^sub>1 \<in> S \<longrightarrow> x\<^sub>1 = \<Union>S" by (metis Union_upper)
  66.183 -  hence "\<forall>x\<^sub>1\<Colon>('a set) set. \<Union>S \<in> x\<^sub>1 \<longrightarrow> S \<subseteq> x\<^sub>1" by (metis subsetI)
  66.184 -  hence "\<forall>x\<^sub>1\<Colon>('a set) set. S \<subseteq> insert (\<Union>S) x\<^sub>1" by (metis insert_iff)
  66.185 +  hence "\<forall>x\<^sub>1::('a set) set. \<Union>S \<in> x\<^sub>1 \<longrightarrow> S \<subseteq> x\<^sub>1" by (metis subsetI)
  66.186 +  hence "\<forall>x\<^sub>1::('a set) set. S \<subseteq> insert (\<Union>S) x\<^sub>1" by (metis insert_iff)
  66.187    thus "\<exists>z. S \<subseteq> {z}" by metis
  66.188  qed
  66.189  
    67.1 --- a/src/HOL/Metis_Examples/Type_Encodings.thy	Tue Sep 01 17:25:36 2015 +0200
    67.2 +++ b/src/HOL/Metis_Examples/Type_Encodings.thy	Tue Sep 01 22:32:58 2015 +0200
    67.3 @@ -89,7 +89,7 @@
    67.4  lemma "P (null xs) \<Longrightarrow> null xs \<Longrightarrow> xs = []"
    67.5  by (metis_exhaust null_def)
    67.6  
    67.7 -lemma "(0\<Colon>nat) + 0 = 0"
    67.8 +lemma "(0::nat) + 0 = 0"
    67.9  by (metis_exhaust add_0_left)
   67.10  
   67.11  end
    68.1 --- a/src/HOL/MicroJava/Comp/LemmasComp.thy	Tue Sep 01 17:25:36 2015 +0200
    68.2 +++ b/src/HOL/MicroJava/Comp/LemmasComp.thy	Tue Sep 01 22:32:58 2015 +0200
    68.3 @@ -311,10 +311,10 @@
    68.4       apply (simp add: map_of_map [symmetric])
    68.5       apply (simp add: split_beta)
    68.6       apply (simp add: Fun.comp_def split_beta)
    68.7 -     apply (subgoal_tac "(\<lambda>x\<Colon>(vname list \<times> fdecl list \<times> stmt \<times> expr) mdecl.
    68.8 +     apply (subgoal_tac "(\<lambda>x::(vname list \<times> fdecl list \<times> stmt \<times> expr) mdecl.
    68.9                          (fst x, Object,
   68.10                           snd (compMethod G Object
   68.11 -                         (inv (\<lambda>(s\<Colon>sig, m\<Colon>ty \<times> vname list \<times> fdecl list \<times> stmt \<times> expr).
   68.12 +                         (inv (\<lambda>(s::sig, m::ty \<times> vname list \<times> fdecl list \<times> stmt \<times> expr).
   68.13                             (s, Object, m))
   68.14                             (S, Object, snd x)))))
   68.15                          = (\<lambda>x. (fst x, Object, fst (snd x),
    69.1 --- a/src/HOL/MicroJava/Comp/TypeInf.thy	Tue Sep 01 17:25:36 2015 +0200
    69.2 +++ b/src/HOL/MicroJava/Comp/TypeInf.thy	Tue Sep 01 22:32:58 2015 +0200
    69.3 @@ -108,9 +108,9 @@
    69.4  (* Uniqueness of types property *)
    69.5  
    69.6  lemma uniqueness_of_types: "
    69.7 -  (\<forall> (E\<Colon>'a prog \<times> (vname \<Rightarrow> ty option)) T1 T2. 
    69.8 +  (\<forall> (E::'a prog \<times> (vname \<Rightarrow> ty option)) T1 T2. 
    69.9    E\<turnstile>e :: T1 \<longrightarrow> E\<turnstile>e :: T2 \<longrightarrow> T1 = T2) \<and>
   69.10 -  (\<forall> (E\<Colon>'a prog \<times> (vname \<Rightarrow> ty option)) Ts1 Ts2. 
   69.11 +  (\<forall> (E::'a prog \<times> (vname \<Rightarrow> ty option)) Ts1 Ts2. 
   69.12    E\<turnstile>es [::] Ts1 \<longrightarrow> E\<turnstile>es [::] Ts2 \<longrightarrow> Ts1 = Ts2)"
   69.13    apply (rule compat_expr_expr_list.induct)
   69.14              (* NewC *)
    70.1 --- a/src/HOL/Multivariate_Analysis/Cartesian_Euclidean_Space.thy	Tue Sep 01 17:25:36 2015 +0200
    70.2 +++ b/src/HOL/Multivariate_Analysis/Cartesian_Euclidean_Space.thy	Tue Sep 01 22:32:58 2015 +0200
    70.3 @@ -61,7 +61,7 @@
    70.4  text\<open>The ordering on one-dimensional vectors is linear.\<close>
    70.5  
    70.6  class cart_one =
    70.7 -  assumes UNIV_one: "card (UNIV \<Colon> 'a set) = Suc 0"
    70.8 +  assumes UNIV_one: "card (UNIV :: 'a set) = Suc 0"
    70.9  begin
   70.10  
   70.11  subclass finite
   70.12 @@ -690,7 +690,7 @@
   70.13      { fix y
   70.14        have "?P y"
   70.15        proof (rule span_induct_alt[of ?P "columns A", folded scalar_mult_eq_scaleR])
   70.16 -        show "\<exists>x\<Colon>real ^ 'm. setsum (\<lambda>i. (x$i) *s column i A) ?U = 0"
   70.17 +        show "\<exists>x::real ^ 'm. setsum (\<lambda>i. (x$i) *s column i A) ?U = 0"
   70.18            by (rule exI[where x=0], simp)
   70.19        next
   70.20          fix c y1 y2
    71.1 --- a/src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy	Tue Sep 01 17:25:36 2015 +0200
    71.2 +++ b/src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy	Tue Sep 01 22:32:58 2015 +0200
    71.3 @@ -3706,7 +3706,7 @@
    71.4    shows "affine hull (insert 0 d) = {x::'a::euclidean_space. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x\<bullet>i = 0}"
    71.5    (is "affine hull (insert 0 ?A) = ?B")
    71.6  proof -
    71.7 -  have *: "\<And>A. op + (0\<Colon>'a) ` A = A" "\<And>A. op + (- (0\<Colon>'a)) ` A = A"
    71.8 +  have *: "\<And>A. op + (0::'a) ` A = A" "\<And>A. op + (- (0::'a)) ` A = A"
    71.9      by auto
   71.10    show ?thesis
   71.11      unfolding affine_hull_insert_span_gen span_substd_basis[OF assms,symmetric] * ..
    72.1 --- a/src/HOL/Multivariate_Analysis/Derivative.thy	Tue Sep 01 17:25:36 2015 +0200
    72.2 +++ b/src/HOL/Multivariate_Analysis/Derivative.thy	Tue Sep 01 22:32:58 2015 +0200
    72.3 @@ -2178,7 +2178,7 @@
    72.4    apply auto
    72.5    done
    72.6  
    72.7 -text \<open>Considering derivative @{typ "real \<Rightarrow> 'b\<Colon>real_normed_vector"} as a vector.\<close>
    72.8 +text \<open>Considering derivative @{typ "real \<Rightarrow> 'b::real_normed_vector"} as a vector.\<close>
    72.9  
   72.10  definition "vector_derivative f net = (SOME f'. (f has_vector_derivative f') net)"
   72.11  
    73.1 --- a/src/HOL/Multivariate_Analysis/Integration.thy	Tue Sep 01 17:25:36 2015 +0200
    73.2 +++ b/src/HOL/Multivariate_Analysis/Integration.thy	Tue Sep 01 22:32:58 2015 +0200
    73.3 @@ -7948,7 +7948,7 @@
    73.4      using assms by auto
    73.5    have *: "a \<le> x"
    73.6      using assms(5) by auto
    73.7 -  have "((\<lambda>x. 0\<Colon>'a) has_integral f x - f a) {a .. x}"
    73.8 +  have "((\<lambda>x. 0::'a) has_integral f x - f a) {a .. x}"
    73.9      apply (rule fundamental_theorem_of_calculus_interior_strong[OF assms(1) *])
   73.10      apply (rule continuous_on_subset[OF assms(2)])
   73.11      defer
    74.1 --- a/src/HOL/Multivariate_Analysis/Ordered_Euclidean_Space.thy	Tue Sep 01 17:25:36 2015 +0200
    74.2 +++ b/src/HOL/Multivariate_Analysis/Ordered_Euclidean_Space.thy	Tue Sep 01 22:32:58 2015 +0200
    74.3 @@ -177,7 +177,7 @@
    74.4  text\<open>Instantiation for intervals on @{text ordered_euclidean_space}\<close>
    74.5  
    74.6  lemma
    74.7 -  fixes a :: "'a\<Colon>ordered_euclidean_space"
    74.8 +  fixes a :: "'a::ordered_euclidean_space"
    74.9    shows cbox_interval: "cbox a b = {a..b}"
   74.10      and interval_cbox: "{a..b} = cbox a b"
   74.11      and eucl_le_atMost: "{x. \<forall>i\<in>Basis. x \<bullet> i <= a \<bullet> i} = {..a}"
   74.12 @@ -185,17 +185,17 @@
   74.13      by (auto simp: eucl_le[where 'a='a] eucl_less_def box_def cbox_def)
   74.14  
   74.15  lemma closed_eucl_atLeastAtMost[simp, intro]:
   74.16 -  fixes a :: "'a\<Colon>ordered_euclidean_space"
   74.17 +  fixes a :: "'a::ordered_euclidean_space"
   74.18    shows "closed {a..b}"
   74.19    by (simp add: cbox_interval[symmetric] closed_cbox)
   74.20  
   74.21  lemma closed_eucl_atMost[simp, intro]:
   74.22 -  fixes a :: "'a\<Colon>ordered_euclidean_space"
   74.23 +  fixes a :: "'a::ordered_euclidean_space"
   74.24    shows "closed {..a}"
   74.25    by (simp add: eucl_le_atMost[symmetric])
   74.26  
   74.27  lemma closed_eucl_atLeast[simp, intro]:
   74.28 -  fixes a :: "'a\<Colon>ordered_euclidean_space"
   74.29 +  fixes a :: "'a::ordered_euclidean_space"
   74.30    shows "closed {a..}"
   74.31    by (simp add: eucl_le_atLeast[symmetric])
   74.32  
    75.1 --- a/src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy	Tue Sep 01 17:25:36 2015 +0200
    75.2 +++ b/src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy	Tue Sep 01 22:32:58 2015 +0200
    75.3 @@ -869,7 +869,7 @@
    75.4    unfolding set_eq_iff and Int_iff and mem_box by auto
    75.5  
    75.6  lemma rational_boxes:
    75.7 -  fixes x :: "'a\<Colon>euclidean_space"
    75.8 +  fixes x :: "'a::euclidean_space"
    75.9    assumes "e > 0"
   75.10    shows "\<exists>a b. (\<forall>i\<in>Basis. a \<bullet> i \<in> \<rat> \<and> b \<bullet> i \<in> \<rat> ) \<and> x \<in> box a b \<and> box a b \<subseteq> ball x e"
   75.11  proof -
   75.12 @@ -926,7 +926,7 @@
   75.13  qed
   75.14  
   75.15  lemma open_UNION_box:
   75.16 -  fixes M :: "'a\<Colon>euclidean_space set"
   75.17 +  fixes M :: "'a::euclidean_space set"
   75.18    assumes "open M"
   75.19    defines "a' \<equiv> \<lambda>f :: 'a \<Rightarrow> real \<times> real. (\<Sum>(i::'a)\<in>Basis. fst (f i) *\<^sub>R i)"
   75.20    defines "b' \<equiv> \<lambda>f :: 'a \<Rightarrow> real \<times> real. (\<Sum>(i::'a)\<in>Basis. snd (f i) *\<^sub>R i)"
   75.21 @@ -6677,25 +6677,25 @@
   75.22       simp: euclidean_dist_l2[where 'a='a] cbox_def dist_norm)
   75.23  
   75.24  lemma eucl_less_eq_halfspaces:
   75.25 -  fixes a :: "'a\<Colon>euclidean_space"
   75.26 +  fixes a :: "'a::euclidean_space"
   75.27    shows "{x. x <e a} = (\<Inter>i\<in>Basis. {x. x \<bullet> i < a \<bullet> i})"
   75.28      "{x. a <e x} = (\<Inter>i\<in>Basis. {x. a \<bullet> i < x \<bullet> i})"
   75.29    by (auto simp: eucl_less_def)
   75.30  
   75.31  lemma eucl_le_eq_halfspaces:
   75.32 -  fixes a :: "'a\<Colon>euclidean_space"
   75.33 +  fixes a :: "'a::euclidean_space"
   75.34    shows "{x. \<forall>i\<in>Basis. x \<bullet> i \<le> a \<bullet> i} = (\<Inter>i\<in>Basis. {x. x \<bullet> i \<le> a \<bullet> i})"
   75.35      "{x. \<forall>i\<in>Basis. a \<bullet> i \<le> x \<bullet> i} = (\<Inter>i\<in>Basis. {x. a \<bullet> i \<le> x \<bullet> i})"
   75.36    by auto
   75.37  
   75.38  lemma open_Collect_eucl_less[simp, intro]:
   75.39 -  fixes a :: "'a\<Colon>euclidean_space"
   75.40 +  fixes a :: "'a::euclidean_space"
   75.41    shows "open {x. x <e a}"
   75.42      "open {x. a <e x}"
   75.43    by (auto simp: eucl_less_eq_halfspaces open_halfspace_component_lt open_halfspace_component_gt)
   75.44  
   75.45  lemma closed_Collect_eucl_le[simp, intro]:
   75.46 -  fixes a :: "'a\<Colon>euclidean_space"
   75.47 +  fixes a :: "'a::euclidean_space"
   75.48    shows "closed {x. \<forall>i\<in>Basis. a \<bullet> i \<le> x \<bullet> i}"
   75.49      "closed {x. \<forall>i\<in>Basis. x \<bullet> i \<le> a \<bullet> i}"
   75.50    unfolding eucl_le_eq_halfspaces
    76.1 --- a/src/HOL/NSA/NSA.thy	Tue Sep 01 17:25:36 2015 +0200
    76.2 +++ b/src/HOL/NSA/NSA.thy	Tue Sep 01 22:32:58 2015 +0200
    76.3 @@ -104,11 +104,11 @@
    76.4  by transfer (rule norm_power)
    76.5  
    76.6  lemma hnorm_one [simp]:
    76.7 -  "hnorm (1\<Colon>'a::real_normed_div_algebra star) = 1"
    76.8 +  "hnorm (1::'a::real_normed_div_algebra star) = 1"
    76.9  by transfer (rule norm_one)
   76.10  
   76.11  lemma hnorm_zero [simp]:
   76.12 -  "hnorm (0\<Colon>'a::real_normed_vector star) = 0"
   76.13 +  "hnorm (0::'a::real_normed_vector star) = 0"
   76.14  by transfer (rule norm_zero)
   76.15  
   76.16  lemma zero_less_hnorm_iff [simp]:
    77.1 --- a/src/HOL/NSA/StarDef.thy	Tue Sep 01 17:25:36 2015 +0200
    77.2 +++ b/src/HOL/NSA/StarDef.thy	Tue Sep 01 22:32:58 2015 +0200
    77.3 @@ -927,7 +927,7 @@
    77.4      then show ?case by simp
    77.5    next
    77.6      case (Suc n)
    77.7 -    have "\<And>x::'a star. x * ( *f* (\<lambda>x\<Colon>'a. x ^ n)) x = ( *f* (\<lambda>x\<Colon>'a. x * x ^ n)) x"
    77.8 +    have "\<And>x::'a star. x * ( *f* (\<lambda>x::'a. x ^ n)) x = ( *f* (\<lambda>x::'a. x * x ^ n)) x"
    77.9        by transfer simp
   77.10      with Suc show ?case by simp
   77.11    qed
    78.1 --- a/src/HOL/Nat.thy	Tue Sep 01 17:25:36 2015 +0200
    78.2 +++ b/src/HOL/Nat.thy	Tue Sep 01 22:32:58 2015 +0200
    78.3 @@ -85,10 +85,10 @@
    78.4  done
    78.5  
    78.6  free_constructors case_nat for
    78.7 -    "0 \<Colon> nat"
    78.8 +    "0 :: nat"
    78.9    | Suc pred
   78.10  where
   78.11 -  "pred (0 \<Colon> nat) = (0 \<Colon> nat)"
   78.12 +  "pred (0 :: nat) = (0 :: nat)"
   78.13      apply atomize_elim
   78.14      apply (rename_tac n, induct_tac n rule: nat_induct0, auto)
   78.15     apply (simp add: Suc_def Nat_Abs_Nat_inject Nat_Rep_Nat Suc_RepI Suc_Rep_inject'
   78.16 @@ -99,7 +99,7 @@
   78.17  -- \<open>Avoid name clashes by prefixing the output of @{text old_rep_datatype} with @{text old}.\<close>
   78.18  setup \<open>Sign.mandatory_path "old"\<close>
   78.19  
   78.20 -old_rep_datatype "0 \<Colon> nat" Suc
   78.21 +old_rep_datatype "0 :: nat" Suc
   78.22    apply (erule nat_induct0, assumption)
   78.23   apply (rule nat.inject)
   78.24  apply (rule nat.distinct(1))
   78.25 @@ -216,7 +216,7 @@
   78.26  begin
   78.27  
   78.28  primrec plus_nat where
   78.29 -  add_0:      "0 + n = (n\<Colon>nat)"
   78.30 +  add_0:      "0 + n = (n::nat)"
   78.31  | add_Suc:  "Suc m + n = Suc (m + n)"
   78.32  
   78.33  lemma add_0_right [simp]: "m + 0 = (m::nat)"
   78.34 @@ -231,7 +231,7 @@
   78.35    by simp
   78.36  
   78.37  primrec minus_nat where
   78.38 -  diff_0 [code]: "m - 0 = (m\<Colon>nat)"
   78.39 +  diff_0 [code]: "m - 0 = (m::nat)"
   78.40  | diff_Suc: "m - Suc n = (case m - n of 0 => 0 | Suc k => k)"
   78.41  
   78.42  declare diff_Suc [simp del]
   78.43 @@ -263,7 +263,7 @@
   78.44    One_nat_def [simp]: "1 = Suc 0"
   78.45  
   78.46  primrec times_nat where
   78.47 -  mult_0:     "0 * n = (0\<Colon>nat)"
   78.48 +  mult_0: "0 * n = (0::nat)"
   78.49  | mult_Suc: "Suc m * n = n + (m * n)"
   78.50  
   78.51  lemma mult_0_right [simp]: "(m::nat) * 0 = 0"
   78.52 @@ -349,7 +349,7 @@
   78.53  
   78.54  subsubsection \<open>Difference\<close>
   78.55  
   78.56 -lemma diff_self_eq_0 [simp]: "(m\<Colon>nat) - m = 0"
   78.57 +lemma diff_self_eq_0 [simp]: "(m::nat) - m = 0"
   78.58    by (fact diff_cancel)
   78.59  
   78.60  lemma diff_diff_left: "(i::nat) - j - k = i - (j + k)"
   78.61 @@ -435,12 +435,12 @@
   78.62  begin
   78.63  
   78.64  primrec less_eq_nat where
   78.65 -  "(0\<Colon>nat) \<le> n \<longleftrightarrow> True"
   78.66 +  "(0::nat) \<le> n \<longleftrightarrow> True"
   78.67  | "Suc m \<le> n \<longleftrightarrow> (case n of 0 \<Rightarrow> False | Suc n \<Rightarrow> m \<le> n)"
   78.68  
   78.69  declare less_eq_nat.simps [simp del]
   78.70 -lemma le0 [iff]: "0 \<le> (n\<Colon>nat)" by (simp add: less_eq_nat.simps)
   78.71 -lemma [code]: "(0\<Colon>nat) \<le> n \<longleftrightarrow> True" by simp
   78.72 +lemma le0 [iff]: "0 \<le> (n::nat)" by (simp add: less_eq_nat.simps)
   78.73 +lemma [code]: "(0::nat) \<le> n \<longleftrightarrow> True" by simp
   78.74  
   78.75  definition less_nat where
   78.76    less_eq_Suc_le: "n < m \<longleftrightarrow> Suc n \<le> m"
   78.77 @@ -451,13 +451,13 @@
   78.78  lemma Suc_le_eq [code]: "Suc m \<le> n \<longleftrightarrow> m < n"
   78.79    unfolding less_eq_Suc_le ..
   78.80  
   78.81 -lemma le_0_eq [iff]: "(n\<Colon>nat) \<le> 0 \<longleftrightarrow> n = 0"
   78.82 +lemma le_0_eq [iff]: "(n::nat) \<le> 0 \<longleftrightarrow> n = 0"
   78.83    by (induct n) (simp_all add: less_eq_nat.simps(2))
   78.84  
   78.85 -lemma not_less0 [iff]: "\<not> n < (0\<Colon>nat)"
   78.86 +lemma not_less0 [iff]: "\<not> n < (0::nat)"
   78.87    by (simp add: less_eq_Suc_le)
   78.88  
   78.89 -lemma less_nat_zero_code [code]: "n < (0\<Colon>nat) \<longleftrightarrow> False"
   78.90 +lemma less_nat_zero_code [code]: "n < (0::nat) \<longleftrightarrow> False"
   78.91    by simp
   78.92  
   78.93  lemma Suc_less_eq [iff]: "Suc m < Suc n \<longleftrightarrow> m < n"
   78.94 @@ -1290,10 +1290,10 @@
   78.95  begin
   78.96  
   78.97  definition
   78.98 -  "(inf \<Colon> nat \<Rightarrow> nat \<Rightarrow> nat) = min"
   78.99 +  "(inf :: nat \<Rightarrow> nat \<Rightarrow> nat) = min"
  78.100  
  78.101  definition
  78.102 -  "(sup \<Colon> nat \<Rightarrow> nat \<Rightarrow> nat) = max"
  78.103 +  "(sup :: nat \<Rightarrow> nat \<Rightarrow> nat) = max"
  78.104  
  78.105  instance by intro_classes
  78.106    (auto simp add: inf_nat_def sup_nat_def max_def not_le min_def
  78.107 @@ -1934,7 +1934,7 @@
  78.108  
  78.109  text \<open>@{term "op dvd"} is a partial order\<close>
  78.110  
  78.111 -interpretation dvd: order "op dvd" "\<lambda>n m \<Colon> nat. n dvd m \<and> \<not> m dvd n"
  78.112 +interpretation dvd: order "op dvd" "\<lambda>n m :: nat. n dvd m \<and> \<not> m dvd n"
  78.113    proof qed (auto intro: dvd_refl dvd_trans dvd_antisym)
  78.114  
  78.115  lemma dvd_diff_nat[simp]: "[| k dvd m; k dvd n |] ==> k dvd (m-n :: nat)"
  78.116 @@ -2021,7 +2021,7 @@
  78.117  begin
  78.118  
  78.119  definition size_nat where
  78.120 -  [simp, code]: "size (n \<Colon> nat) = n"
  78.121 +  [simp, code]: "size (n::nat) = n"
  78.122  
  78.123  instance ..
  78.124  
    79.1 --- a/src/HOL/Nitpick.thy	Tue Sep 01 17:25:36 2015 +0200
    79.2 +++ b/src/HOL/Nitpick.thy	Tue Sep 01 22:32:58 2015 +0200
    79.3 @@ -72,7 +72,7 @@
    79.4  definition card' :: "'a set \<Rightarrow> nat" where
    79.5    "card' A \<equiv> if finite A then length (SOME xs. set xs = A \<and> distinct xs) else 0"
    79.6  
    79.7 -definition setsum' :: "('a \<Rightarrow> 'b\<Colon>comm_monoid_add) \<Rightarrow> 'a set \<Rightarrow> 'b" where
    79.8 +definition setsum' :: "('a \<Rightarrow> 'b::comm_monoid_add) \<Rightarrow> 'a set \<Rightarrow> 'b" where
    79.9    "setsum' f A \<equiv> if finite A then listsum (map f (SOME xs. set xs = A \<and> distinct xs)) else 0"
   79.10  
   79.11  inductive fold_graph' :: "('a \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> 'b \<Rightarrow> 'a set \<Rightarrow> 'b \<Rightarrow> bool" where
   79.12 @@ -193,7 +193,7 @@
   79.13  definition less_eq_frac :: "'a \<Rightarrow> 'a \<Rightarrow> bool" where
   79.14    [nitpick_simp]: "less_eq_frac q r \<longleftrightarrow> num (plus_frac q (uminus_frac r)) \<le> 0"
   79.15  
   79.16 -definition of_frac :: "'a \<Rightarrow> 'b\<Colon>{inverse,ring_1}" where
   79.17 +definition of_frac :: "'a \<Rightarrow> 'b::{inverse,ring_1}" where
   79.18    "of_frac q \<equiv> of_int (num q) / of_int (denom q)"
   79.19  
   79.20  axiomatization wf_wfrec :: "('a \<times> 'a) set \<Rightarrow> (('a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b) \<Rightarrow> 'a \<Rightarrow> 'b"
    80.1 --- a/src/HOL/Nitpick_Examples/Core_Nits.thy	Tue Sep 01 17:25:36 2015 +0200
    80.2 +++ b/src/HOL/Nitpick_Examples/Core_Nits.thy	Tue Sep 01 22:32:58 2015 +0200
    80.3 @@ -55,7 +55,7 @@
    80.4  nitpick [card = 1, expect = genuine]
    80.5  oops
    80.6  
    80.7 -lemma "{(a\<Colon>'a\<times>'a, b\<Colon>'b)}^-1 = {(b, a)}"
    80.8 +lemma "{(a::'a\<times>'a, b::'b)}^-1 = {(b, a)}"
    80.9  nitpick [card = 1-12, expect = none]
   80.10  by auto
   80.11  
   80.12 @@ -67,11 +67,11 @@
   80.13  nitpick [card = 1-20, expect = none]
   80.14  by auto
   80.15  
   80.16 -lemma "(a\<Colon>'a\<Rightarrow>'b, a) \<in> Id\<^sup>*"
   80.17 +lemma "(a::'a\<Rightarrow>'b, a) \<in> Id\<^sup>*"
   80.18  nitpick [card = 1-2, expect = none]
   80.19  by auto
   80.20  
   80.21 -lemma "(a\<Colon>'a\<times>'a, a) \<in> Id\<^sup>* \<union> {(a, b)}\<^sup>*"
   80.22 +lemma "(a::'a\<times>'a, a) \<in> Id\<^sup>* \<union> {(a, b)}\<^sup>*"
   80.23  nitpick [card = 1-4, expect = none]
   80.24  by auto
   80.25  
   80.26 @@ -79,11 +79,11 @@
   80.27  nitpick [card = 1-50, expect = none]
   80.28  by (auto simp: Id_def)
   80.29  
   80.30 -lemma "((a\<Colon>'a, b\<Colon>'a), (a, b)) \<in> Id"
   80.31 +lemma "((a::'a, b::'a), (a, b)) \<in> Id"
   80.32  nitpick [card = 1-10, expect = none]
   80.33  by (auto simp: Id_def)
   80.34  
   80.35 -lemma "(x\<Colon>'a\<times>'a) \<in> UNIV"
   80.36 +lemma "(x::'a\<times>'a) \<in> UNIV"
   80.37  nitpick [card = 1-50, expect = none]
   80.38  sorry
   80.39  
   80.40 @@ -112,13 +112,13 @@
   80.41  nitpick [card = 50, expect = genuine]
   80.42  oops
   80.43  
   80.44 -lemma "(a\<Colon>'a\<times>'a, a\<Colon>'a\<times>'a) \<in> R"
   80.45 +lemma "(a::'a\<times>'a, a::'a\<times>'a) \<in> R"
   80.46  nitpick [card = 1, expect = genuine]
   80.47  nitpick [card = 10, expect = genuine]
   80.48  nitpick [card = 5, dont_box, expect = genuine]
   80.49  oops
   80.50  
   80.51 -lemma "f (g\<Colon>'a\<Rightarrow>'a) = x"
   80.52 +lemma "f (g::'a\<Rightarrow>'a) = x"
   80.53  nitpick [card = 3, dont_box, expect = genuine]
   80.54  nitpick [card = 8, expect = genuine]
   80.55  oops
   80.56 @@ -131,7 +131,7 @@
   80.57  nitpick [card = 10, expect = genuine]
   80.58  oops
   80.59  
   80.60 -lemma "(x\<Colon>'a) = (\<lambda>a. \<lambda>b. \<lambda>c. if c then a else b) x x True"
   80.61 +lemma "(x::'a) = (\<lambda>a. \<lambda>b. \<lambda>c. if c then a else b) x x True"
   80.62  nitpick [card = 1-10, expect = none]
   80.63  by auto
   80.64  
   80.65 @@ -143,7 +143,7 @@
   80.66  nitpick [card = 2, expect = genuine]
   80.67  oops
   80.68  
   80.69 -lemma "(A\<Colon>'a\<times>'a, B\<Colon>'a\<times>'a) \<in> R \<Longrightarrow> (A, B) \<in> R"
   80.70 +lemma "(A::'a\<times>'a, B::'a\<times>'a) \<in> R \<Longrightarrow> (A, B) \<in> R"
   80.71  nitpick [card = 15, expect = none]
   80.72  by auto
   80.73  
   80.74 @@ -152,7 +152,7 @@
   80.75  nitpick [card = 1-25, expect = none]
   80.76  by auto
   80.77  
   80.78 -lemma "f = (\<lambda>x\<Colon>'a\<times>'b. x)"
   80.79 +lemma "f = (\<lambda>x::'a\<times>'b. x)"
   80.80  nitpick [card = 8, expect = genuine]
   80.81  oops
   80.82  
   80.83 @@ -168,16 +168,16 @@
   80.84  nitpick [card 'a = 100, expect = genuine]
   80.85  oops
   80.86  
   80.87 -lemma "\<forall>x\<Colon>'a \<Rightarrow> bool. x = y"
   80.88 +lemma "\<forall>x::'a \<Rightarrow> bool. x = y"
   80.89  nitpick [card 'a = 1, expect = genuine]
   80.90  nitpick [card 'a = 100, expect = genuine]
   80.91  oops
   80.92  
   80.93 -lemma "\<exists>x\<Colon>'a \<Rightarrow> bool. x = y"
   80.94 +lemma "\<exists>x::'a \<Rightarrow> bool. x = y"
   80.95  nitpick [card 'a = 1-15, expect = none]
   80.96  by auto
   80.97  
   80.98 -lemma "\<exists>x y\<Colon>'a \<Rightarrow> bool. x = y"
   80.99 +lemma "\<exists>x y::'a \<Rightarrow> bool. x = y"
  80.100  nitpick [card = 1-15, expect = none]
  80.101  by auto
  80.102  
  80.103 @@ -208,22 +208,22 @@
  80.104  nitpick [card = 1-2, expect = genuine]
  80.105  oops
  80.106  
  80.107 -lemma "\<forall>u\<Colon>'a \<times> 'b. \<exists>v\<Colon>'c. \<forall>w\<Colon>'d. \<exists>x\<Colon>'e \<times> 'f.
  80.108 +lemma "\<forall>u::'a \<times> 'b. \<exists>v::'c. \<forall>w::'d. \<exists>x::'e \<times> 'f.
  80.109         f u v w x = f u (g u) w (h u w)"
  80.110  nitpick [card = 1-2, expect = none]
  80.111  sorry
  80.112  
  80.113 -lemma "\<forall>u\<Colon>'a \<times> 'b. \<exists>v\<Colon>'c. \<forall>w\<Colon>'d. \<exists>x\<Colon>'e \<times> 'f.
  80.114 +lemma "\<forall>u::'a \<times> 'b. \<exists>v::'c. \<forall>w::'d. \<exists>x::'e \<times> 'f.
  80.115         f u v w x = f u (g u w) w (h u)"
  80.116  nitpick [card = 1-2, dont_box, expect = genuine]
  80.117  oops
  80.118  
  80.119 -lemma "\<forall>u\<Colon>'a \<Rightarrow> 'b. \<exists>v\<Colon>'c. \<forall>w\<Colon>'d. \<exists>x\<Colon>'e \<Rightarrow> 'f.
  80.120 +lemma "\<forall>u::'a \<Rightarrow> 'b. \<exists>v::'c. \<forall>w::'d. \<exists>x::'e \<Rightarrow> 'f.
  80.121         f u v w x = f u (g u) w (h u w)"
  80.122  nitpick [card = 1-2, dont_box, expect = none]
  80.123  sorry
  80.124  
  80.125 -lemma "\<forall>u\<Colon>'a \<Rightarrow> 'b. \<exists>v\<Colon>'c. \<forall>w\<Colon>'d. \<exists>x\<Colon>'e \<Rightarrow> 'f.
  80.126 +lemma "\<forall>u::'a \<Rightarrow> 'b. \<exists>v::'c. \<forall>w::'d. \<exists>x::'e \<Rightarrow> 'f.
  80.127         f u v w x = f u (g u w) w (h u)"
  80.128  nitpick [card = 1-2, dont_box, expect = genuine]
  80.129  oops
  80.130 @@ -233,7 +233,7 @@
  80.131  nitpick [card = 2-5, expect = none]
  80.132  oops
  80.133  
  80.134 -lemma "\<forall>x\<Colon>'a\<times>'b. if (\<forall>y. x = y) then False else True"
  80.135 +lemma "\<forall>x::'a\<times>'b. if (\<forall>y. x = y) then False else True"
  80.136  nitpick [card = 1, expect = genuine]
  80.137  nitpick [card = 2, expect = none]
  80.138  oops
  80.139 @@ -242,7 +242,7 @@
  80.140  nitpick [expect = none]
  80.141  sorry
  80.142  
  80.143 -lemma "(\<exists>x\<Colon>'a. \<forall>y. P x y) \<or> (\<exists>x\<Colon>'a \<times> 'a. \<forall>y. P y x)"
  80.144 +lemma "(\<exists>x::'a. \<forall>y. P x y) \<or> (\<exists>x::'a \<times> 'a. \<forall>y. P y x)"
  80.145  nitpick [card 'a = 1, expect = genuine]
  80.146  oops
  80.147  
  80.148 @@ -260,7 +260,7 @@
  80.149  nitpick [expect = none]
  80.150  by auto
  80.151  
  80.152 -lemma "let x = (\<forall>x\<Colon>'a \<times> 'b. P x) in if x then x else \<not> x"
  80.153 +lemma "let x = (\<forall>x::'a \<times> 'b. P x) in if x then x else \<not> x"
  80.154  nitpick [expect = none]
  80.155  by auto
  80.156  
  80.157 @@ -278,7 +278,7 @@
  80.158  nitpick [expect = none]
  80.159  by auto
  80.160  
  80.161 -schematic_lemma "\<exists>x\<Colon>'a \<Rightarrow> 'b. x = ?x"
  80.162 +schematic_lemma "\<exists>x::'a \<Rightarrow> 'b. x = ?x"
  80.163  nitpick [expect = none]
  80.164  by auto
  80.165  
  80.166 @@ -491,35 +491,35 @@
  80.167  nitpick [expect = none]
  80.168  by (simp add: snd_def)
  80.169  
  80.170 -lemma "fst (x\<Colon>'a\<Rightarrow>'b, y) = x"
  80.171 +lemma "fst (x::'a\<Rightarrow>'b, y) = x"
  80.172  nitpick [expect = none]
  80.173  by (simp add: fst_def)
  80.174  
  80.175 -lemma "snd (x\<Colon>'a\<Rightarrow>'b, y) = y"
  80.176 +lemma "snd (x::'a\<Rightarrow>'b, y) = y"
  80.177  nitpick [expect = none]
  80.178  by (simp add: snd_def)
  80.179  
  80.180 -lemma "fst (x, y\<Colon>'a\<Rightarrow>'b) = x"
  80.181 +lemma "fst (x, y::'a\<Rightarrow>'b) = x"
  80.182  nitpick [expect = none]
  80.183  by (simp add: fst_def)
  80.184  
  80.185 -lemma "snd (x, y\<Colon>'a\<Rightarrow>'b) = y"
  80.186 +lemma "snd (x, y::'a\<Rightarrow>'b) = y"
  80.187  nitpick [expect = none]
  80.188  by (simp add: snd_def)
  80.189  
  80.190 -lemma "fst (x\<Colon>'a\<times>'b, y) = x"
  80.191 +lemma "fst (x::'a\<times>'b, y) = x"
  80.192  nitpick [expect = none]
  80.193  by (simp add: fst_def)
  80.194  
  80.195 -lemma "snd (x\<Colon>'a\<times>'b, y) = y"
  80.196 +lemma "snd (x::'a\<times>'b, y) = y"
  80.197  nitpick [expect = none]
  80.198  by (simp add: snd_def)
  80.199  
  80.200 -lemma "fst (x, y\<Colon>'a\<times>'b) = x"
  80.201 +lemma "fst (x, y::'a\<times>'b) = x"
  80.202  nitpick [expect = none]
  80.203  by (simp add: fst_def)
  80.204  
  80.205 -lemma "snd (x, y\<Colon>'a\<times>'b) = y"
  80.206 +lemma "snd (x, y::'a\<times>'b) = y"
  80.207  nitpick [expect = none]
  80.208  by (simp add: snd_def)
  80.209  
  80.210 @@ -626,7 +626,7 @@
  80.211  nitpick [card = 1-5, expect = none]
  80.212  by auto
  80.213  
  80.214 -lemma "x \<in> ((A\<Colon>'a set) - B) \<longleftrightarrow> x \<in> A \<and> x \<notin> B"
  80.215 +lemma "x \<in> ((A::'a set) - B) \<longleftrightarrow> x \<in> A \<and> x \<notin> B"
  80.216  nitpick [card = 1-5, expect = none]
  80.217  by auto
  80.218  
  80.219 @@ -650,7 +650,7 @@
  80.220  nitpick [expect = none]
  80.221  by auto
  80.222  
  80.223 -lemma "I = (\<lambda>x\<Colon>'a set. x) \<Longrightarrow> uminus = (\<lambda>x. uminus (I x))"
  80.224 +lemma "I = (\<lambda>x::'a set. x) \<Longrightarrow> uminus = (\<lambda>x. uminus (I x))"
  80.225  nitpick [card = 1-7, expect = none]
  80.226  by auto
  80.227  
  80.228 @@ -662,7 +662,7 @@
  80.229  nitpick [expect = none]
  80.230  by auto
  80.231  
  80.232 -lemma "A = -(A\<Colon>'a set)"
  80.233 +lemma "A = -(A::'a set)"
  80.234  nitpick [card 'a = 10, expect = genuine]
  80.235  oops
  80.236  
  80.237 @@ -743,7 +743,7 @@
  80.238  nitpick [expect = genuine]
  80.239  oops
  80.240  
  80.241 -lemma "Eps (\<lambda>x. x \<in> P) \<in> (P\<Colon>nat set)"
  80.242 +lemma "Eps (\<lambda>x. x \<in> P) \<in> (P::nat set)"
  80.243  nitpick [expect = genuine]
  80.244  oops
  80.245  
  80.246 @@ -751,7 +751,7 @@
  80.247  nitpick [expect = genuine]
  80.248  oops
  80.249  
  80.250 -lemma "\<not> (P \<Colon> nat \<Rightarrow> bool) (Eps P)"
  80.251 +lemma "\<not> (P :: nat \<Rightarrow> bool) (Eps P)"
  80.252  nitpick [expect = genuine]
  80.253  oops
  80.254  
  80.255 @@ -759,7 +759,7 @@
  80.256  nitpick [expect = none]
  80.257  sorry
  80.258  
  80.259 -lemma "(P \<Colon> nat \<Rightarrow> bool) \<noteq> bot \<Longrightarrow> P (Eps P)"
  80.260 +lemma "(P :: nat \<Rightarrow> bool) \<noteq> bot \<Longrightarrow> P (Eps P)"
  80.261  nitpick [expect = none]
  80.262  sorry
  80.263  
  80.264 @@ -767,7 +767,7 @@
  80.265  nitpick [expect = genuine]
  80.266  oops
  80.267  
  80.268 -lemma "(P \<Colon> nat \<Rightarrow> bool) (The P)"
  80.269 +lemma "(P :: nat \<Rightarrow> bool) (The P)"
  80.270  nitpick [expect = genuine]
  80.271  oops
  80.272  
  80.273 @@ -775,7 +775,7 @@
  80.274  nitpick [expect = genuine]
  80.275  oops
  80.276  
  80.277 -lemma "\<not> (P \<Colon> nat \<Rightarrow> bool) (The P)"
  80.278 +lemma "\<not> (P :: nat \<Rightarrow> bool) (The P)"
  80.279  nitpick [expect = genuine]
  80.280  oops
  80.281  
  80.282 @@ -783,7 +783,7 @@
  80.283  nitpick [expect = genuine]
  80.284  oops
  80.285  
  80.286 -lemma "The P \<noteq> (x\<Colon>nat)"
  80.287 +lemma "The P \<noteq> (x::nat)"
  80.288  nitpick [expect = genuine]
  80.289  oops
  80.290  
  80.291 @@ -791,7 +791,7 @@
  80.292  nitpick [expect = genuine]
  80.293  oops
  80.294  
  80.295 -lemma "P (x\<Colon>nat) \<Longrightarrow> P (The P)"
  80.296 +lemma "P (x::nat) \<Longrightarrow> P (The P)"
  80.297  nitpick [expect = genuine]
  80.298  oops
  80.299  
  80.300 @@ -799,7 +799,7 @@
  80.301  nitpick [expect = none]
  80.302  oops
  80.303  
  80.304 -lemma "P = {x\<Colon>nat} \<Longrightarrow> (THE x. x \<in> P) \<in> P"
  80.305 +lemma "P = {x::nat} \<Longrightarrow> (THE x. x \<in> P) \<in> P"
  80.306  nitpick [expect = none]
  80.307  oops
  80.308  
  80.309 @@ -809,23 +809,23 @@
  80.310  nitpick [expect = genuine]
  80.311  oops
  80.312  
  80.313 -lemma "(Q \<Colon> nat \<Rightarrow> bool) (Eps Q)"
  80.314 +lemma "(Q :: nat \<Rightarrow> bool) (Eps Q)"
  80.315  nitpick [expect = none] (* unfortunate *)
  80.316  oops
  80.317  
  80.318 -lemma "\<not> (Q \<Colon> nat \<Rightarrow> bool) (Eps Q)"
  80.319 +lemma "\<not> (Q :: nat \<Rightarrow> bool) (Eps Q)"
  80.320  nitpick [expect = genuine]
  80.321  oops
  80.322  
  80.323 -lemma "\<not> (Q \<Colon> nat \<Rightarrow> bool) (Eps Q)"
  80.324 +lemma "\<not> (Q :: nat \<Rightarrow> bool) (Eps Q)"
  80.325  nitpick [expect = genuine]
  80.326  oops
  80.327  
  80.328 -lemma "(Q\<Colon>'a \<Rightarrow> bool) \<noteq> bot \<Longrightarrow> (Q\<Colon>'a \<Rightarrow> bool) (Eps Q)"
  80.329 +lemma "(Q::'a \<Rightarrow> bool) \<noteq> bot \<Longrightarrow> (Q::'a \<Rightarrow> bool) (Eps Q)"
  80.330  nitpick [expect = none]
  80.331  sorry
  80.332  
  80.333 -lemma "(Q\<Colon>nat \<Rightarrow> bool) \<noteq> bot \<Longrightarrow> (Q\<Colon>nat \<Rightarrow> bool) (Eps Q)"
  80.334 +lemma "(Q::nat \<Rightarrow> bool) \<noteq> bot \<Longrightarrow> (Q::nat \<Rightarrow> bool) (Eps Q)"
  80.335  nitpick [expect = none]
  80.336  sorry
  80.337  
  80.338 @@ -833,7 +833,7 @@
  80.339  nitpick [expect = genuine]
  80.340  oops
  80.341  
  80.342 -lemma "(Q\<Colon>nat \<Rightarrow> bool) (The Q)"
  80.343 +lemma "(Q::nat \<Rightarrow> bool) (The Q)"
  80.344  nitpick [expect = genuine]
  80.345  oops
  80.346  
  80.347 @@ -841,7 +841,7 @@
  80.348  nitpick [expect = genuine]
  80.349  oops
  80.350  
  80.351 -lemma "\<not> (Q\<Colon>nat \<Rightarrow> bool) (The Q)"
  80.352 +lemma "\<not> (Q::nat \<Rightarrow> bool) (The Q)"
  80.353  nitpick [expect = genuine]
  80.354  oops
  80.355  
  80.356 @@ -849,7 +849,7 @@
  80.357  nitpick [expect = genuine]
  80.358  oops
  80.359  
  80.360 -lemma "The Q \<noteq> (x\<Colon>nat)"
  80.361 +lemma "The Q \<noteq> (x::nat)"
  80.362  nitpick [expect = genuine]
  80.363  oops
  80.364  
  80.365 @@ -857,15 +857,15 @@
  80.366  nitpick [expect = genuine]
  80.367  oops
  80.368  
  80.369 -lemma "Q (x\<Colon>nat) \<Longrightarrow> Q (The Q)"
  80.370 +lemma "Q (x::nat) \<Longrightarrow> Q (The Q)"
  80.371  nitpick [expect = genuine]
  80.372  oops
  80.373  
  80.374 -lemma "Q = (\<lambda>x\<Colon>'a. x = a) \<Longrightarrow> (Q\<Colon>'a \<Rightarrow> bool) (The Q)"
  80.375 +lemma "Q = (\<lambda>x::'a. x = a) \<Longrightarrow> (Q::'a \<Rightarrow> bool) (The Q)"
  80.376  nitpick [expect = none]
  80.377  sorry
  80.378  
  80.379 -lemma "Q = (\<lambda>x\<Colon>nat. x = a) \<Longrightarrow> (Q\<Colon>nat \<Rightarrow> bool) (The Q)"
  80.380 +lemma "Q = (\<lambda>x::nat. x = a) \<Longrightarrow> (Q::nat \<Rightarrow> bool) (The Q)"
  80.381  nitpick [expect = none]
  80.382  sorry
  80.383  
  80.384 @@ -921,7 +921,7 @@
  80.385  
  80.386  subsection {* Destructors and Recursors *}
  80.387  
  80.388 -lemma "(x\<Colon>'a) = (case True of True \<Rightarrow> x | False \<Rightarrow> x)"
  80.389 +lemma "(x::'a) = (case True of True \<Rightarrow> x | False \<Rightarrow> x)"
  80.390  nitpick [card = 2, expect = none]
  80.391  by auto
  80.392  
    81.1 --- a/src/HOL/Nitpick_Examples/Integer_Nits.thy	Tue Sep 01 17:25:36 2015 +0200
    81.2 +++ b/src/HOL/Nitpick_Examples/Integer_Nits.thy	Tue Sep 01 22:32:58 2015 +0200
    81.3 @@ -232,7 +232,7 @@
    81.4  nitpick [expect = potential] (* unfortunate *)
    81.5  sorry
    81.6  
    81.7 -lemma "(\<Sum>i \<in> labels (Node x t u). f i\<Colon>nat) = f x + (\<Sum>i \<in> labels t. f i) + (\<Sum>i \<in> labels u. f i)"
    81.8 +lemma "(\<Sum>i \<in> labels (Node x t u). f i::nat) = f x + (\<Sum>i \<in> labels t. f i) + (\<Sum>i \<in> labels u. f i)"
    81.9  nitpick [expect = potential] (* unfortunate *)
   81.10  oops
   81.11  
    82.1 --- a/src/HOL/Nitpick_Examples/Manual_Nits.thy	Tue Sep 01 17:25:36 2015 +0200
    82.2 +++ b/src/HOL/Nitpick_Examples/Manual_Nits.thy	Tue Sep 01 22:32:58 2015 +0200
    82.3 @@ -68,7 +68,7 @@
    82.4  
    82.5  subsection {* 2.5. Natural Numbers and Integers *}
    82.6  
    82.7 -lemma "\<lbrakk>i \<le> j; n \<le> (m\<Colon>int)\<rbrakk> \<Longrightarrow> i * n + j * m \<le> i * m + j * n"
    82.8 +lemma "\<lbrakk>i \<le> j; n \<le> (m::int)\<rbrakk> \<Longrightarrow> i * n + j * m \<le> i * m + j * n"
    82.9  nitpick [expect = genuine]
   82.10  nitpick [binary_ints, bits = 16, expect = genuine]
   82.11  oops
   82.12 @@ -81,7 +81,7 @@
   82.13  nitpick [expect = none]
   82.14  oops
   82.15  
   82.16 -lemma "P (op +\<Colon>nat\<Rightarrow>nat\<Rightarrow>nat)"
   82.17 +lemma "P (op +::nat\<Rightarrow>nat\<Rightarrow>nat)"
   82.18  nitpick [card nat = 1, expect = genuine]
   82.19  nitpick [card nat = 2, expect = none]
   82.20  oops
   82.21 @@ -101,7 +101,7 @@
   82.22  
   82.23  subsection {* 2.7. Typedefs, Records, Rationals, and Reals *}
   82.24  
   82.25 -definition "three = {0\<Colon>nat, 1, 2}"
   82.26 +definition "three = {0::nat, 1, 2}"
   82.27  typedef three = three
   82.28    unfolding three_def by blast
   82.29  
   82.30 @@ -120,9 +120,9 @@
   82.31  by (auto simp add: equivp_def fun_eq_iff)
   82.32  
   82.33  definition add_raw where
   82.34 -"add_raw \<equiv> \<lambda>(x, y) (u, v). (x + (u\<Colon>nat), y + (v\<Colon>nat))"
   82.35 +"add_raw \<equiv> \<lambda>(x, y) (u, v). (x + (u::nat), y + (v::nat))"
   82.36  
   82.37 -quotient_definition "add\<Colon>my_int \<Rightarrow> my_int \<Rightarrow> my_int" is add_raw
   82.38 +quotient_definition "add::my_int \<Rightarrow> my_int \<Rightarrow> my_int" is add_raw
   82.39  unfolding add_raw_def by auto
   82.40  
   82.41  lemma "add x y = add x x"
   82.42 @@ -148,11 +148,11 @@
   82.43    Xcoord :: int
   82.44    Ycoord :: int
   82.45  
   82.46 -lemma "Xcoord (p\<Colon>point) = Xcoord (q\<Colon>point)"
   82.47 +lemma "Xcoord (p::point) = Xcoord (q::point)"
   82.48  nitpick [show_types, expect = genuine]
   82.49  oops
   82.50  
   82.51 -lemma "4 * x + 3 * (y\<Colon>real) \<noteq> 1 / 2"
   82.52 +lemma "4 * x + 3 * (y::real) \<noteq> 1 / 2"
   82.53  nitpick [show_types, expect = genuine]
   82.54  oops
   82.55  
   82.56 @@ -172,7 +172,7 @@
   82.57  oops
   82.58  
   82.59  inductive even' where
   82.60 -"even' (0\<Colon>nat)" |
   82.61 +"even' (0::nat)" |
   82.62  "even' 2" |
   82.63  "\<lbrakk>even' m; even' n\<rbrakk> \<Longrightarrow> even' (m + n)"
   82.64  
   82.65 @@ -185,7 +185,7 @@
   82.66  oops
   82.67  
   82.68  coinductive nats where
   82.69 -"nats (x\<Colon>nat) \<Longrightarrow> nats x"
   82.70 +"nats (x::nat) \<Longrightarrow> nats x"
   82.71  
   82.72  lemma "nats = (\<lambda>n. n \<in> {0, 1, 2, 3, 4})"
   82.73  nitpick [card nat = 10, show_consts, expect = genuine]
   82.74 @@ -264,7 +264,7 @@
   82.75  nitpick [verbose, expect = genuine]
   82.76  oops
   82.77  
   82.78 -lemma "\<exists>g. \<forall>x\<Colon>'b. g (f x) = x \<Longrightarrow> \<forall>y\<Colon>'a. \<exists>x. y = f x"
   82.79 +lemma "\<exists>g. \<forall>x::'b. g (f x) = x \<Longrightarrow> \<forall>y::'a. \<exists>x. y = f x"
   82.80  nitpick [mono, expect = none]
   82.81  nitpick [expect = genuine]
   82.82  oops
   82.83 @@ -273,7 +273,7 @@
   82.84  subsection {* 2.12. Inductive Properties *}
   82.85  
   82.86  inductive_set reach where
   82.87 -"(4\<Colon>nat) \<in> reach" |
   82.88 +"(4::nat) \<in> reach" |
   82.89  "n \<in> reach \<Longrightarrow> n < 4 \<Longrightarrow> 3 * n + 1 \<in> reach" |
   82.90  "n \<in> reach \<Longrightarrow> n + 2 \<in> reach"
   82.91  
   82.92 @@ -381,7 +381,7 @@
   82.93  
   82.94  subsection {* 3.2. AA Trees *}
   82.95  
   82.96 -datatype 'a aa_tree = \<Lambda> | N "'a\<Colon>linorder" nat "'a aa_tree" "'a aa_tree"
   82.97 +datatype 'a aa_tree = \<Lambda> | N "'a::linorder" nat "'a aa_tree" "'a aa_tree"
   82.98  
   82.99  primrec data where
  82.100  "data \<Lambda> = undefined" |
  82.101 @@ -449,7 +449,7 @@
  82.102  nitpick [expect = genuine]
  82.103  oops
  82.104  
  82.105 -theorem wf_insort\<^sub>1_nat: "wf t \<Longrightarrow> wf (insort\<^sub>1 t (x\<Colon>nat))"
  82.106 +theorem wf_insort\<^sub>1_nat: "wf t \<Longrightarrow> wf (insort\<^sub>1 t (x::nat))"
  82.107  nitpick [eval = "insort\<^sub>1 t x", expect = genuine]
  82.108  oops
  82.109  
    83.1 --- a/src/HOL/Nitpick_Examples/Mini_Nits.thy	Tue Sep 01 17:25:36 2015 +0200
    83.2 +++ b/src/HOL/Nitpick_Examples/Mini_Nits.thy	Tue Sep 01 22:32:58 2015 +0200
    83.3 @@ -38,20 +38,20 @@
    83.4  ML_val {* none 1 @{prop "\<forall>x. x = y"} *}
    83.5  ML_val {* genuine 2 @{prop "\<forall>x. x = y"} *}
    83.6  ML_val {* none 2 @{prop "\<exists>x. x = y"} *}
    83.7 -ML_val {* none 2 @{prop "\<forall>x\<Colon>'a \<times> 'a. x = x"} *}
    83.8 -ML_val {* none 2 @{prop "\<exists>x\<Colon>'a \<times> 'a. x = y"} *}
    83.9 -ML_val {* genuine 2 @{prop "\<forall>x\<Colon>'a \<times> 'a. x = y"} *}
   83.10 -ML_val {* none 2 @{prop "\<exists>x\<Colon>'a \<times> 'a. x = y"} *}
   83.11 +ML_val {* none 2 @{prop "\<forall>x::'a \<times> 'a. x = x"} *}
   83.12 +ML_val {* none 2 @{prop "\<exists>x::'a \<times> 'a. x = y"} *}
   83.13 +ML_val {* genuine 2 @{prop "\<forall>x::'a \<times> 'a. x = y"} *}
   83.14 +ML_val {* none 2 @{prop "\<exists>x::'a \<times> 'a. x = y"} *}
   83.15  ML_val {* none 1 @{prop "All = Ex"} *}
   83.16  ML_val {* genuine 2 @{prop "All = Ex"} *}
   83.17  ML_val {* none 1 @{prop "All P = Ex P"} *}
   83.18  ML_val {* genuine 2 @{prop "All P = Ex P"} *}
   83.19  ML_val {* none 4 @{prop "x = y \<longrightarrow> P x = P y"} *}
   83.20 -ML_val {* none 4 @{prop "(x\<Colon>'a \<times> 'a) = y \<longrightarrow> P x = P y"} *}
   83.21 -ML_val {* none 2 @{prop "(x\<Colon>'a \<times> 'a) = y \<longrightarrow> P x y = P y x"} *}
   83.22 -ML_val {* none 4 @{prop "\<exists>x\<Colon>'a \<times> 'a. x = y \<longrightarrow> P x = P y"} *}
   83.23 -ML_val {* none 2 @{prop "(x\<Colon>'a \<Rightarrow> 'a) = y \<longrightarrow> P x = P y"} *}
   83.24 -ML_val {* none 2 @{prop "\<exists>x\<Colon>'a \<Rightarrow> 'a. x = y \<longrightarrow> P x = P y"} *}
   83.25 +ML_val {* none 4 @{prop "(x::'a \<times> 'a) = y \<longrightarrow> P x = P y"} *}
   83.26 +ML_val {* none 2 @{prop "(x::'a \<times> 'a) = y \<longrightarrow> P x y = P y x"} *}
   83.27 +ML_val {* none 4 @{prop "\<exists>x::'a \<times> 'a. x = y \<longrightarrow> P x = P y"} *}
   83.28 +ML_val {* none 2 @{prop "(x::'a \<Rightarrow> 'a) = y \<longrightarrow> P x = P y"} *}
   83.29 +ML_val {* none 2 @{prop "\<exists>x::'a \<Rightarrow> 'a. x = y \<longrightarrow> P x = P y"} *}
   83.30  ML_val {* genuine 1 @{prop "(op =) X = Ex"} *}
   83.31  ML_val {* none 2 @{prop "\<forall>x::'a \<Rightarrow> 'a. x = x"} *}
   83.32  ML_val {* none 1 @{prop "x = y"} *}
   83.33 @@ -68,8 +68,8 @@
   83.34  ML_val {* genuine 1 @{prop "{a} \<noteq> {a, b}"} *}
   83.35  ML_val {* none 4 @{prop "{}\<^sup>+ = {}"} *}
   83.36  ML_val {* none 4 @{prop "UNIV\<^sup>+ = UNIV"} *}
   83.37 -ML_val {* none 4 @{prop "(UNIV \<Colon> ('a \<times> 'b) set) - {} = UNIV"} *}
   83.38 -ML_val {* none 4 @{prop "{} - (UNIV \<Colon> ('a \<times> 'b) set) = {}"} *}
   83.39 +ML_val {* none 4 @{prop "(UNIV :: ('a \<times> 'b) set) - {} = UNIV"} *}
   83.40 +ML_val {* none 4 @{prop "{} - (UNIV :: ('a \<times> 'b) set) = {}"} *}
   83.41  ML_val {* none 1 @{prop "{(a, b), (b, c)}\<^sup>+ = {(a, b), (a, c), (b, c)}"} *}
   83.42  ML_val {* genuine 2 @{prop "{(a, b), (b, c)}\<^sup>+ = {(a, b), (a, c), (b, c)}"} *}
   83.43  ML_val {* none 4 @{prop "a \<noteq> c \<Longrightarrow> {(a, b), (b, c)}\<^sup>+ = {(a, b), (a, c), (b, c)}"} *}
   83.44 @@ -79,12 +79,12 @@
   83.45  ML_val {* none 4 @{prop "\<exists>a b. (a, b) = (b, a)"} *}
   83.46  ML_val {* genuine 2 @{prop "(a, b) = (b, a)"} *}
   83.47  ML_val {* genuine 2 @{prop "(a, b) \<noteq> (b, a)"} *}
   83.48 -ML_val {* none 4 @{prop "\<exists>a b\<Colon>'a \<times> 'a. (a, b) = (b, a)"} *}
   83.49 -ML_val {* genuine 2 @{prop "(a\<Colon>'a \<times> 'a, b) = (b, a)"} *}
   83.50 -ML_val {* none 4 @{prop "\<exists>a b\<Colon>'a \<times> 'a \<times> 'a. (a, b) = (b, a)"} *}
   83.51 -ML_val {* genuine 2 @{prop "(a\<Colon>'a \<times> 'a \<times> 'a, b) \<noteq> (b, a)"} *}
   83.52 -ML_val {* none 4 @{prop "\<exists>a b\<Colon>'a \<Rightarrow> 'a. (a, b) = (b, a)"} *}
   83.53 -ML_val {* genuine 1 @{prop "(a\<Colon>'a \<Rightarrow> 'a, b) \<noteq> (b, a)"} *}
   83.54 +ML_val {* none 4 @{prop "\<exists>a b::'a \<times> 'a. (a, b) = (b, a)"} *}
   83.55 +ML_val {* genuine 2 @{prop "(a::'a \<times> 'a, b) = (b, a)"} *}
   83.56 +ML_val {* none 4 @{prop "\<exists>a b::'a \<times> 'a \<times> 'a. (a, b) = (b, a)"} *}
   83.57 +ML_val {* genuine 2 @{prop "(a::'a \<times> 'a \<times> 'a, b) \<noteq> (b, a)"} *}
   83.58 +ML_val {* none 4 @{prop "\<exists>a b::'a \<Rightarrow> 'a. (a, b) = (b, a)"} *}
   83.59 +ML_val {* genuine 1 @{prop "(a::'a \<Rightarrow> 'a, b) \<noteq> (b, a)"} *}
   83.60  ML_val {* none 4 @{prop "fst (a, b) = a"} *}
   83.61  ML_val {* none 1 @{prop "fst (a, b) = b"} *}
   83.62  ML_val {* genuine 2 @{prop "fst (a, b) = b"} *}
   83.63 @@ -104,8 +104,8 @@
   83.64  ML_val {* none 3 @{prop "f = (\<lambda>a b. (b, a)) \<longrightarrow> f x y = (y, x)"} *}
   83.65  ML_val {* genuine 2 @{prop "f = (\<lambda>a b. (b, a)) \<longrightarrow> f x y = (x, y)"} *}
   83.66  ML_val {* none 4 @{prop "f = (\<lambda>x. f x)"} *}
   83.67 -ML_val {* none 4 @{prop "f = (\<lambda>x. f x\<Colon>'a \<Rightarrow> bool)"} *}
   83.68 +ML_val {* none 4 @{prop "f = (\<lambda>x. f x::'a \<Rightarrow> bool)"} *}
   83.69  ML_val {* none 4 @{prop "f = (\<lambda>x y. f x y)"} *}
   83.70 -ML_val {* none 4 @{prop "f = (\<lambda>x y. f x y\<Colon>'a \<Rightarrow> bool)"} *}
   83.71 +ML_val {* none 4 @{prop "f = (\<lambda>x y. f x y::'a \<Rightarrow> bool)"} *}
   83.72  
   83.73  end
    84.1 --- a/src/HOL/Nitpick_Examples/Mono_Nits.thy	Tue Sep 01 17:25:36 2015 +0200
    84.2 +++ b/src/HOL/Nitpick_Examples/Mono_Nits.thy	Tue Sep 01 22:32:58 2015 +0200
    84.3 @@ -66,78 +66,78 @@
    84.4  
    84.5  ML {* Nitpick_Mono.trace := false *}
    84.6  
    84.7 -ML_val {* const @{term "A\<Colon>('a\<Rightarrow>'b)"} *}
    84.8 -ML_val {* const @{term "(A\<Colon>'a set) = A"} *}
    84.9 -ML_val {* const @{term "(A\<Colon>'a set set) = A"} *}
   84.10 -ML_val {* const @{term "(\<lambda>x\<Colon>'a set. a \<in> x)"} *}
   84.11 -ML_val {* const @{term "{{a\<Colon>'a}} = C"} *}
   84.12 -ML_val {* const @{term "{f\<Colon>'a\<Rightarrow>nat} = {g\<Colon>'a\<Rightarrow>nat}"} *}
   84.13 -ML_val {* const @{term "A \<union> (B\<Colon>'a set)"} *}
   84.14 -ML_val {* const @{term "\<lambda>A B x\<Colon>'a. A x \<or> B x"} *}
   84.15 -ML_val {* const @{term "P (a\<Colon>'a)"} *}
   84.16 -ML_val {* const @{term "\<lambda>a\<Colon>'a. b (c (d\<Colon>'a)) (e\<Colon>'a) (f\<Colon>'a)"} *}
   84.17 -ML_val {* const @{term "\<forall>A\<Colon>'a set. a \<in> A"} *}
   84.18 -ML_val {* const @{term "\<forall>A\<Colon>'a set. P A"} *}
   84.19 +ML_val {* const @{term "A::('a\<Rightarrow>'b)"} *}
   84.20 +ML_val {* const @{term "(A::'a set) = A"} *}
   84.21 +ML_val {* const @{term "(A::'a set set) = A"} *}
   84.22 +ML_val {* const @{term "(\<lambda>x::'a set. a \<in> x)"} *}
   84.23 +ML_val {* const @{term "{{a::'a}} = C"} *}
   84.24 +ML_val {* const @{term "{f::'a\<Rightarrow>nat} = {g::'a\<Rightarrow>nat}"} *}
   84.25 +ML_val {* const @{term "A \<union> (B::'a set)"} *}
   84.26 +ML_val {* const @{term "\<lambda>A B x::'a. A x \<or> B x"} *}
   84.27 +ML_val {* const @{term "P (a::'a)"} *}
   84.28 +ML_val {* const @{term "\<lambda>a::'a. b (c (d::'a)) (e::'a) (f::'a)"} *}
   84.29 +ML_val {* const @{term "\<forall>A::'a set. a \<in> A"} *}
   84.30 +ML_val {* const @{term "\<forall>A::'a set. P A"} *}
   84.31  ML_val {* const @{term "P \<or> Q"} *}
   84.32 -ML_val {* const @{term "A \<union> B = (C\<Colon>'a set)"} *}
   84.33 -ML_val {* const @{term "(\<lambda>A B x\<Colon>'a. A x \<or> B x) A B = C"} *}
   84.34 -ML_val {* const @{term "(if P then (A\<Colon>'a set) else B) = C"} *}
   84.35 -ML_val {* const @{term "let A = (C\<Colon>'a set) in A \<union> B"} *}
   84.36 -ML_val {* const @{term "THE x\<Colon>'b. P x"} *}
   84.37 -ML_val {* const @{term "(\<lambda>x\<Colon>'a. False)"} *}
   84.38 -ML_val {* const @{term "(\<lambda>x\<Colon>'a. True)"} *}
   84.39 -ML_val {* const @{term "(\<lambda>x\<Colon>'a. False) = (\<lambda>x\<Colon>'a. False)"} *}
   84.40 -ML_val {* const @{term "(\<lambda>x\<Colon>'a. True) = (\<lambda>x\<Colon>'a. True)"} *}
   84.41 -ML_val {* const @{term "Let (a\<Colon>'a) A"} *}
   84.42 -ML_val {* const @{term "A (a\<Colon>'a)"} *}
   84.43 -ML_val {* const @{term "insert (a\<Colon>'a) A = B"} *}
   84.44 -ML_val {* const @{term "- (A\<Colon>'a set)"} *}
   84.45 -ML_val {* const @{term "finite (A\<Colon>'a set)"} *}
   84.46 -ML_val {* const @{term "\<not> finite (A\<Colon>'a set)"} *}
   84.47 -ML_val {* const @{term "finite (A\<Colon>'a set set)"} *}
   84.48 -ML_val {* const @{term "\<lambda>a\<Colon>'a. A a \<and> \<not> B a"} *}
   84.49 -ML_val {* const @{term "A < (B\<Colon>'a set)"} *}
   84.50 -ML_val {* const @{term "A \<le> (B\<Colon>'a set)"} *}
   84.51 -ML_val {* const @{term "[a\<Colon>'a]"} *}
   84.52 -ML_val {* const @{term "[a\<Colon>'a set]"} *}
   84.53 -ML_val {* const @{term "[A \<union> (B\<Colon>'a set)]"} *}
   84.54 -ML_val {* const @{term "[A \<union> (B\<Colon>'a set)] = [C]"} *}
   84.55 -ML_val {* const @{term "{(\<lambda>x\<Colon>'a. x = a)} = C"} *}
   84.56 -ML_val {* const @{term "(\<lambda>a\<Colon>'a. \<not> A a) = B"} *}
   84.57 -ML_val {* const @{prop "\<forall>F f g (h\<Colon>'a set). F f \<and> F g \<and> \<not> f a \<and> g a \<longrightarrow> \<not> f a"} *}
   84.58 -ML_val {* const @{term "\<lambda>A B x\<Colon>'a. A x \<and> B x \<and> A = B"} *}
   84.59 -ML_val {* const @{term "p = (\<lambda>(x\<Colon>'a) (y\<Colon>'a). P x \<or> \<not> Q y)"} *}
   84.60 -ML_val {* const @{term "p = (\<lambda>(x\<Colon>'a) (y\<Colon>'a). p x y \<Colon> bool)"} *}
   84.61 +ML_val {* const @{term "A \<union> B = (C::'a set)"} *}
   84.62 +ML_val {* const @{term "(\<lambda>A B x::'a. A x \<or> B x) A B = C"} *}
   84.63 +ML_val {* const @{term "(if P then (A::'a set) else B) = C"} *}
   84.64 +ML_val {* const @{term "let A = (C::'a set) in A \<union> B"} *}
   84.65 +ML_val {* const @{term "THE x::'b. P x"} *}
   84.66 +ML_val {* const @{term "(\<lambda>x::'a. False)"} *}
   84.67 +ML_val {* const @{term "(\<lambda>x::'a. True)"} *}
   84.68 +ML_val {* const @{term "(\<lambda>x::'a. False) = (\<lambda>x::'a. False)"} *}
   84.69 +ML_val {* const @{term "(\<lambda>x::'a. True) = (\<lambda>x::'a. True)"} *}
   84.70 +ML_val {* const @{term "Let (a::'a) A"} *}
   84.71 +ML_val {* const @{term "A (a::'a)"} *}
   84.72 +ML_val {* const @{term "insert (a::'a) A = B"} *}
   84.73 +ML_val {* const @{term "- (A::'a set)"} *}
   84.74 +ML_val {* const @{term "finite (A::'a set)"} *}
   84.75 +ML_val {* const @{term "\<not> finite (A::'a set)"} *}
   84.76 +ML_val {* const @{term "finite (A::'a set set)"} *}
   84.77 +ML_val {* const @{term "\<lambda>a::'a. A a \<and> \<not> B a"} *}
   84.78 +ML_val {* const @{term "A < (B::'a set)"} *}
   84.79 +ML_val {* const @{term "A \<le> (B::'a set)"} *}
   84.80 +ML_val {* const @{term "[a::'a]"} *}
   84.81 +ML_val {* const @{term "[a::'a set]"} *}
   84.82 +ML_val {* const @{term "[A \<union> (B::'a set)]"} *}
   84.83 +ML_val {* const @{term "[A \<union> (B::'a set)] = [C]"} *}
   84.84 +ML_val {* const @{term "{(\<lambda>x::'a. x = a)} = C"} *}
   84.85 +ML_val {* const @{term "(\<lambda>a::'a. \<not> A a) = B"} *}
   84.86 +ML_val {* const @{prop "\<forall>F f g (h::'a set). F f \<and> F g \<and> \<not> f a \<and> g a \<longrightarrow> \<not> f a"} *}
   84.87 +ML_val {* const @{term "\<lambda>A B x::'a. A x \<and> B x \<and> A = B"} *}
   84.88 +ML_val {* const @{term "p = (\<lambda>(x::'a) (y::'a). P x \<or> \<not> Q y)"} *}
   84.89 +ML_val {* const @{term "p = (\<lambda>(x::'a) (y::'a). p x y :: bool)"} *}
   84.90  ML_val {* const @{term "p = (\<lambda>A B x. A x \<and> \<not> B x) (\<lambda>x. True) (\<lambda>y. x \<noteq> y)"} *}
   84.91  ML_val {* const @{term "p = (\<lambda>y. x \<noteq> y)"} *}
   84.92 -ML_val {* const @{term "(\<lambda>x. (p\<Colon>'a\<Rightarrow>bool\<Rightarrow>bool) x False)"} *}
   84.93 -ML_val {* const @{term "(\<lambda>x y. (p\<Colon>'a\<Rightarrow>'a\<Rightarrow>bool\<Rightarrow>bool) x y False)"} *}
   84.94 -ML_val {* const @{term "f = (\<lambda>x\<Colon>'a. P x \<longrightarrow> Q x)"} *}
   84.95 -ML_val {* const @{term "\<forall>a\<Colon>'a. P a"} *}
   84.96 +ML_val {* const @{term "(\<lambda>x. (p::'a\<Rightarrow>bool\<Rightarrow>bool) x False)"} *}
   84.97 +ML_val {* const @{term "(\<lambda>x y. (p::'a\<Rightarrow>'a\<Rightarrow>bool\<Rightarrow>bool) x y False)"} *}
   84.98 +ML_val {* const @{term "f = (\<lambda>x::'a. P x \<longrightarrow> Q x)"} *}
   84.99 +ML_val {* const @{term "\<forall>a::'a. P a"} *}
  84.100  
  84.101 -ML_val {* nonconst @{term "\<forall>P (a\<Colon>'a). P a"} *}
  84.102 -ML_val {* nonconst @{term "THE x\<Colon>'a. P x"} *}
  84.103 -ML_val {* nonconst @{term "SOME x\<Colon>'a. P x"} *}
  84.104 -ML_val {* nonconst @{term "(\<lambda>A B x\<Colon>'a. A x \<or> B x) = myunion"} *}
  84.105 -ML_val {* nonconst @{term "(\<lambda>x\<Colon>'a. False) = (\<lambda>x\<Colon>'a. True)"} *}
  84.106 -ML_val {* nonconst @{prop "\<forall>F f g (h\<Colon>'a set). F f \<and> F g \<and> \<not> a \<in> f \<and> a \<in> g \<longrightarrow> F h"} *}
  84.107 +ML_val {* nonconst @{term "\<forall>P (a::'a). P a"} *}
  84.108 +ML_val {* nonconst @{term "THE x::'a. P x"} *}
  84.109 +ML_val {* nonconst @{term "SOME x::'a. P x"} *}
  84.110 +ML_val {* nonconst @{term "(\<lambda>A B x::'a. A x \<or> B x) = myunion"} *}
  84.111 +ML_val {* nonconst @{term "(\<lambda>x::'a. False) = (\<lambda>x::'a. True)"} *}
  84.112 +ML_val {* nonconst @{prop "\<forall>F f g (h::'a set). F f \<and> F g \<and> \<not> a \<in> f \<and> a \<in> g \<longrightarrow> F h"} *}
  84.113  
  84.114 -ML_val {* mono @{prop "Q (\<forall>x\<Colon>'a set. P x)"} *}
  84.115 -ML_val {* mono @{prop "P (a\<Colon>'a)"} *}
  84.116 -ML_val {* mono @{prop "{a} = {b\<Colon>'a}"} *}
  84.117 -ML_val {* mono @{prop "(\<lambda>x. x = a) = (\<lambda>y. y = (b\<Colon>'a))"} *}
  84.118 -ML_val {* mono @{prop "(a\<Colon>'a) \<in> P \<and> P \<union> P = P"} *}
  84.119 -ML_val {* mono @{prop "\<forall>F\<Colon>'a set set. P"} *}
  84.120 -ML_val {* mono @{prop "\<not> (\<forall>F f g (h\<Colon>'a set). F f \<and> F g \<and> \<not> a \<in> f \<and> a \<in> g \<longrightarrow> F h)"} *}
  84.121 -ML_val {* mono @{prop "\<not> Q (\<forall>x\<Colon>'a set. P x)"} *}
  84.122 -ML_val {* mono @{prop "\<not> (\<forall>x\<Colon>'a. P x)"} *}
  84.123 -ML_val {* mono @{prop "myall P = (P = (\<lambda>x\<Colon>'a. True))"} *}
  84.124 -ML_val {* mono @{prop "myall P = (P = (\<lambda>x\<Colon>'a. False))"} *}
  84.125 -ML_val {* mono @{prop "\<forall>x\<Colon>'a. P x"} *}
  84.126 -ML_val {* mono @{term "(\<lambda>A B x\<Colon>'a. A x \<or> B x) \<noteq> myunion"} *}
  84.127 +ML_val {* mono @{prop "Q (\<forall>x::'a set. P x)"} *}
  84.128 +ML_val {* mono @{prop "P (a::'a)"} *}
  84.129 +ML_val {* mono @{prop "{a} = {b::'a}"} *}
  84.130 +ML_val {* mono @{prop "(\<lambda>x. x = a) = (\<lambda>y. y = (b::'a))"} *}
  84.131 +ML_val {* mono @{prop "(a::'a) \<in> P \<and> P \<union> P = P"} *}
  84.132 +ML_val {* mono @{prop "\<forall>F::'a set set. P"} *}
  84.133 +ML_val {* mono @{prop "\<not> (\<forall>F f g (h::'a set). F f \<and> F g \<and> \<not> a \<in> f \<and> a \<in> g \<longrightarrow> F h)"} *}
  84.134 +ML_val {* mono @{prop "\<not> Q (\<forall>x::'a set. P x)"} *}
  84.135 +ML_val {* mono @{prop "\<not> (\<forall>x::'a. P x)"} *}
  84.136 +ML_val {* mono @{prop "myall P = (P = (\<lambda>x::'a. True))"} *}
  84.137 +ML_val {* mono @{prop "myall P = (P = (\<lambda>x::'a. False))"} *}
  84.138 +ML_val {* mono @{prop "\<forall>x::'a. P x"} *}
  84.139 +ML_val {* mono @{term "(\<lambda>A B x::'a. A x \<or> B x) \<noteq> myunion"} *}
  84.140  
  84.141  ML_val {* nonmono @{prop "A = (\<lambda>x::'a. True) \<and> A = (\<lambda>x. False)"} *}
  84.142 -ML_val {* nonmono @{prop "\<forall>F f g (h\<Colon>'a set). F f \<and> F g \<and> \<not> a \<in> f \<and> a \<in> g \<longrightarrow> F h"} *}
  84.143 +ML_val {* nonmono @{prop "\<forall>F f g (h::'a set). F f \<and> F g \<and> \<not> a \<in> f \<and> a \<in> g \<longrightarrow> F h"} *}
  84.144  
  84.145  ML {*
  84.146  val preproc_timeout = seconds 5.0
    85.1 --- a/src/HOL/Nitpick_Examples/Refute_Nits.thy	Tue Sep 01 17:25:36 2015 +0200
    85.2 +++ b/src/HOL/Nitpick_Examples/Refute_Nits.thy	Tue Sep 01 22:32:58 2015 +0200
    85.3 @@ -56,7 +56,7 @@
    85.4  nitpick [expect = genuine]
    85.5  oops
    85.6  
    85.7 -lemma "(P\<Colon>bool) = Q"
    85.8 +lemma "(P::bool) = Q"
    85.9  nitpick [expect = genuine]
   85.10  oops
   85.11  
   85.12 @@ -96,11 +96,11 @@
   85.13  nitpick [expect = genuine]
   85.14  oops
   85.15  
   85.16 -lemma "(f\<Colon>'a\<Rightarrow>'b) = g"
   85.17 +lemma "(f::'a\<Rightarrow>'b) = g"
   85.18  nitpick [expect = genuine]
   85.19  oops
   85.20  
   85.21 -lemma "(f\<Colon>('d\<Rightarrow>'d)\<Rightarrow>('c\<Rightarrow>'d)) = g"
   85.22 +lemma "(f::('d\<Rightarrow>'d)\<Rightarrow>('c\<Rightarrow>'d)) = g"
   85.23  nitpick [expect = genuine]
   85.24  oops
   85.25  
   85.26 @@ -202,7 +202,7 @@
   85.27  
   85.28  text {* "Two functions that are equivalent wrt.\ the same predicate 'P' are equal." *}
   85.29  
   85.30 -lemma "((P\<Colon>('a\<Rightarrow>'b)\<Rightarrow>bool) f = P g) \<longrightarrow> (f x = g x)"
   85.31 +lemma "((P::('a\<Rightarrow>'b)\<Rightarrow>bool) f = P g) \<longrightarrow> (f x = g x)"
   85.32  nitpick [expect = genuine]
   85.33  oops
   85.34  
   85.35 @@ -367,11 +367,11 @@
   85.36  
   85.37  subsubsection {* Sets *}
   85.38  
   85.39 -lemma "P (A\<Colon>'a set)"
   85.40 +lemma "P (A::'a set)"
   85.41  nitpick [expect = genuine]
   85.42  oops
   85.43  
   85.44 -lemma "P (A\<Colon>'a set set)"
   85.45 +lemma "P (A::'a set set)"
   85.46  nitpick [expect = genuine]
   85.47  oops
   85.48  
   85.49 @@ -473,33 +473,33 @@
   85.50  
   85.51  subsubsection {* Operations on Natural Numbers *}
   85.52  
   85.53 -lemma "(x\<Colon>nat) + y = 0"
   85.54 +lemma "(x::nat) + y = 0"
   85.55  nitpick [expect = genuine]
   85.56  oops
   85.57  
   85.58 -lemma "(x\<Colon>nat) = x + x"
   85.59 +lemma "(x::nat) = x + x"
   85.60  nitpick [expect = genuine]
   85.61  oops
   85.62  
   85.63 -lemma "(x\<Colon>nat) - y + y = x"
   85.64 +lemma "(x::nat) - y + y = x"
   85.65  nitpick [expect = genuine]
   85.66  oops
   85.67  
   85.68 -lemma "(x\<Colon>nat) = x * x"
   85.69 +lemma "(x::nat) = x * x"
   85.70  nitpick [expect = genuine]
   85.71  oops
   85.72  
   85.73 -lemma "(x\<Colon>nat) < x + y"
   85.74 +lemma "(x::nat) < x + y"
   85.75  nitpick [card = 1, expect = genuine]
   85.76  oops
   85.77  
   85.78  text {* \<times> *}
   85.79  
   85.80 -lemma "P (x\<Colon>'a\<times>'b)"
   85.81 +lemma "P (x::'a\<times>'b)"
   85.82  nitpick [expect = genuine]
   85.83  oops
   85.84  
   85.85 -lemma "\<forall>x\<Colon>'a\<times>'b. P x"
   85.86 +lemma "\<forall>x::'a\<times>'b. P x"
   85.87  nitpick [expect = genuine]
   85.88  oops
   85.89  
   85.90 @@ -532,7 +532,7 @@
   85.91  typedef 'a myTdef = "myTdef :: 'a set"
   85.92  unfolding myTdef_def by auto
   85.93  
   85.94 -lemma "(x\<Colon>'a myTdef) = y"
   85.95 +lemma "(x::'a myTdef) = y"
   85.96  nitpick [expect = genuine]
   85.97  oops
   85.98  
   85.99 @@ -543,7 +543,7 @@
  85.100  typedef 'a T_bij = "T_bij :: ('a \<Rightarrow> 'a) set"
  85.101  unfolding T_bij_def by auto
  85.102  
  85.103 -lemma "P (f\<Colon>(myTdecl myTdef) T_bij)"
  85.104 +lemma "P (f::(myTdecl myTdef) T_bij)"
  85.105  nitpick [expect = genuine]
  85.106  oops
  85.107  
  85.108 @@ -551,11 +551,11 @@
  85.109  
  85.110  text {* unit *}
  85.111  
  85.112 -lemma "P (x\<Colon>unit)"
  85.113 +lemma "P (x::unit)"
  85.114  nitpick [expect = genuine]
  85.115  oops
  85.116  
  85.117 -lemma "\<forall>x\<Colon>unit. P x"
  85.118 +lemma "\<forall>x::unit. P x"
  85.119  nitpick [expect = genuine]
  85.120  oops
  85.121  
  85.122 @@ -569,11 +569,11 @@
  85.123  
  85.124  text {* option *}
  85.125  
  85.126 -lemma "P (x\<Colon>'a option)"
  85.127 +lemma "P (x::'a option)"
  85.128  nitpick [expect = genuine]
  85.129  oops
  85.130  
  85.131 -lemma "\<forall>x\<Colon>'a option. P x"
  85.132 +lemma "\<forall>x::'a option. P x"
  85.133  nitpick [expect = genuine]
  85.134  oops
  85.135  
  85.136 @@ -591,11 +591,11 @@
  85.137  
  85.138  text {* + *}
  85.139  
  85.140 -lemma "P (x\<Colon>'a+'b)"
  85.141 +lemma "P (x::'a+'b)"
  85.142  nitpick [expect = genuine]
  85.143  oops
  85.144  
  85.145 -lemma "\<forall>x\<Colon>'a+'b. P x"
  85.146 +lemma "\<forall>x::'a+'b. P x"
  85.147  nitpick [expect = genuine]
  85.148  oops
  85.149  
  85.150 @@ -619,11 +619,11 @@
  85.151  
  85.152  datatype T1 = A | B
  85.153  
  85.154 -lemma "P (x\<Colon>T1)"
  85.155 +lemma "P (x::T1)"
  85.156  nitpick [expect = genuine]
  85.157  oops
  85.158  
  85.159 -lemma "\<forall>x\<Colon>T1. P x"
  85.160 +lemma "\<forall>x::T1. P x"
  85.161  nitpick [expect = genuine]
  85.162  oops
  85.163  
  85.164 @@ -655,11 +655,11 @@
  85.165  
  85.166  datatype 'a T2 = C T1 | D 'a
  85.167  
  85.168 -lemma "P (x\<Colon>'a T2)"
  85.169 +lemma "P (x::'a T2)"
  85.170  nitpick [expect = genuine]
  85.171  oops
  85.172  
  85.173 -lemma "\<forall>x\<Colon>'a T2. P x"
  85.174 +lemma "\<forall>x::'a T2. P x"
  85.175  nitpick [expect = genuine]
  85.176  oops
  85.177  
  85.178 @@ -687,11 +687,11 @@
  85.179  
  85.180  datatype ('a, 'b) T3 = E "'a \<Rightarrow> 'b"
  85.181  
  85.182 -lemma "P (x\<Colon>('a, 'b) T3)"
  85.183 +lemma "P (x::('a, 'b) T3)"
  85.184  nitpick [expect = genuine]
  85.185  oops
  85.186  
  85.187 -lemma "\<forall>x\<Colon>('a, 'b) T3. P x"
  85.188 +lemma "\<forall>x::('a, 'b) T3. P x"
  85.189  nitpick [expect = genuine]
  85.190  oops
  85.191  
  85.192 @@ -716,11 +716,11 @@
  85.193  
  85.194  text {* nat *}
  85.195  
  85.196 -lemma "P (x\<Colon>nat)"
  85.197 +lemma "P (x::nat)"
  85.198  nitpick [expect = genuine]
  85.199  oops
  85.200  
  85.201 -lemma "\<forall>x\<Colon>nat. P x"
  85.202 +lemma "\<forall>x::nat. P x"
  85.203  nitpick [expect = genuine]
  85.204  oops
  85.205  
  85.206 @@ -752,11 +752,11 @@
  85.207  
  85.208  text {* 'a list *}
  85.209  
  85.210 -lemma "P (xs\<Colon>'a list)"
  85.211 +lemma "P (xs::'a list)"
  85.212  nitpick [expect = genuine]
  85.213  oops
  85.214  
  85.215 -lemma "\<forall>xs\<Colon>'a list. P xs"
  85.216 +lemma "\<forall>xs::'a list. P xs"
  85.217  nitpick [expect = genuine]
  85.218  oops
  85.219  
  85.220 @@ -782,7 +782,7 @@
  85.221  nitpick [expect = genuine]
  85.222  oops
  85.223  
  85.224 -lemma "(xs\<Colon>'a list) = ys"
  85.225 +lemma "(xs::'a list) = ys"
  85.226  nitpick [expect = genuine]
  85.227  oops
  85.228  
  85.229 @@ -792,11 +792,11 @@
  85.230  
  85.231  datatype BitList = BitListNil | Bit0 BitList | Bit1 BitList
  85.232  
  85.233 -lemma "P (x\<Colon>BitList)"
  85.234 +lemma "P (x::BitList)"
  85.235  nitpick [expect = genuine]
  85.236  oops
  85.237  
  85.238 -lemma "\<forall>x\<Colon>BitList. P x"
  85.239 +lemma "\<forall>x::BitList. P x"
  85.240  nitpick [expect = genuine]
  85.241  oops
  85.242  
  85.243 @@ -825,11 +825,11 @@
  85.244  
  85.245  datatype 'a BinTree = Leaf 'a | Node "'a BinTree" "'a BinTree"
  85.246  
  85.247 -lemma "P (x\<Colon>'a BinTree)"
  85.248 +lemma "P (x::'a BinTree)"
  85.249  nitpick [expect = genuine]
  85.250  oops
  85.251  
  85.252 -lemma "\<forall>x\<Colon>'a BinTree. P x"
  85.253 +lemma "\<forall>x::'a BinTree. P x"
  85.254  nitpick [expect = genuine]
  85.255  oops
  85.256  
  85.257 @@ -860,11 +860,11 @@
  85.258  datatype 'a aexp = Number 'a | ITE "'a bexp" "'a aexp" "'a aexp"
  85.259   and 'a bexp = Equal "'a aexp" "'a aexp"
  85.260  
  85.261 -lemma "P (x\<Colon>'a aexp)"
  85.262 +lemma "P (x::'a aexp)"
  85.263  nitpick [expect = genuine]
  85.264  oops
  85.265  
  85.266 -lemma "\<forall>x\<Colon>'a aexp. P x"
  85.267 +lemma "\<forall>x::'a aexp. P x"
  85.268  nitpick [expect = genuine]
  85.269  oops
  85.270  
  85.271 @@ -872,11 +872,11 @@
  85.272  nitpick [expect = genuine]
  85.273  oops
  85.274  
  85.275 -lemma "P (x\<Colon>'a bexp)"
  85.276 +lemma "P (x::'a bexp)"
  85.277  nitpick [expect = genuine]
  85.278  oops
  85.279  
  85.280 -lemma "\<forall>x\<Colon>'a bexp. P x"
  85.281 +lemma "\<forall>x::'a bexp. P x"
  85.282  nitpick [expect = genuine]
  85.283  oops
  85.284  
  85.285 @@ -913,11 +913,11 @@
  85.286  
  85.287  datatype X = A | B X | C Y and Y = D X | E Y | F
  85.288  
  85.289 -lemma "P (x\<Colon>X)"
  85.290 +lemma "P (x::X)"
  85.291  nitpick [expect = genuine]
  85.292  oops
  85.293  
  85.294 -lemma "P (y\<Colon>Y)"
  85.295 +lemma "P (y::Y)"
  85.296  nitpick [expect = genuine]
  85.297  oops
  85.298  
  85.299 @@ -1001,7 +1001,7 @@
  85.300  
  85.301  datatype XOpt = CX "XOpt option" | DX "bool \<Rightarrow> XOpt option"
  85.302  
  85.303 -lemma "P (x\<Colon>XOpt)"
  85.304 +lemma "P (x::XOpt)"
  85.305  nitpick [expect = genuine]
  85.306  oops
  85.307  
  85.308 @@ -1019,7 +1019,7 @@
  85.309  
  85.310  datatype 'a YOpt = CY "('a \<Rightarrow> 'a YOpt) option"
  85.311  
  85.312 -lemma "P (x\<Colon>'a YOpt)"
  85.313 +lemma "P (x::'a YOpt)"
  85.314  nitpick [expect = genuine]
  85.315  oops
  85.316  
  85.317 @@ -1033,11 +1033,11 @@
  85.318  
  85.319  datatype Trie = TR "Trie list"
  85.320  
  85.321 -lemma "P (x\<Colon>Trie)"
  85.322 +lemma "P (x::Trie)"
  85.323  nitpick [expect = genuine]
  85.324  oops
  85.325  
  85.326 -lemma "\<forall>x\<Colon>Trie. P x"
  85.327 +lemma "\<forall>x::Trie. P x"
  85.328  nitpick [expect = genuine]
  85.329  oops
  85.330  
  85.331 @@ -1047,11 +1047,11 @@
  85.332  
  85.333  datatype InfTree = Leaf | Node "nat \<Rightarrow> InfTree"
  85.334  
  85.335 -lemma "P (x\<Colon>InfTree)"
  85.336 +lemma "P (x::InfTree)"
  85.337  nitpick [expect = genuine]
  85.338  oops
  85.339  
  85.340 -lemma "\<forall>x\<Colon>InfTree. P x"
  85.341 +lemma "\<forall>x::InfTree. P x"
  85.342  nitpick [expect = genuine]
  85.343  oops
  85.344  
  85.345 @@ -1075,11 +1075,11 @@
  85.346  
  85.347  datatype 'a lambda = Var 'a | App "'a lambda" "'a lambda" | Lam "'a \<Rightarrow> 'a lambda"
  85.348  
  85.349 -lemma "P (x\<Colon>'a lambda)"
  85.350 +lemma "P (x::'a lambda)"
  85.351  nitpick [expect = genuine]
  85.352  oops
  85.353  
  85.354 -lemma "\<forall>x\<Colon>'a lambda. P x"
  85.355 +lemma "\<forall>x::'a lambda. P x"
  85.356  nitpick [expect = genuine]
  85.357  oops
  85.358  
  85.359 @@ -1112,11 +1112,11 @@
  85.360  datatype (dead 'a, 'b) T = C "'a \<Rightarrow> bool" | D "'b list"
  85.361  datatype 'c U = E "('c, 'c U) T"
  85.362  
  85.363 -lemma "P (x\<Colon>'c U)"
  85.364 +lemma "P (x::'c U)"
  85.365  nitpick [expect = genuine]
  85.366  oops
  85.367  
  85.368 -lemma "\<forall>x\<Colon>'c U. P x"
  85.369 +lemma "\<forall>x::'c U. P x"
  85.370  nitpick [expect = genuine]
  85.371  oops
  85.372  
  85.373 @@ -1130,14 +1130,14 @@
  85.374    xpos :: 'a
  85.375    ypos :: 'b
  85.376  
  85.377 -lemma "(x\<Colon>('a, 'b) point) = y"
  85.378 +lemma "(x::('a, 'b) point) = y"
  85.379  nitpick [expect = genuine]
  85.380  oops
  85.381  
  85.382  record ('a, 'b, 'c) extpoint = "('a, 'b) point" +
  85.383    ext :: 'c
  85.384  
  85.385 -lemma "(x\<Colon>('a, 'b, 'c) extpoint) = y"
  85.386 +lemma "(x::('a, 'b, 'c) extpoint) = y"
  85.387  nitpick [expect = genuine]
  85.388  oops
  85.389  
  85.390 @@ -1218,7 +1218,7 @@
  85.391  
  85.392  class classA
  85.393  
  85.394 -lemma "P (x\<Colon>'a\<Colon>classA)"
  85.395 +lemma "P (x::'a::classA)"
  85.396  nitpick [expect = genuine]
  85.397  oops
  85.398  
  85.399 @@ -1227,11 +1227,11 @@
  85.400  class classC =
  85.401    assumes classC_ax: "\<exists>x y. x \<noteq> y"
  85.402  
  85.403 -lemma "P (x\<Colon>'a\<Colon>classC)"
  85.404 +lemma "P (x::'a::classC)"
  85.405  nitpick [expect = genuine]
  85.406  oops
  85.407  
  85.408 -lemma "\<exists>x y. (x\<Colon>'a\<Colon>classC) \<noteq> y"
  85.409 +lemma "\<exists>x y. (x::'a::classC) \<noteq> y"
  85.410  nitpick [expect = none]
  85.411  sorry
  85.412  
  85.413 @@ -1241,7 +1241,7 @@
  85.414    fixes classD_const :: "'a \<Rightarrow> 'a"
  85.415    assumes classD_ax: "classD_const (classD_const x) = classD_const x"
  85.416  
  85.417 -lemma "P (x\<Colon>'a\<Colon>classD)"
  85.418 +lemma "P (x::'a::classD)"
  85.419  nitpick [expect = genuine]
  85.420  oops
  85.421  
  85.422 @@ -1249,23 +1249,23 @@
  85.423  
  85.424  class classE = classC + classD
  85.425  
  85.426 -lemma "P (x\<Colon>'a\<Colon>classE)"
  85.427 +lemma "P (x::'a::classE)"
  85.428  nitpick [expect = genuine]
  85.429  oops
  85.430  
  85.431  text {* OFCLASS: *}
  85.432  
  85.433 -lemma "OFCLASS('a\<Colon>type, type_class)"
  85.434 +lemma "OFCLASS('a::type, type_class)"
  85.435  nitpick [expect = none]
  85.436  apply intro_classes
  85.437  done
  85.438  
  85.439 -lemma "OFCLASS('a\<Colon>classC, type_class)"
  85.440 +lemma "OFCLASS('a::classC, type_class)"
  85.441  nitpick [expect = none]
  85.442  apply intro_classes
  85.443  done
  85.444  
  85.445 -lemma "OFCLASS('a\<Colon>type, classC_class)"
  85.446 +lemma "OFCLASS('a::type, classC_class)"
  85.447  nitpick [expect = genuine]
  85.448  oops
  85.449  
  85.450 @@ -1274,19 +1274,19 @@
  85.451  consts inverse :: "'a \<Rightarrow> 'a"
  85.452  
  85.453  defs (overloaded)
  85.454 -inverse_bool: "inverse (b\<Colon>bool) \<equiv> \<not> b"
  85.455 -inverse_set: "inverse (S\<Colon>'a set) \<equiv> -S"
  85.456 +inverse_bool: "inverse (b::bool) \<equiv> \<not> b"
  85.457 +inverse_set: "inverse (S::'a set) \<equiv> -S"
  85.458  inverse_pair: "inverse p \<equiv> (inverse (fst p), inverse (snd p))"
  85.459  
  85.460  lemma "inverse b"
  85.461  nitpick [expect = genuine]
  85.462  oops
  85.463  
  85.464 -lemma "P (inverse (S\<Colon>'a set))"
  85.465 +lemma "P (inverse (S::'a set))"
  85.466  nitpick [expect = genuine]
  85.467  oops
  85.468  
  85.469 -lemma "P (inverse (p\<Colon>'a\<times>'b))"
  85.470 +lemma "P (inverse (p::'a\<times>'b))"
  85.471  nitpick [expect = genuine]
  85.472  oops
  85.473  
    86.1 --- a/src/HOL/Nitpick_Examples/Special_Nits.thy	Tue Sep 01 17:25:36 2015 +0200
    86.2 +++ b/src/HOL/Nitpick_Examples/Special_Nits.thy	Tue Sep 01 22:32:58 2015 +0200
    86.3 @@ -131,7 +131,7 @@
    86.4  sorry
    86.5  
    86.6  lemma "\<forall>a. g a = a
    86.7 -       \<Longrightarrow> \<exists>b\<^sub>1 b\<^sub>2 b\<^sub>3 b\<^sub>4 b\<^sub>5 b\<^sub>6 b\<^sub>7 b\<^sub>8 b\<^sub>9 b\<^sub>10 (b\<^sub>11\<Colon>nat).
    86.8 +       \<Longrightarrow> \<exists>b\<^sub>1 b\<^sub>2 b\<^sub>3 b\<^sub>4 b\<^sub>5 b\<^sub>6 b\<^sub>7 b\<^sub>8 b\<^sub>9 b\<^sub>10 (b\<^sub>11::nat).
    86.9             b\<^sub>1 < b\<^sub>11 \<and> f5 g x = f5 (\<lambda>a. if b\<^sub>1 < b\<^sub>11 then a else h b\<^sub>2) x"
   86.10  nitpick [expect = potential]
   86.11  nitpick [dont_specialize, expect = none]
   86.12 @@ -140,7 +140,7 @@
   86.13  sorry
   86.14  
   86.15  lemma "\<forall>a. g a = a
   86.16 -       \<Longrightarrow> \<exists>b\<^sub>1 b\<^sub>2 b\<^sub>3 b\<^sub>4 b\<^sub>5 b\<^sub>6 b\<^sub>7 b\<^sub>8 b\<^sub>9 b\<^sub>10 (b\<^sub>11\<Colon>nat).
   86.17 +       \<Longrightarrow> \<exists>b\<^sub>1 b\<^sub>2 b\<^sub>3 b\<^sub>4 b\<^sub>5 b\<^sub>6 b\<^sub>7 b\<^sub>8 b\<^sub>9 b\<^sub>10 (b\<^sub>11::nat).
   86.18             b\<^sub>1 < b\<^sub>11
   86.19             \<and> f5 g x = f5 (\<lambda>a. if b\<^sub>1 < b\<^sub>11 then
   86.20                                  a
   86.21 @@ -154,7 +154,7 @@
   86.22  sorry
   86.23  
   86.24  lemma "\<forall>a. g a = a
   86.25 -       \<Longrightarrow> \<exists>b\<^sub>1 b\<^sub>2 b\<^sub>3 b\<^sub>4 b\<^sub>5 b\<^sub>6 b\<^sub>7 b\<^sub>8 b\<^sub>9 b\<^sub>10 (b\<^sub>11\<Colon>nat).
   86.26 +       \<Longrightarrow> \<exists>b\<^sub>1 b\<^sub>2 b\<^sub>3 b\<^sub>4 b\<^sub>5 b\<^sub>6 b\<^sub>7 b\<^sub>8 b\<^sub>9 b\<^sub>10 (b\<^sub>11::nat).
   86.27             b\<^sub>1 < b\<^sub>11
   86.28             \<and> f5 g x = f5 (\<lambda>a. if b\<^sub>1 \<ge> b\<^sub>11 then
   86.29                                  a
    87.1 --- a/src/HOL/Nitpick_Examples/Typedef_Nits.thy	Tue Sep 01 17:25:36 2015 +0200
    87.2 +++ b/src/HOL/Nitpick_Examples/Typedef_Nits.thy	Tue Sep 01 22:32:58 2015 +0200
    87.3 @@ -14,7 +14,7 @@
    87.4  nitpick_params [verbose, card = 1-4, sat_solver = MiniSat_JNI, max_threads = 1,
    87.5                  timeout = 240]
    87.6  
    87.7 -definition "three = {0\<Colon>nat, 1, 2}"
    87.8 +definition "three = {0::nat, 1, 2}"
    87.9  typedef three = three
   87.10  unfolding three_def by blast
   87.11  
   87.12 @@ -22,37 +22,37 @@
   87.13  definition B :: three where "B \<equiv> Abs_three 1"
   87.14  definition C :: three where "C \<equiv> Abs_three 2"
   87.15  
   87.16 -lemma "x = (y\<Colon>three)"
   87.17 +lemma "x = (y::three)"
   87.18  nitpick [expect = genuine]
   87.19  oops
   87.20  
   87.21 -definition "one_or_two = {undefined False\<Colon>'a, undefined True}"
   87.22 +definition "one_or_two = {undefined False::'a, undefined True}"
   87.23  
   87.24  typedef 'a one_or_two = "one_or_two :: 'a set"
   87.25  unfolding one_or_two_def by auto
   87.26  
   87.27 -lemma "x = (y\<Colon>unit one_or_two)"
   87.28 +lemma "x = (y::unit one_or_two)"
   87.29  nitpick [expect = none]
   87.30  sorry
   87.31  
   87.32 -lemma "x = (y\<Colon>bool one_or_two)"
   87.33 +lemma "x = (y::bool one_or_two)"
   87.34  nitpick [expect = genuine]
   87.35  oops
   87.36  
   87.37 -lemma "undefined False \<longleftrightarrow> undefined True \<Longrightarrow> x = (y\<Colon>bool one_or_two)"
   87.38 +lemma "undefined False \<longleftrightarrow> undefined True \<Longrightarrow> x = (y::bool one_or_two)"
   87.39  nitpick [expect = none]
   87.40  sorry
   87.41  
   87.42 -lemma "undefined False \<longleftrightarrow> undefined True \<Longrightarrow> \<exists>x (y\<Colon>bool one_or_two). x \<noteq> y"
   87.43 +lemma "undefined False \<longleftrightarrow> undefined True \<Longrightarrow> \<exists>x (y::bool one_or_two). x \<noteq> y"
   87.44  nitpick [card = 1, expect = potential] (* unfortunate *)
   87.45  oops
   87.46  
   87.47 -lemma "\<exists>x (y\<Colon>bool one_or_two). x \<noteq> y"
   87.48 +lemma "\<exists>x (y::bool one_or_two). x \<noteq> y"
   87.49  nitpick [card = 1, expect = potential] (* unfortunate *)
   87.50  nitpick [card = 2, expect = none]
   87.51  oops
   87.52  
   87.53 -definition "bounded = {n\<Colon>nat. finite (UNIV \<Colon> 'a set) \<longrightarrow> n < card (UNIV \<Colon> 'a set)}"
   87.54 +definition "bounded = {n::nat. finite (UNIV :: 'a set) \<longrightarrow> n < card (UNIV :: 'a set)}"
   87.55  
   87.56  typedef 'a bounded = "bounded(TYPE('a))"
   87.57  unfolding bounded_def
   87.58 @@ -60,23 +60,23 @@
   87.59  apply (case_tac "card UNIV = 0")
   87.60  by auto
   87.61  
   87.62 -lemma "x = (y\<Colon>unit bounded)"
   87.63 +lemma "x = (y::unit bounded)"
   87.64  nitpick [expect = none]
   87.65  sorry
   87.66  
   87.67 -lemma "x = (y\<Colon>bool bounded)"
   87.68 +lemma "x = (y::bool bounded)"
   87.69  nitpick [expect = genuine]
   87.70  oops
   87.71  
   87.72 -lemma "x \<noteq> (y\<Colon>bool bounded) \<Longrightarrow> z = x \<or> z = y"
   87.73 +lemma "x \<noteq> (y::bool bounded) \<Longrightarrow> z = x \<or> z = y"
   87.74  nitpick [expect = potential] (* unfortunate *)
   87.75  sorry
   87.76  
   87.77 -lemma "x \<noteq> (y\<Colon>(bool \<times> bool) bounded) \<Longrightarrow> z = x \<or> z = y"
   87.78 +lemma "x \<noteq> (y::(bool \<times> bool) bounded) \<Longrightarrow> z = x \<or> z = y"
   87.79  nitpick [card = 1-5, expect = genuine]
   87.80  oops
   87.81  
   87.82 -lemma "True \<equiv> ((\<lambda>x\<Colon>bool. x) = (\<lambda>x. x))"
   87.83 +lemma "True \<equiv> ((\<lambda>x::bool. x) = (\<lambda>x. x))"
   87.84  nitpick [expect = none]
   87.85  by (rule True_def)
   87.86  
   87.87 @@ -183,7 +183,7 @@
   87.88  nitpick [card = 1, expect = none]
   87.89  by (rule Rep_rat_inverse)
   87.90  
   87.91 -typedef check = "{x\<Colon>nat. x < 2}" by (rule exI[of _ 0], auto)
   87.92 +typedef check = "{x::nat. x < 2}" by (rule exI[of _ 0], auto)
   87.93  
   87.94  lemma "Rep_check (Abs_check n) = n \<Longrightarrow> n < 2"
   87.95  nitpick [card = 1-3, expect = none]
    88.1 --- a/src/HOL/Old_Number_Theory/Primes.thy	Tue Sep 01 17:25:36 2015 +0200
    88.2 +++ b/src/HOL/Old_Number_Theory/Primes.thy	Tue Sep 01 22:32:58 2015 +0200
    88.3 @@ -108,7 +108,7 @@
    88.4  
    88.5  declare nat_mult_dvd_cancel_disj[presburger]
    88.6  lemma nat_mult_dvd_cancel_disj'[presburger]: 
    88.7 -  "(m\<Colon>nat)*k dvd n*k \<longleftrightarrow> k = 0 \<or> m dvd n" unfolding mult.commute[of m k] mult.commute[of n k] by presburger 
    88.8 +  "(m::nat)*k dvd n*k \<longleftrightarrow> k = 0 \<or> m dvd n" unfolding mult.commute[of m k] mult.commute[of n k] by presburger 
    88.9  
   88.10  lemma divides_mul_l: "(a::nat) dvd b ==> (c * a) dvd (c * b)"
   88.11    by presburger
    89.1 --- a/src/HOL/Orderings.thy	Tue Sep 01 17:25:36 2015 +0200
    89.2 +++ b/src/HOL/Orderings.thy	Tue Sep 01 22:32:58 2015 +0200
    89.3 @@ -1034,21 +1034,21 @@
    89.4  context order
    89.5  begin
    89.6  
    89.7 -definition mono :: "('a \<Rightarrow> 'b\<Colon>order) \<Rightarrow> bool" where
    89.8 +definition mono :: "('a \<Rightarrow> 'b::order) \<Rightarrow> bool" where
    89.9    "mono f \<longleftrightarrow> (\<forall>x y. x \<le> y \<longrightarrow> f x \<le> f y)"
   89.10  
   89.11  lemma monoI [intro?]:
   89.12 -  fixes f :: "'a \<Rightarrow> 'b\<Colon>order"
   89.13 +  fixes f :: "'a \<Rightarrow> 'b::order"
   89.14    shows "(\<And>x y. x \<le> y \<Longrightarrow> f x \<le> f y) \<Longrightarrow> mono f"
   89.15    unfolding mono_def by iprover
   89.16  
   89.17  lemma monoD [dest?]:
   89.18 -  fixes f :: "'a \<Rightarrow> 'b\<Colon>order"
   89.19 +  fixes f :: "'a \<Rightarrow> 'b::order"
   89.20    shows "mono f \<Longrightarrow> x \<le> y \<Longrightarrow> f x \<le> f y"
   89.21    unfolding mono_def by iprover
   89.22  
   89.23  lemma monoE:
   89.24 -  fixes f :: "'a \<Rightarrow> 'b\<Colon>order"
   89.25 +  fixes f :: "'a \<Rightarrow> 'b::order"
   89.26    assumes "mono f"
   89.27    assumes "x \<le> y"
   89.28    obtains "f x \<le> f y"
   89.29 @@ -1056,21 +1056,21 @@
   89.30    from assms show "f x \<le> f y" by (simp add: mono_def)
   89.31  qed
   89.32  
   89.33 -definition antimono :: "('a \<Rightarrow> 'b\<Colon>order) \<Rightarrow> bool" where
   89.34 +definition antimono :: "('a \<Rightarrow> 'b::order) \<Rightarrow> bool" where
   89.35    "antimono f \<longleftrightarrow> (\<forall>x y. x \<le> y \<longrightarrow> f x \<ge> f y)"
   89.36  
   89.37  lemma antimonoI [intro?]:
   89.38 -  fixes f :: "'a \<Rightarrow> 'b\<Colon>order"
   89.39 +  fixes f :: "'a \<Rightarrow> 'b::order"
   89.40    shows "(\<And>x y. x \<le> y \<Longrightarrow> f x \<ge> f y) \<Longrightarrow> antimono f"
   89.41    unfolding antimono_def by iprover
   89.42  
   89.43  lemma antimonoD [dest?]:
   89.44 -  fixes f :: "'a \<Rightarrow> 'b\<Colon>order"
   89.45 +  fixes f :: "'a \<Rightarrow> 'b::order"
   89.46    shows "antimono f \<Longrightarrow> x \<le> y \<Longrightarrow> f x \<ge> f y"
   89.47    unfolding antimono_def by iprover
   89.48  
   89.49  lemma antimonoE:
   89.50 -  fixes f :: "'a \<Rightarrow> 'b\<Colon>order"
   89.51 +  fixes f :: "'a \<Rightarrow> 'b::order"
   89.52    assumes "antimono f"
   89.53    assumes "x \<le> y"
   89.54    obtains "f x \<ge> f y"
   89.55 @@ -1078,7 +1078,7 @@
   89.56    from assms show "f x \<ge> f y" by (simp add: antimono_def)
   89.57  qed
   89.58  
   89.59 -definition strict_mono :: "('a \<Rightarrow> 'b\<Colon>order) \<Rightarrow> bool" where
   89.60 +definition strict_mono :: "('a \<Rightarrow> 'b::order) \<Rightarrow> bool" where
   89.61    "strict_mono f \<longleftrightarrow> (\<forall>x y. x < y \<longrightarrow> f x < f y)"
   89.62  
   89.63  lemma strict_monoI [intro?]:
   89.64 @@ -1112,7 +1112,7 @@
   89.65  begin
   89.66  
   89.67  lemma mono_invE:
   89.68 -  fixes f :: "'a \<Rightarrow> 'b\<Colon>order"
   89.69 +  fixes f :: "'a \<Rightarrow> 'b::order"
   89.70    assumes "mono f"
   89.71    assumes "f x < f y"
   89.72    obtains "x \<le> y"
   89.73 @@ -1180,10 +1180,10 @@
   89.74  lemma max_absorb2: "x \<le> y \<Longrightarrow> max x y = y"
   89.75    by (simp add: max_def)
   89.76  
   89.77 -lemma min_absorb2: "(y\<Colon>'a\<Colon>order) \<le> x \<Longrightarrow> min x y = y"
   89.78 +lemma min_absorb2: "(y::'a::order) \<le> x \<Longrightarrow> min x y = y"
   89.79    by (simp add:min_def)
   89.80  
   89.81 -lemma max_absorb1: "(y\<Colon>'a\<Colon>order) \<le> x \<Longrightarrow> max x y = x"
   89.82 +lemma max_absorb1: "(y::'a::order) \<le> x \<Longrightarrow> max x y = x"
   89.83    by (simp add: max_def)
   89.84  
   89.85  
   89.86 @@ -1409,7 +1409,7 @@
   89.87    le_bool_def [simp]: "P \<le> Q \<longleftrightarrow> P \<longrightarrow> Q"
   89.88  
   89.89  definition
   89.90 -  [simp]: "(P\<Colon>bool) < Q \<longleftrightarrow> \<not> P \<and> Q"
   89.91 +  [simp]: "(P::bool) < Q \<longleftrightarrow> \<not> P \<and> Q"
   89.92  
   89.93  definition
   89.94    [simp]: "\<bottom> \<longleftrightarrow> False"
   89.95 @@ -1457,7 +1457,7 @@
   89.96    le_fun_def: "f \<le> g \<longleftrightarrow> (\<forall>x. f x \<le> g x)"
   89.97  
   89.98  definition
   89.99 -  "(f\<Colon>'a \<Rightarrow> 'b) < g \<longleftrightarrow> f \<le> g \<and> \<not> (g \<le> f)"
  89.100 +  "(f::'a \<Rightarrow> 'b) < g \<longleftrightarrow> f \<le> g \<and> \<not> (g \<le> f)"
  89.101  
  89.102  instance ..
  89.103  
  89.104 @@ -1620,4 +1620,3 @@
  89.105  lemmas linorder_antisym_conv3 = linorder_class.antisym_conv3
  89.106  
  89.107  end
  89.108 -
    90.1 --- a/src/HOL/Power.thy	Tue Sep 01 17:25:36 2015 +0200
    90.2 +++ b/src/HOL/Power.thy	Tue Sep 01 22:32:58 2015 +0200
    90.3 @@ -800,7 +800,7 @@
    90.4  Premises cannot be weakened: consider the case where @{term "i=0"},
    90.5  @{term "m=1"} and @{term "n=0"}.\<close>
    90.6  lemma nat_power_less_imp_less:
    90.7 -  assumes nonneg: "0 < (i\<Colon>nat)"
    90.8 +  assumes nonneg: "0 < (i::nat)"
    90.9    assumes less: "i ^ m < i ^ n"
   90.10    shows "m < n"
   90.11  proof (cases "i = 1")
    91.1 --- a/src/HOL/Probability/Borel_Space.thy	Tue Sep 01 17:25:36 2015 +0200
    91.2 +++ b/src/HOL/Probability/Borel_Space.thy	Tue Sep 01 22:32:58 2015 +0200
    91.3 @@ -81,7 +81,7 @@
    91.4    by simp
    91.5  
    91.6  lemma borel_measurableI:
    91.7 -  fixes f :: "'a \<Rightarrow> 'x\<Colon>topological_space"
    91.8 +  fixes f :: "'a \<Rightarrow> 'x::topological_space"
    91.9    assumes "\<And>S. open S \<Longrightarrow> f -` S \<inter> space M \<in> sets M"
   91.10    shows "f \<in> borel_measurable M"
   91.11    unfolding borel_def
   91.12 @@ -452,7 +452,7 @@
   91.13    by (rule borel_measurable_continuous_Pair) (intro continuous_intros)
   91.14  
   91.15  lemma [measurable]:
   91.16 -  fixes a b :: "'a\<Colon>linorder_topology"
   91.17 +  fixes a b :: "'a::linorder_topology"
   91.18    shows lessThan_borel: "{..< a} \<in> sets borel"
   91.19      and greaterThan_borel: "{a <..} \<in> sets borel"
   91.20      and greaterThanLessThan_borel: "{a<..<b} \<in> sets borel"
   91.21 @@ -473,7 +473,7 @@
   91.22    by auto
   91.23  
   91.24  lemma eucl_ivals[measurable]:
   91.25 -  fixes a b :: "'a\<Colon>ordered_euclidean_space"
   91.26 +  fixes a b :: "'a::ordered_euclidean_space"
   91.27    shows "{x. x <e a} \<in> sets borel"
   91.28      and "{x. a <e x} \<in> sets borel"
   91.29      and "{..a} \<in> sets borel"
   91.30 @@ -597,7 +597,7 @@
   91.31    using assms by (intro borel_eq_sigmaI1[where X="range G" and F="(\<lambda>(i, j). F i j)"]) auto
   91.32  
   91.33  lemma borel_eq_box:
   91.34 -  "borel = sigma UNIV (range (\<lambda> (a, b). box a b :: 'a \<Colon> euclidean_space set))"
   91.35 +  "borel = sigma UNIV (range (\<lambda> (a, b). box a b :: 'a :: euclidean_space set))"
   91.36      (is "_ = ?SIGMA")
   91.37  proof (rule borel_eq_sigmaI1[OF borel_def])
   91.38    fix M :: "'a set" assume "M \<in> {S. open S}"
   91.39 @@ -611,13 +611,13 @@
   91.40  
   91.41  lemma halfspace_gt_in_halfspace:
   91.42    assumes i: "i \<in> A"
   91.43 -  shows "{x\<Colon>'a. a < x \<bullet> i} \<in> 
   91.44 -    sigma_sets UNIV ((\<lambda> (a, i). {x\<Colon>'a\<Colon>euclidean_space. x \<bullet> i < a}) ` (UNIV \<times> A))"
   91.45 +  shows "{x::'a. a < x \<bullet> i} \<in> 
   91.46 +    sigma_sets UNIV ((\<lambda> (a, i). {x::'a::euclidean_space. x \<bullet> i < a}) ` (UNIV \<times> A))"
   91.47    (is "?set \<in> ?SIGMA")
   91.48  proof -
   91.49    interpret sigma_algebra UNIV ?SIGMA
   91.50      by (intro sigma_algebra_sigma_sets) simp_all
   91.51 -  have *: "?set = (\<Union>n. UNIV - {x\<Colon>'a. x \<bullet> i < a + 1 / real (Suc n)})"
   91.52 +  have *: "?set = (\<Union>n. UNIV - {x::'a. x \<bullet> i < a + 1 / real (Suc n)})"
   91.53    proof (safe, simp_all add: not_less)
   91.54      fix x :: 'a assume "a < x \<bullet> i"
   91.55      with reals_Archimedean[of "x \<bullet> i - a"]
   91.56 @@ -673,7 +673,7 @@
   91.57  qed auto
   91.58  
   91.59  lemma borel_eq_halfspace_ge:
   91.60 -  "borel = sigma UNIV ((\<lambda> (a, i). {x\<Colon>'a\<Colon>euclidean_space. a \<le> x \<bullet> i}) ` (UNIV \<times> Basis))"
   91.61 +  "borel = sigma UNIV ((\<lambda> (a, i). {x::'a::euclidean_space. a \<le> x \<bullet> i}) ` (UNIV \<times> Basis))"
   91.62    (is "_ = ?SIGMA")
   91.63  proof (rule borel_eq_sigmaI2[OF borel_eq_halfspace_less])
   91.64    fix a :: real and i :: 'a assume i: "(a, i) \<in> UNIV \<times> Basis"
   91.65 @@ -683,7 +683,7 @@
   91.66  qed auto
   91.67  
   91.68  lemma borel_eq_halfspace_greater:
   91.69 -  "borel = sigma UNIV ((\<lambda> (a, i). {x\<Colon>'a\<Colon>euclidean_space. a < x \<bullet> i}) ` (UNIV \<times> Basis))"
   91.70 +  "borel = sigma UNIV ((\<lambda> (a, i). {x::'a::euclidean_space. a < x \<bullet> i}) ` (UNIV \<times> Basis))"
   91.71    (is "_ = ?SIGMA")
   91.72  proof (rule borel_eq_sigmaI2[OF borel_eq_halfspace_le])
   91.73    fix a :: real and i :: 'a assume "(a, i) \<in> (UNIV \<times> Basis)"
   91.74 @@ -694,7 +694,7 @@
   91.75  qed auto
   91.76  
   91.77  lemma borel_eq_atMost:
   91.78 -  "borel = sigma UNIV (range (\<lambda>a. {..a\<Colon>'a\<Colon>ordered_euclidean_space}))"
   91.79 +  "borel = sigma UNIV (range (\<lambda>a. {..a::'a::ordered_euclidean_space}))"
   91.80    (is "_ = ?SIGMA")
   91.81  proof (rule borel_eq_sigmaI4[OF borel_eq_halfspace_le])
   91.82    fix a :: real and i :: 'a assume "(a, i) \<in> UNIV \<times> Basis"
   91.83 @@ -713,7 +713,7 @@
   91.84  qed auto
   91.85  
   91.86  lemma borel_eq_greaterThan:
   91.87 -  "borel = sigma UNIV (range (\<lambda>a\<Colon>'a\<Colon>ordered_euclidean_space. {x. a <e x}))"
   91.88 +  "borel = sigma UNIV (range (\<lambda>a::'a::ordered_euclidean_space. {x. a <e x}))"
   91.89    (is "_ = ?SIGMA")
   91.90  proof (rule borel_eq_sigmaI4[OF borel_eq_halfspace_le])
   91.91    fix a :: real and i :: 'a assume "(a, i) \<in> UNIV \<times> Basis"
   91.92 @@ -740,7 +740,7 @@
   91.93  qed auto
   91.94  
   91.95  lemma borel_eq_lessThan:
   91.96 -  "borel = sigma UNIV (range (\<lambda>a\<Colon>'a\<Colon>ordered_euclidean_space. {x. x <e a}))"
   91.97 +  "borel = sigma UNIV (range (\<lambda>a::'a::ordered_euclidean_space. {x. x <e a}))"
   91.98    (is "_ = ?SIGMA")
   91.99  proof (rule borel_eq_sigmaI4[OF borel_eq_halfspace_ge])
  91.100    fix a :: real and i :: 'a assume "(a, i) \<in> UNIV \<times> Basis"
  91.101 @@ -766,7 +766,7 @@
  91.102  qed auto
  91.103  
  91.104  lemma borel_eq_atLeastAtMost:
  91.105 -  "borel = sigma UNIV (range (\<lambda>(a,b). {a..b} \<Colon>'a\<Colon>ordered_euclidean_space set))"
  91.106 +  "borel = sigma UNIV (range (\<lambda>(a,b). {a..b} ::'a::ordered_euclidean_space set))"
  91.107    (is "_ = ?SIGMA")
  91.108  proof (rule borel_eq_sigmaI5[OF borel_eq_atMost])
  91.109    fix a::'a
  91.110 @@ -828,7 +828,7 @@
  91.111  qed simp_all
  91.112  
  91.113  lemma borel_measurable_halfspacesI:
  91.114 -  fixes f :: "'a \<Rightarrow> 'c\<Colon>euclidean_space"
  91.115 +  fixes f :: "'a \<Rightarrow> 'c::euclidean_space"
  91.116    assumes F: "borel = sigma UNIV (F ` (UNIV \<times> Basis))"
  91.117    and S_eq: "\<And>a i. S a i = f -` F (a,i) \<inter> space M" 
  91.118    shows "f \<in> borel_measurable M = (\<forall>i\<in>Basis. \<forall>a::real. S a i \<in> sets M)"
  91.119 @@ -843,22 +843,22 @@
  91.120  qed
  91.121  
  91.122  lemma borel_measurable_iff_halfspace_le:
  91.123 -  fixes f :: "'a \<Rightarrow> 'c\<Colon>euclidean_space"
  91.124 +  fixes f :: "'a \<Rightarrow> 'c::euclidean_space"
  91.125    shows "f \<in> borel_measurable M = (\<forall>i\<in>Basis. \<forall>a. {w \<in> space M. f w \<bullet> i \<le> a} \<in> sets M)"
  91.126    by (rule borel_measurable_halfspacesI[OF borel_eq_halfspace_le]) auto
  91.127  
  91.128  lemma borel_measurable_iff_halfspace_less:
  91.129 -  fixes f :: "'a \<Rightarrow> 'c\<Colon>euclidean_space"
  91.130 +  fixes f :: "'a \<Rightarrow> 'c::euclidean_space"
  91.131    shows "f \<in> borel_measurable M \<longleftrightarrow> (\<forall>i\<in>Basis. \<forall>a. {w \<in> space M. f w \<bullet> i < a} \<in> sets M)"
  91.132    by (rule borel_measurable_halfspacesI[OF borel_eq_halfspace_less]) auto
  91.133  
  91.134  lemma borel_measurable_iff_halfspace_ge:
  91.135 -  fixes f :: "'a \<Rightarrow> 'c\<Colon>euclidean_space"
  91.136 +  fixes f :: "'a \<Rightarrow> 'c::euclidean_space"
  91.137    shows "f \<in> borel_measurable M = (\<forall>i\<in>Basis. \<forall>a. {w \<in> space M. a \<le> f w \<bullet> i} \<in> sets M)"
  91.138    by (rule borel_measurable_halfspacesI[OF borel_eq_halfspace_ge]) auto
  91.139  
  91.140  lemma borel_measurable_iff_halfspace_greater:
  91.141 -  fixes f :: "'a \<Rightarrow> 'c\<Colon>euclidean_space"
  91.142 +  fixes f :: "'a \<Rightarrow> 'c::euclidean_space"
  91.143    shows "f \<in> borel_measurable M \<longleftrightarrow> (\<forall>i\<in>Basis. \<forall>a. {w \<in> space M. a < f w \<bullet> i} \<in> sets M)"
  91.144    by (rule borel_measurable_halfspacesI[OF borel_eq_halfspace_greater]) auto
  91.145  
    92.1 --- a/src/HOL/Product_Type.thy	Tue Sep 01 17:25:36 2015 +0200
    92.2 +++ b/src/HOL/Product_Type.thy	Tue Sep 01 22:32:58 2015 +0200
    92.3 @@ -189,7 +189,7 @@
    92.4  end
    92.5  
    92.6  lemma [code]:
    92.7 -  "HOL.equal (u\<Colon>unit) v \<longleftrightarrow> True" unfolding equal unit_eq [of u] unit_eq [of v] by rule+
    92.8 +  "HOL.equal (u::unit) v \<longleftrightarrow> True" unfolding equal unit_eq [of u] unit_eq [of v] by rule+
    92.9  
   92.10  code_printing
   92.11    type_constructor unit \<rightharpoonup>
   92.12 @@ -224,7 +224,7 @@
   92.13  definition Pair_Rep :: "'a \<Rightarrow> 'b \<Rightarrow> 'a \<Rightarrow> 'b \<Rightarrow> bool" where
   92.14    "Pair_Rep a b = (\<lambda>x y. x = a \<and> y = b)"
   92.15  
   92.16 -definition "prod = {f. \<exists>a b. f = Pair_Rep (a\<Colon>'a) (b\<Colon>'b)}"
   92.17 +definition "prod = {f. \<exists>a b. f = Pair_Rep (a::'a) (b::'b)}"
   92.18  
   92.19  typedef ('a, 'b) prod (infixr "*" 20) = "prod :: ('a \<Rightarrow> 'b \<Rightarrow> bool) set"
   92.20    unfolding prod_def by auto
   92.21 @@ -1285,7 +1285,7 @@
   92.22  unfolding image_def
   92.23  proof(rule set_eqI,rule iffI)
   92.24    fix x :: "'a \<times> 'c"
   92.25 -  assume "x \<in> {y\<Colon>'a \<times> 'c. \<exists>x\<Colon>'b \<times> 'd\<in>A \<times> B. y = map_prod f g x}"
   92.26 +  assume "x \<in> {y::'a \<times> 'c. \<exists>x::'b \<times> 'd\<in>A \<times> B. y = map_prod f g x}"
   92.27    then obtain y where "y \<in> A \<times> B" and "x = map_prod f g y" by blast
   92.28    from \<open>image f A = A'\<close> and \<open>y \<in> A \<times> B\<close> have "f (fst y) \<in> A'" by auto
   92.29    moreover from \<open>image g B = B'\<close> and \<open>y \<in> A \<times> B\<close> have "g (snd y) \<in> B'" by auto
    93.1 --- a/src/HOL/Proofs/Extraction/Euclid.thy	Tue Sep 01 17:25:36 2015 +0200
    93.2 +++ b/src/HOL/Proofs/Extraction/Euclid.thy	Tue Sep 01 22:32:58 2015 +0200
    93.3 @@ -123,7 +123,7 @@
    93.4    qed
    93.5  qed
    93.6  
    93.7 -lemma dvd_prod [iff]: "n dvd (PROD m\<Colon>nat:#mset (n # ns). m)"
    93.8 +lemma dvd_prod [iff]: "n dvd (PROD m::nat:#mset (n # ns). m)"
    93.9    by (simp add: msetprod_Un msetprod_singleton)
   93.10  
   93.11  definition all_prime :: "nat list \<Rightarrow> bool" where
   93.12 @@ -140,13 +140,13 @@
   93.13  
   93.14  lemma split_all_prime:
   93.15    assumes "all_prime ms" and "all_prime ns"
   93.16 -  shows "\<exists>qs. all_prime qs \<and> (PROD m\<Colon>nat:#mset qs. m) =
   93.17 -    (PROD m\<Colon>nat:#mset ms. m) * (PROD m\<Colon>nat:#mset ns. m)" (is "\<exists>qs. ?P qs \<and> ?Q qs")
   93.18 +  shows "\<exists>qs. all_prime qs \<and> (PROD m::nat:#mset qs. m) =
   93.19 +    (PROD m::nat:#mset ms. m) * (PROD m::nat:#mset ns. m)" (is "\<exists>qs. ?P qs \<and> ?Q qs")
   93.20  proof -
   93.21    from assms have "all_prime (ms @ ns)"
   93.22      by (simp add: all_prime_append)
   93.23 -  moreover from assms have "(PROD m\<Colon>nat:#mset (ms @ ns). m) =
   93.24 -    (PROD m\<Colon>nat:#mset ms. m) * (PROD m\<Colon>nat:#mset ns. m)"
   93.25 +  moreover from assms have "(PROD m::nat:#mset (ms @ ns). m) =
   93.26 +    (PROD m::nat:#mset ms. m) * (PROD m::nat:#mset ns. m)"
   93.27      by (simp add: msetprod_Un)
   93.28    ultimately have "?P (ms @ ns) \<and> ?Q (ms @ ns)" ..
   93.29    then show ?thesis ..
   93.30 @@ -154,11 +154,11 @@
   93.31  
   93.32  lemma all_prime_nempty_g_one:
   93.33    assumes "all_prime ps" and "ps \<noteq> []"
   93.34 -  shows "Suc 0 < (PROD m\<Colon>nat:#mset ps. m)"
   93.35 +  shows "Suc 0 < (PROD m::nat:#mset ps. m)"
   93.36    using `ps \<noteq> []` `all_prime ps` unfolding One_nat_def [symmetric] by (induct ps rule: list_nonempty_induct)
   93.37      (simp_all add: all_prime_simps msetprod_singleton msetprod_Un prime_gt_1_nat less_1_mult del: One_nat_def)
   93.38  
   93.39 -lemma factor_exists: "Suc 0 < n \<Longrightarrow> (\<exists>ps. all_prime ps \<and> (PROD m\<Colon>nat:#mset ps. m) = n)"
   93.40 +lemma factor_exists: "Suc 0 < n \<Longrightarrow> (\<exists>ps. all_prime ps \<and> (PROD m::nat:#mset ps. m) = n)"
   93.41  proof (induct n rule: nat_wf_ind)
   93.42    case (1 n)
   93.43    from `Suc 0 < n`
   93.44 @@ -169,21 +169,21 @@
   93.45      assume "\<exists>m k. Suc 0 < m \<and> Suc 0 < k \<and> m < n \<and> k < n \<and> n = m * k"
   93.46      then obtain m k where m: "Suc 0 < m" and k: "Suc 0 < k" and mn: "m < n"
   93.47        and kn: "k < n" and nmk: "n = m * k" by iprover
   93.48 -    from mn and m have "\<exists>ps. all_prime ps \<and> (PROD m\<Colon>nat:#mset ps. m) = m" by (rule 1)
   93.49 -    then obtain ps1 where "all_prime ps1" and prod_ps1_m: "(PROD m\<Colon>nat:#mset ps1. m) = m"
   93.50 +    from mn and m have "\<exists>ps. all_prime ps \<and> (PROD m::nat:#mset ps. m) = m" by (rule 1)
   93.51 +    then obtain ps1 where "all_prime ps1" and prod_ps1_m: "(PROD m::nat:#mset ps1. m) = m"
   93.52        by iprover
   93.53 -    from kn and k have "\<exists>ps. all_prime ps \<and> (PROD m\<Colon>nat:#mset ps. m) = k" by (rule 1)
   93.54 -    then obtain ps2 where "all_prime ps2" and prod_ps2_k: "(PROD m\<Colon>nat:#mset ps2. m) = k"
   93.55 +    from kn and k have "\<exists>ps. all_prime ps \<and> (PROD m::nat:#mset ps. m) = k" by (rule 1)
   93.56 +    then obtain ps2 where "all_prime ps2" and prod_ps2_k: "(PROD m::nat:#mset ps2. m) = k"
   93.57        by iprover
   93.58      from `all_prime ps1` `all_prime ps2`
   93.59 -    have "\<exists>ps. all_prime ps \<and> (PROD m\<Colon>nat:#mset ps. m) =
   93.60 -      (PROD m\<Colon>nat:#mset ps1. m) * (PROD m\<Colon>nat:#mset ps2. m)"
   93.61 +    have "\<exists>ps. all_prime ps \<and> (PROD m::nat:#mset ps. m) =
   93.62 +      (PROD m::nat:#mset ps1. m) * (PROD m::nat:#mset ps2. m)"
   93.63        by (rule split_all_prime)
   93.64      with prod_ps1_m prod_ps2_k nmk show ?thesis by simp
   93.65    next
   93.66      assume "prime n" then have "all_prime [n]" by (simp add: all_prime_simps)
   93.67 -    moreover have "(PROD m\<Colon>nat:#mset [n]. m) = n" by (simp add: msetprod_singleton)
   93.68 -    ultimately have "all_prime [n] \<and> (PROD m\<Colon>nat:#mset [n]. m) = n" ..
   93.69 +    moreover have "(PROD m::nat:#mset [n]. m) = n" by (simp add: msetprod_singleton)
   93.70 +    ultimately have "all_prime [n] \<and> (PROD m::nat:#mset [n]. m) = n" ..
   93.71      then show ?thesis ..
   93.72    qed
   93.73  qed
   93.74 @@ -193,7 +193,7 @@
   93.75    shows "\<exists>p. prime p \<and> p dvd n"
   93.76  proof -
   93.77    from N obtain ps where "all_prime ps"
   93.78 -    and prod_ps: "n = (PROD m\<Colon>nat:#mset ps. m)" using factor_exists
   93.79 +    and prod_ps: "n = (PROD m::nat:#mset ps. m)" using factor_exists
   93.80      by simp iprover
   93.81    with N have "ps \<noteq> []"
   93.82      by (auto simp add: all_prime_nempty_g_one msetprod_empty)
    94.1 --- a/src/HOL/Quickcheck_Random.thy	Tue Sep 01 17:25:36 2015 +0200
    94.2 +++ b/src/HOL/Quickcheck_Random.thy	Tue Sep 01 22:32:58 2015 +0200
    94.3 @@ -131,7 +131,7 @@
    94.4    \<Rightarrow> Random.seed \<Rightarrow> (('a \<Rightarrow> 'b) \<times> (unit \<Rightarrow> term)) \<times> Random.seed"
    94.5  
    94.6  definition random_fun_lift :: "(Random.seed \<Rightarrow> ('b \<times> (unit \<Rightarrow> term)) \<times> Random.seed)
    94.7 -  \<Rightarrow> Random.seed \<Rightarrow> (('a\<Colon>term_of \<Rightarrow> 'b\<Colon>typerep) \<times> (unit \<Rightarrow> term)) \<times> Random.seed"
    94.8 +  \<Rightarrow> Random.seed \<Rightarrow> (('a::term_of \<Rightarrow> 'b::typerep) \<times> (unit \<Rightarrow> term)) \<times> Random.seed"
    94.9  where
   94.10    "random_fun_lift f =
   94.11      random_fun_aux TYPEREP('a) TYPEREP('b) (op =) Code_Evaluation.term_of f Random.split_seed"
    95.1 --- a/src/HOL/Quotient_Examples/Quotient_Int.thy	Tue Sep 01 17:25:36 2015 +0200
    95.2 +++ b/src/HOL/Quotient_Examples/Quotient_Int.thy	Tue Sep 01 22:32:58 2015 +0200
    95.3 @@ -22,10 +22,10 @@
    95.4  begin
    95.5  
    95.6  quotient_definition
    95.7 -  "0 \<Colon> int" is "(0\<Colon>nat, 0\<Colon>nat)" done
    95.8 +  "0 :: int" is "(0::nat, 0::nat)" done
    95.9  
   95.10  quotient_definition
   95.11 -  "1 \<Colon> int" is "(1\<Colon>nat, 0\<Colon>nat)" done
   95.12 +  "1 :: int" is "(1::nat, 0::nat)" done
   95.13  
   95.14  fun
   95.15    plus_int_raw :: "(nat \<times> nat) \<Rightarrow> (nat \<times> nat) \<Rightarrow> (nat \<times> nat)"
   95.16 @@ -33,7 +33,7 @@
   95.17    "plus_int_raw (x, y) (u, v) = (x + u, y + v)"
   95.18  
   95.19  quotient_definition
   95.20 -  "(op +) \<Colon> (int \<Rightarrow> int \<Rightarrow> int)" is "plus_int_raw" by auto
   95.21 +  "(op +) :: (int \<Rightarrow> int \<Rightarrow> int)" is "plus_int_raw" by auto
   95.22  
   95.23  fun
   95.24    uminus_int_raw :: "(nat \<times> nat) \<Rightarrow> (nat \<times> nat)"
   95.25 @@ -41,10 +41,10 @@
   95.26    "uminus_int_raw (x, y) = (y, x)"
   95.27  
   95.28  quotient_definition
   95.29 -  "(uminus \<Colon> (int \<Rightarrow> int))" is "uminus_int_raw" by auto
   95.30 +  "(uminus :: (int \<Rightarrow> int))" is "uminus_int_raw" by auto
   95.31  
   95.32  definition
   95.33 -  minus_int_def:  "z - w = z + (-w\<Colon>int)"
   95.34 +  minus_int_def:  "z - w = z + (-w::int)"
   95.35  
   95.36  fun
   95.37    times_int_raw :: "(nat \<times> nat) \<Rightarrow> (nat \<times> nat) \<Rightarrow> (nat \<times> nat)"
   95.38 @@ -95,13 +95,13 @@
   95.39    le_int_def: "(op \<le>) :: int \<Rightarrow> int \<Rightarrow> bool" is "le_int_raw" by auto
   95.40  
   95.41  definition
   95.42 -  less_int_def: "(z\<Colon>int) < w = (z \<le> w \<and> z \<noteq> w)"
   95.43 +  less_int_def: "(z::int) < w = (z \<le> w \<and> z \<noteq> w)"
   95.44  
   95.45  definition
   95.46 -  zabs_def: "\<bar>i\<Colon>int\<bar> = (if i < 0 then - i else i)"
   95.47 +  zabs_def: "\<bar>i::int\<bar> = (if i < 0 then - i else i)"
   95.48  
   95.49  definition
   95.50 -  zsgn_def: "sgn (i\<Colon>int) = (if i = 0 then 0 else if 0 < i then 1 else - 1)"
   95.51 +  zsgn_def: "sgn (i::int) = (if i = 0 then 0 else if 0 < i then 1 else - 1)"
   95.52  
   95.53  instance ..
   95.54  
   95.55 @@ -182,10 +182,10 @@
   95.56  begin
   95.57  
   95.58  definition
   95.59 -  "(inf \<Colon> int \<Rightarrow> int \<Rightarrow> int) = min"
   95.60 +  "(inf :: int \<Rightarrow> int \<Rightarrow> int) = min"
   95.61  
   95.62  definition
   95.63 -  "(sup \<Colon> int \<Rightarrow> int \<Rightarrow> int) = max"
   95.64 +  "(sup :: int \<Rightarrow> int \<Rightarrow> int) = max"
   95.65  
   95.66  instance
   95.67    by default
   95.68 @@ -245,7 +245,7 @@
   95.69      by (rule zmult_zless_mono2)
   95.70    show "\<bar>i\<bar> = (if i < 0 then -i else i)"
   95.71      by (simp only: zabs_def)
   95.72 -  show "sgn (i\<Colon>int) = (if i=0 then 0 else if 0<i then 1 else - 1)"
   95.73 +  show "sgn (i::int) = (if i=0 then 0 else if 0<i then 1 else - 1)"
   95.74      by (simp only: zsgn_def)
   95.75  qed
   95.76  
    96.1 --- a/src/HOL/Quotient_Examples/Quotient_Rat.thy	Tue Sep 01 17:25:36 2015 +0200
    96.2 +++ b/src/HOL/Quotient_Examples/Quotient_Rat.thy	Tue Sep 01 22:32:58 2015 +0200
    96.3 @@ -32,10 +32,10 @@
    96.4  begin
    96.5  
    96.6  quotient_definition
    96.7 -  "0 \<Colon> rat" is "(0\<Colon>int, 1\<Colon>int)" by simp
    96.8 +  "0 :: rat" is "(0::int, 1::int)" by simp
    96.9  
   96.10  quotient_definition
   96.11 -  "1 \<Colon> rat" is "(1\<Colon>int, 1\<Colon>int)" by simp
   96.12 +  "1 :: rat" is "(1::int, 1::int)" by simp
   96.13  
   96.14  fun times_rat_raw where
   96.15    "times_rat_raw (a :: int, b :: int) (c, d) = (a * c, b * d)"
   96.16 @@ -54,10 +54,10 @@
   96.17    "uminus_rat_raw (a :: int, b :: int) = (-a, b)"
   96.18  
   96.19  quotient_definition
   96.20 -  "(uminus \<Colon> (rat \<Rightarrow> rat))" is "uminus_rat_raw" by fastforce
   96.21 +  "(uminus :: (rat \<Rightarrow> rat))" is "uminus_rat_raw" by fastforce
   96.22  
   96.23  definition
   96.24 -  minus_rat_def: "a - b = a + (-b\<Colon>rat)"
   96.25 +  minus_rat_def: "a - b = a + (-b::rat)"
   96.26  
   96.27  fun le_rat_raw where
   96.28    "le_rat_raw (a :: int, b) (c, d) \<longleftrightarrow> (a * d) * (b * d) \<le> (c * b) * (b * d)"
   96.29 @@ -92,13 +92,13 @@
   96.30  qed
   96.31  
   96.32  definition
   96.33 -  less_rat_def: "(z\<Colon>rat) < w = (z \<le> w \<and> z \<noteq> w)"
   96.34 +  less_rat_def: "(z::rat) < w = (z \<le> w \<and> z \<noteq> w)"
   96.35  
   96.36  definition
   96.37 -  rabs_rat_def: "\<bar>i\<Colon>rat\<bar> = (if i < 0 then - i else i)"
   96.38 +  rabs_rat_def: "\<bar>i::rat\<bar> = (if i < 0 then - i else i)"
   96.39  
   96.40  definition
   96.41 -  sgn_rat_def: "sgn (i\<Colon>rat) = (if i = 0 then 0 else if 0 < i then 1 else - 1)"
   96.42 +  sgn_rat_def: "sgn (i::rat) = (if i = 0 then 0 else if 0 < i then 1 else - 1)"
   96.43  
   96.44  instance by intro_classes
   96.45    (auto simp add: rabs_rat_def sgn_rat_def)
   96.46 @@ -259,7 +259,7 @@
   96.47      assume "b \<noteq> 0"
   96.48      then have "a * b \<le> (a div b + 1) * b * b"
   96.49        by (metis mult.commute div_mult_self1_is_id less_int_def linorder_le_cases zdiv_mono1 zdiv_mono1_neg zle_add1_eq_le)
   96.50 -    then show "\<exists>z\<Colon>int. a * b \<le> z * b * b" by auto
   96.51 +    then show "\<exists>z::int. a * b \<le> z * b * b" by auto
   96.52    qed
   96.53  qed
   96.54  *)
    97.1 --- a/src/HOL/Real.thy	Tue Sep 01 17:25:36 2015 +0200
    97.2 +++ b/src/HOL/Real.thy	Tue Sep 01 22:32:58 2015 +0200
    97.3 @@ -491,7 +491,7 @@
    97.4      by transfer (simp add: ac_simps realrel_def)
    97.5    show "(a + b) * c = a * c + b * c"
    97.6      by transfer (simp add: distrib_right realrel_def)
    97.7 -  show "(0\<Colon>real) \<noteq> (1\<Colon>real)"
    97.8 +  show "(0::real) \<noteq> (1::real)"
    97.9      by transfer (simp add: realrel_def)
   97.10    show "a \<noteq> 0 \<Longrightarrow> inverse a * a = 1"
   97.11      apply transfer
   97.12 @@ -1975,7 +1975,7 @@
   97.13  instantiation real :: equal
   97.14  begin
   97.15  
   97.16 -definition "HOL.equal (x\<Colon>real) y \<longleftrightarrow> x - y = 0"
   97.17 +definition "HOL.equal (x::real) y \<longleftrightarrow> x - y = 0"
   97.18  
   97.19  instance proof
   97.20  qed (simp add: equal_real_def)
    98.1 --- a/src/HOL/SPARK/Examples/RIPEMD-160/Round.thy	Tue Sep 01 17:25:36 2015 +0200
    98.2 +++ b/src/HOL/SPARK/Examples/RIPEMD-160/Round.thy	Tue Sep 01 22:32:58 2015 +0200
    98.3 @@ -427,7 +427,7 @@
    98.4           h4 = ce_init\<rparr>"
    98.5    have steps_to_steps':
    98.6      "steps
    98.7 -       (\<lambda>n\<Colon>nat. word_of_int (x (int n)))
    98.8 +       (\<lambda>n::nat. word_of_int (x (int n)))
    98.9         (from_chain ?INIT_CHAIN, from_chain ?INIT_CHAIN)
   98.10         80 =
   98.11      from_chain_pair (
    99.1 --- a/src/HOL/String.thy	Tue Sep 01 17:25:36 2015 +0200
    99.2 +++ b/src/HOL/String.thy	Tue Sep 01 22:32:58 2015 +0200
    99.3 @@ -374,7 +374,7 @@
    99.4  
    99.5  definition size_literal :: "literal \<Rightarrow> nat"
    99.6  where
    99.7 -  [code]: "size_literal (s\<Colon>literal) = 0"
    99.8 +  [code]: "size_literal (s::literal) = 0"
    99.9  
   99.10  instance ..
   99.11  
   100.1 --- a/src/HOL/Sum_Type.thy	Tue Sep 01 17:25:36 2015 +0200
   100.2 +++ b/src/HOL/Sum_Type.thy	Tue Sep 01 22:32:58 2015 +0200
   100.3 @@ -98,7 +98,7 @@
   100.4  proof -
   100.5    fix P
   100.6    fix s :: "'a + 'b"
   100.7 -  assume x: "\<And>x\<Colon>'a. P (Inl x)" and y: "\<And>y\<Colon>'b. P (Inr y)"
   100.8 +  assume x: "\<And>x::'a. P (Inl x)" and y: "\<And>y::'b. P (Inr y)"
   100.9    then show "P s" by (auto intro: sumE [of s])
  100.10  qed (auto dest: Inl_inject Inr_inject simp add: Inl_not_Inr)
  100.11  
  100.12 @@ -155,7 +155,7 @@
  100.13  lemma surjective_sum: "case_sum (\<lambda>x::'a. f (Inl x)) (\<lambda>y::'b. f (Inr y)) = f"
  100.14  proof
  100.15    fix s :: "'a + 'b"
  100.16 -  show "(case s of Inl (x\<Colon>'a) \<Rightarrow> f (Inl x) | Inr (y\<Colon>'b) \<Rightarrow> f (Inr y)) = f s"
  100.17 +  show "(case s of Inl (x::'a) \<Rightarrow> f (Inl x) | Inr (y::'b) \<Rightarrow> f (Inr y)) = f s"
  100.18      by (cases s) simp_all
  100.19  qed
  100.20  
  100.21 @@ -186,7 +186,7 @@
  100.22    assumes "Suml f = Suml g" shows "f = g"
  100.23  proof
  100.24    fix x :: 'a
  100.25 -  let ?s = "Inl x \<Colon> 'a + 'b"
  100.26 +  let ?s = "Inl x :: 'a + 'b"
  100.27    from assms have "Suml f ?s = Suml g ?s" by simp
  100.28    then show "f x = g x" by simp
  100.29  qed
  100.30 @@ -195,7 +195,7 @@
  100.31    assumes "Sumr f = Sumr g" shows "f = g"
  100.32  proof
  100.33    fix x :: 'b
  100.34 -  let ?s = "Inr x \<Colon> 'a + 'b"
  100.35 +  let ?s = "Inr x :: 'a + 'b"
  100.36    from assms have "Sumr f ?s = Sumr g ?s" by simp
  100.37    then show "f x = g x" by simp
  100.38  qed
   101.1 --- a/src/HOL/TPTP/THF_Arith.thy	Tue Sep 01 17:25:36 2015 +0200
   101.2 +++ b/src/HOL/TPTP/THF_Arith.thy	Tue Sep 01 22:32:58 2015 +0200
   101.3 @@ -16,17 +16,17 @@
   101.4  
   101.5  overloading rat_is_int \<equiv> "is_int :: rat \<Rightarrow> bool"
   101.6  begin
   101.7 -  definition "rat_is_int (q\<Colon>rat) \<longleftrightarrow> (\<exists>n\<Colon>int. q = of_int n)"
   101.8 +  definition "rat_is_int (q::rat) \<longleftrightarrow> (\<exists>n::int. q = of_int n)"
   101.9  end
  101.10  
  101.11  overloading real_is_int \<equiv> "is_int :: real \<Rightarrow> bool"
  101.12  begin
  101.13 -  definition "real_is_int (x\<Colon>real) \<longleftrightarrow> x \<in> \<int>"
  101.14 +  definition "real_is_int (x::real) \<longleftrightarrow> x \<in> \<int>"
  101.15  end
  101.16  
  101.17  overloading real_is_rat \<equiv> "is_rat :: real \<Rightarrow> bool"
  101.18  begin
  101.19 -  definition "real_is_rat (x\<Colon>real) \<longleftrightarrow> x \<in> \<rat>"
  101.20 +  definition "real_is_rat (x::real) \<longleftrightarrow> x \<in> \<rat>"
  101.21  end
  101.22  
  101.23  consts
  101.24 @@ -36,32 +36,32 @@
  101.25  
  101.26  overloading rat_to_int \<equiv> "to_int :: rat \<Rightarrow> int"
  101.27  begin
  101.28 -  definition "rat_to_int (q\<Colon>rat) = floor q"
  101.29 +  definition "rat_to_int (q::rat) = floor q"
  101.30  end
  101.31  
  101.32  overloading real_to_int \<equiv> "to_int :: real \<Rightarrow> int"
  101.33  begin
  101.34 -  definition "real_to_int (x\<Colon>real) = floor x"
  101.35 +  definition "real_to_int (x::real) = floor x"
  101.36  end
  101.37  
  101.38  overloading int_to_rat \<equiv> "to_rat :: int \<Rightarrow> rat"
  101.39  begin
  101.40 -  definition "int_to_rat (n\<Colon>int) = (of_int n\<Colon>rat)"
  101.41 +  definition "int_to_rat (n::int) = (of_int n::rat)"
  101.42  end
  101.43  
  101.44  overloading real_to_rat \<equiv> "to_rat :: real \<Rightarrow> rat"
  101.45  begin
  101.46 -  definition "real_to_rat (x\<Colon>real) = (inv of_rat x\<Colon>rat)"
  101.47 +  definition "real_to_rat (x::real) = (inv of_rat x::rat)"
  101.48  end
  101.49  
  101.50  overloading int_to_real \<equiv> "to_real :: int \<Rightarrow> real"
  101.51  begin
  101.52 -  definition "int_to_real (n\<Colon>int) = real n"
  101.53 +  definition "int_to_real (n::int) = real n"
  101.54  end
  101.55  
  101.56  overloading rat_to_real \<equiv> "to_real :: rat \<Rightarrow> real"
  101.57  begin
  101.58 -  definition "rat_to_real (x\<Colon>rat) = (of_rat x\<Colon>real)"
  101.59 +  definition "rat_to_real (x::rat) = (of_rat x::real)"
  101.60  end
  101.61  
  101.62  declare
  101.63 @@ -75,16 +75,16 @@
  101.64    int_to_real_def [simp]
  101.65    rat_to_real_def [simp]
  101.66  
  101.67 -lemma to_rat_is_int [intro, simp]: "is_int (to_rat (n\<Colon>int))"
  101.68 +lemma to_rat_is_int [intro, simp]: "is_int (to_rat (n::int))"
  101.69  by (metis int_to_rat_def rat_is_int_def)
  101.70  
  101.71 -lemma to_real_is_int [intro, simp]: "is_int (to_real (n\<Colon>int))"
  101.72 +lemma to_real_is_int [intro, simp]: "is_int (to_real (n::int))"
  101.73  by (metis Ints_real_of_int int_to_real_def real_is_int_def)
  101.74  
  101.75 -lemma to_real_is_rat [intro, simp]: "is_rat (to_real (q\<Colon>rat))"
  101.76 +lemma to_real_is_rat [intro, simp]: "is_rat (to_real (q::rat))"
  101.77  by (metis Rats_of_rat rat_to_real_def real_is_rat_def)
  101.78  
  101.79 -lemma inj_of_rat [intro, simp]: "inj (of_rat\<Colon>rat\<Rightarrow>real)"
  101.80 +lemma inj_of_rat [intro, simp]: "inj (of_rat::rat\<Rightarrow>real)"
  101.81  by (metis injI of_rat_eq_iff)
  101.82  
  101.83  end
   102.1 --- a/src/HOL/TPTP/TPTP_Proof_Reconstruction_Test.thy	Tue Sep 01 17:25:36 2015 +0200
   102.2 +++ b/src/HOL/TPTP/TPTP_Proof_Reconstruction_Test.thy	Tue Sep 01 22:32:58 2015 +0200
   102.3 @@ -348,7 +348,7 @@
   102.4  
   102.5  (*FIXME move these examples elsewhere*)
   102.6  (*
   102.7 -lemma "\<forall>(Xj\<Colon>TPTP_Interpret.ind) Xk\<Colon>TPTP_Interpret.ind.
   102.8 +lemma "\<forall>(Xj::TPTP_Interpret.ind) Xk::TPTP_Interpret.ind.
   102.9          bnd_cCKB6_BLACK Xj Xk \<longrightarrow>
  102.10          bnd_cCKB6_BLACK (bnd_s (bnd_s (bnd_s Xj))) (bnd_s Xk)"
  102.11  apply (tactic {*nth (nth just_the_tacs 0) 0*})
   103.1 --- a/src/HOL/TPTP/TPTP_Proof_Reconstruction_Test_Units.thy	Tue Sep 01 17:25:36 2015 +0200
   103.2 +++ b/src/HOL/TPTP/TPTP_Proof_Reconstruction_Test_Units.thy	Tue Sep 01 22:32:58 2015 +0200
   103.3 @@ -27,8 +27,8 @@
   103.4  (*
   103.5    (* SEU581^2.p_nux *)
   103.6       (* (Annotated_step ("inode1", "bind"), *)
   103.7 -lemma "\<forall>(SV5\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
   103.8 -            SV6\<Colon>TPTP_Interpret.ind.
   103.9 +lemma "\<forall>(SV5::TPTP_Interpret.ind \<Rightarrow> bool)
  103.10 +            SV6::TPTP_Interpret.ind.
  103.11              (bnd_in (bnd_dsetconstr bnd_sK1_A bnd_sK2_SY15)
  103.12                (bnd_powerset bnd_sK1_A) =
  103.13               bnd_in (bnd_dsetconstr SV6 SV5)
  103.14 @@ -66,7 +66,7 @@
  103.15  done
  103.16  
  103.17       (* (Annotated_step ("inode2", "bind"), *)
  103.18 -lemma "\<forall>(SV7\<Colon>TPTP_Interpret.ind) SV8\<Colon>TPTP_Interpret.ind.
  103.19 +lemma "\<forall>(SV7::TPTP_Interpret.ind) SV8::TPTP_Interpret.ind.
  103.20              (bnd_subset SV8 SV7 =
  103.21               bnd_subset (bnd_dsetconstr bnd_sK1_A bnd_sK2_SY15)
  103.22                bnd_sK1_A) =
  103.23 @@ -303,12 +303,12 @@
  103.24  (*SEU882^5*)
  103.25  (*
  103.26  lemma
  103.27 - "\<forall>(SV2\<Colon>TPTP_Interpret.ind)
  103.28 -        SV1\<Colon>TPTP_Interpret.ind \<Rightarrow> TPTP_Interpret.ind.
  103.29 + "\<forall>(SV2::TPTP_Interpret.ind)
  103.30 +        SV1::TPTP_Interpret.ind \<Rightarrow> TPTP_Interpret.ind.
  103.31          (SV1 SV2 = bnd_sK1_Xy) =
  103.32          False
  103.33     \<Longrightarrow>
  103.34 -   \<forall>SV2\<Colon>TPTP_Interpret.ind.
  103.35 +   \<forall>SV2::TPTP_Interpret.ind.
  103.36              (bnd_sK1_Xy = bnd_sK1_Xy) =
  103.37              False"
  103.38  ML_prf {*
  103.39 @@ -462,12 +462,12 @@
  103.40    SEU602_2_bnd_in :: "TPTP_Interpret.ind \<Rightarrow> TPTP_Interpret.ind \<Rightarrow> bool"
  103.41  
  103.42       (* (Annotated_step ("113", "extuni_func"), *)
  103.43 -lemma "\<forall>SV49\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
  103.44 +lemma "\<forall>SV49::TPTP_Interpret.ind \<Rightarrow> bool.
  103.45              (SV49 =
  103.46 -             (\<lambda>SY23\<Colon>TPTP_Interpret.ind.
  103.47 +             (\<lambda>SY23::TPTP_Interpret.ind.
  103.48                   \<not> SEU602_2_bnd_in SY23 SEU602_2_bnd_sK2_SY17)) =
  103.49              False \<Longrightarrow>
  103.50 -         \<forall>SV49\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
  103.51 +         \<forall>SV49::TPTP_Interpret.ind \<Rightarrow> bool.
  103.52              (SV49 (SEU602_2_bnd_sK7_E SV49) =
  103.53               (\<not> SEU602_2_bnd_in (SEU602_2_bnd_sK7_E SV49) SEU602_2_bnd_sK2_SY17)) =
  103.54              False"
  103.55 @@ -478,12 +478,12 @@
  103.56    SEV405_5_bnd_sK1_SY2 :: "(TPTP_Interpret.ind \<Rightarrow> bool) \<Rightarrow> TPTP_Interpret.ind"
  103.57    SEV405_5_bnd_cA :: bool
  103.58  
  103.59 -lemma "\<forall>SV1\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
  103.60 -            (\<forall>SY2\<Colon>TPTP_Interpret.ind.
  103.61 +lemma "\<forall>SV1::TPTP_Interpret.ind \<Rightarrow> bool.
  103.62 +            (\<forall>SY2::TPTP_Interpret.ind.
  103.63                  \<not> (\<not> (\<not> SV1 SY2 \<or> SEV405_5_bnd_cA) \<or>
  103.64                     \<not> (\<not> SEV405_5_bnd_cA \<or> SV1 SY2))) =
  103.65              False \<Longrightarrow>
  103.66 -         \<forall>SV1\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
  103.67 +         \<forall>SV1::TPTP_Interpret.ind \<Rightarrow> bool.
  103.68              (\<not> (\<not> (\<not> SV1 (SEV405_5_bnd_sK1_SY2 SV1) \<or> SEV405_5_bnd_cA) \<or>
  103.69                  \<not> (\<not> SEV405_5_bnd_cA \<or> SV1 (SEV405_5_bnd_sK1_SY2 SV1)))) =
  103.70              False"
  103.71 @@ -1046,28 +1046,28 @@
  103.72        \<Rightarrow> TPTP_Interpret.ind
  103.73          \<Rightarrow> TPTP_Interpret.ind \<Rightarrow> TPTP_Interpret.ind \<Rightarrow> bool"
  103.74  
  103.75 -lemma "\<forall>(SV4\<Colon>TPTP_Interpret.ind) (SV8\<Colon>TPTP_Interpret.ind)
  103.76 -   (SV6\<Colon>TPTP_Interpret.ind) (SV2\<Colon>TPTP_Interpret.ind)
  103.77 -   (SV3\<Colon>TPTP_Interpret.ind) SV1\<Colon>TPTP_Interpret.ind.
  103.78 +lemma "\<forall>(SV4::TPTP_Interpret.ind) (SV8::TPTP_Interpret.ind)
  103.79 +   (SV6::TPTP_Interpret.ind) (SV2::TPTP_Interpret.ind)
  103.80 +   (SV3::TPTP_Interpret.ind) SV1::TPTP_Interpret.ind.
  103.81     ((SV1 \<noteq> SV3) = False \<or> PUZ107_5_bnd_sK1_SX0 SV1 SV2 SV6 SV8 = False) \<or>
  103.82     PUZ107_5_bnd_sK1_SX0 SV3 SV4 SV6 SV8 = False \<Longrightarrow>
  103.83 -\<forall>(SV4\<Colon>TPTP_Interpret.ind) (SV8\<Colon>TPTP_Interpret.ind)
  103.84 -   (SV6\<Colon>TPTP_Interpret.ind) (SV2\<Colon>TPTP_Interpret.ind)
  103.85 -   (SV3\<Colon>TPTP_Interpret.ind) SV1\<Colon>TPTP_Interpret.ind.
  103.86 +\<forall>(SV4::TPTP_Interpret.ind) (SV8::TPTP_Interpret.ind)
  103.87 +   (SV6::TPTP_Interpret.ind) (SV2::TPTP_Interpret.ind)
  103.88 +   (SV3::TPTP_Interpret.ind) SV1::TPTP_Interpret.ind.
  103.89     ((SV1 = SV3) = True \<or> PUZ107_5_bnd_sK1_SX0 SV1 SV2 SV6 SV8 = False) \<or>
  103.90     PUZ107_5_bnd_sK1_SX0 SV3 SV4 SV6 SV8 = False"
  103.91  by (tactic {*nonfull_extcnf_combined_tac @{context} [Not_neg]*})
  103.92  
  103.93  lemma "
  103.94 -\<forall>(SV8\<Colon>TPTP_Interpret.ind) (SV6\<Colon>TPTP_Interpret.ind)
  103.95 -   (SV4\<Colon>TPTP_Interpret.ind) (SV2\<Colon>TPTP_Interpret.ind)
  103.96 -   (SV3\<Colon>TPTP_Interpret.ind) SV1\<Colon>TPTP_Interpret.ind.
  103.97 +\<forall>(SV8::TPTP_Interpret.ind) (SV6::TPTP_Interpret.ind)
  103.98 +   (SV4::TPTP_Interpret.ind) (SV2::TPTP_Interpret.ind)
  103.99 +   (SV3::TPTP_Interpret.ind) SV1::TPTP_Interpret.ind.
 103.100     ((SV1 \<noteq> SV3 \<or> SV2 \<noteq> SV4) = False \<or>
 103.101      PUZ107_5_bnd_sK1_SX0 SV1 SV2 SV6 SV8 = False) \<or>
 103.102     PUZ107_5_bnd_sK1_SX0 SV3 SV4 SV6 SV8 = False \<Longrightarrow>
 103.103 -\<forall>(SV4\<Colon>TPTP_Interpret.ind) (SV8\<Colon>TPTP_Interpret.ind)
 103.104 -   (SV6\<Colon>TPTP_Interpret.ind) (SV2\<Colon>TPTP_Interpret.ind)
 103.105 -   (SV3\<Colon>TPTP_Interpret.ind) SV1\<Colon>TPTP_Interpret.ind.
 103.106 +\<forall>(SV4::TPTP_Interpret.ind) (SV8::TPTP_Interpret.ind)
 103.107 +   (SV6::TPTP_Interpret.ind) (SV2::TPTP_Interpret.ind)
 103.108 +   (SV3::TPTP_Interpret.ind) SV1::TPTP_Interpret.ind.
 103.109     ((SV1 \<noteq> SV3) = False \<or> PUZ107_5_bnd_sK1_SX0 SV1 SV2 SV6 SV8 = False) \<or>
 103.110     PUZ107_5_bnd_sK1_SX0 SV3 SV4 SV6 SV8 = False"
 103.111  by (tactic {*nonfull_extcnf_combined_tac @{context} [Or_neg]*})
 103.112 @@ -1081,70 +1081,70 @@
 103.113    NUM016_5_bnd_less :: "TPTP_Interpret.ind \<Rightarrow> TPTP_Interpret.ind \<Rightarrow> bool"
 103.114  
 103.115       (* (Annotated_step ("6", "unfold_def"), *)
 103.116 -lemma "((((((((((((\<forall>X\<Colon>TPTP_Interpret.ind. \<not> NUM016_5_bnd_less X X) \<and>
 103.117 -                    (\<forall>(X\<Colon>TPTP_Interpret.ind)
 103.118 -                        Y\<Colon>TPTP_Interpret.ind.
 103.119 +lemma "((((((((((((\<forall>X::TPTP_Interpret.ind. \<not> NUM016_5_bnd_less X X) \<and>
 103.120 +                    (\<forall>(X::TPTP_Interpret.ind)
 103.121 +                        Y::TPTP_Interpret.ind.
 103.122                          \<not> NUM016_5_bnd_less X Y \<or> \<not> NUM016_5_bnd_less Y X)) \<and>
 103.123 -                   (\<forall>X\<Colon>TPTP_Interpret.ind. NUM016_5_bnd_divides X X)) \<and>
 103.124 -                  (\<forall>(X\<Colon>TPTP_Interpret.ind)
 103.125 -                      (Y\<Colon>TPTP_Interpret.ind)
 103.126 -                      Z\<Colon>TPTP_Interpret.ind.
 103.127 +                   (\<forall>X::TPTP_Interpret.ind. NUM016_5_bnd_divides X X)) \<and>
 103.128 +                  (\<forall>(X::TPTP_Interpret.ind)
 103.129 +                      (Y::TPTP_Interpret.ind)
 103.130 +                      Z::TPTP_Interpret.ind.
 103.131                        (\<not> NUM016_5_bnd_divides X Y \<or> \<not> NUM016_5_bnd_divides Y Z) \<or>
 103.132                        NUM016_5_bnd_divides X Z)) \<and>
 103.133 -                 (\<forall>(X\<Colon>TPTP_Interpret.ind) Y\<Colon>TPTP_Interpret.ind.
 103.134 +                 (\<forall>(X::TPTP_Interpret.ind) Y::TPTP_Interpret.ind.
 103.135                       \<not> NUM016_5_bnd_divides X Y \<or> \<not> NUM016_5_bnd_less Y X)) \<and>
 103.136 -                (\<forall>X\<Colon>TPTP_Interpret.ind.
 103.137 +                (\<forall>X::TPTP_Interpret.ind.
 103.138                      NUM016_5_bnd_less X (NUM016_5_bnd_factorial_plus_one X))) \<and>
 103.139 -               (\<forall>(X\<Colon>TPTP_Interpret.ind) Y\<Colon>TPTP_Interpret.ind.
 103.140 +               (\<forall>(X::TPTP_Interpret.ind) Y::TPTP_Interpret.ind.
 103.141                     \<not> NUM016_5_bnd_divides X (NUM016_5_bnd_factorial_plus_one Y) \<or>
 103.142                     NUM016_5_bnd_less Y X)) \<and>
 103.143 -              (\<forall>X\<Colon>TPTP_Interpret.ind.
 103.144 +              (\<forall>X::TPTP_Interpret.ind.
 103.145                    NUM016_5_bnd_prime X \<or>
 103.146                    NUM016_5_bnd_divides (NUM016_5_bnd_prime_divisor X) X)) \<and>
 103.147 -             (\<forall>X\<Colon>TPTP_Interpret.ind.
 103.148 +             (\<forall>X::TPTP_Interpret.ind.
 103.149                   NUM016_5_bnd_prime X \<or>
 103.150                   NUM016_5_bnd_prime (NUM016_5_bnd_prime_divisor X))) \<and>
 103.151 -            (\<forall>X\<Colon>TPTP_Interpret.ind.
 103.152 +            (\<forall>X::TPTP_Interpret.ind.
 103.153                  NUM016_5_bnd_prime X \<or>
 103.154                  NUM016_5_bnd_less (NUM016_5_bnd_prime_divisor X) X)) \<and>
 103.155             NUM016_5_bnd_prime NUM016_5_bnd_a) \<and>
 103.156 -          (\<forall>X\<Colon>TPTP_Interpret.ind.
 103.157 +          (\<forall>X::TPTP_Interpret.ind.
 103.158                (\<not> NUM016_5_bnd_prime X \<or> \<not> NUM016_5_bnd_less NUM016_5_bnd_a X) \<or>
 103.159                NUM016_5_bnd_less (NUM016_5_bnd_factorial_plus_one NUM016_5_bnd_a) X)) =
 103.160           True \<Longrightarrow>
 103.161 -         (\<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> (\<forall>SX0\<Colon>TPTP_Interpret.ind.
 103.162 +         (\<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> \<not> (\<not> (\<forall>SX0::TPTP_Interpret.ind.
 103.163       \<not> NUM016_5_bnd_less SX0 SX0) \<or>
 103.164 -                               \<not> (\<forall>(SX0\<Colon>TPTP_Interpret.ind)
 103.165 -     SX1\<Colon>TPTP_Interpret.ind.
 103.166 +                               \<not> (\<forall>(SX0::TPTP_Interpret.ind)
 103.167 +     SX1::TPTP_Interpret.ind.
 103.168       \<not> NUM016_5_bnd_less SX0 SX1 \<or> \<not> NUM016_5_bnd_less SX1 SX0)) \<or>
 103.169 -                          \<not> (\<forall>SX0\<Colon>TPTP_Interpret.ind.
 103.170 +                          \<not> (\<forall>SX0::TPTP_Interpret.ind.
 103.171  NUM016_5_bnd_divides SX0 SX0)) \<or>
 103.172 -                     \<not> (\<forall>(SX0\<Colon>TPTP_Interpret.ind)
 103.173 -                           (SX1\<Colon>TPTP_Interpret.ind)
 103.174 -                           SX2\<Colon>TPTP_Interpret.ind.
 103.175 +                     \<not> (\<forall>(SX0::TPTP_Interpret.ind)
 103.176 +                           (SX1::TPTP_Interpret.ind)
 103.177 +                           SX2::TPTP_Interpret.ind.
 103.178                             (\<not> NUM016_5_bnd_divides SX0 SX1 \<or>
 103.179                              \<not> NUM016_5_bnd_divides SX1 SX2) \<or>
 103.180                             NUM016_5_bnd_divides SX0 SX2)) \<or>
 103.181 -                \<not> (\<forall>(SX0\<Colon>TPTP_Interpret.ind)
 103.182 -                      SX1\<Colon>TPTP_Interpret.ind.
 103.183 +                \<not> (\<forall>(SX0::TPTP_Interpret.ind)
 103.184 +                      SX1::TPTP_Interpret.ind.
 103.185                        \<not> NUM016_5_bnd_divides SX0 SX1 \<or>
 103.186                        \<not> NUM016_5_bnd_less SX1 SX0)) \<or>
 103.187 -           \<not> (\<forall>SX0\<Colon>TPTP_Interpret.ind.
 103.188 +           \<not> (\<forall>SX0::TPTP_Interpret.ind.
 103.189                   NUM016_5_bnd_less SX0 (NUM016_5_bnd_factorial_plus_one SX0))) \<or>
 103.190 -      \<not> (\<forall>(SX0\<Colon>TPTP_Interpret.ind) SX1\<Colon>TPTP_Interpret.ind.
 103.191 +      \<not> (\<forall>(SX0::TPTP_Interpret.ind) SX1::TPTP_Interpret.ind.
 103.192              \<not> NUM016_5_bnd_divides SX0 (NUM016_5_bnd_factorial_plus_one SX1) \<or>
 103.193              NUM016_5_bnd_less SX1 SX0)) \<or>
 103.194 - \<not> (\<forall>SX0\<Colon>TPTP_Interpret.ind.
 103.195 + \<not> (\<forall>SX0::TPTP_Interpret.ind.
 103.196         NUM016_5_bnd_prime SX0 \<or>
 103.197         NUM016_5_bnd_divides (NUM016_5_bnd_prime_divisor SX0) SX0)) \<or>
 103.198 -                            \<not> (\<forall>SX0\<Colon>TPTP_Interpret.ind.
 103.199 +                            \<not> (\<forall>SX0::TPTP_Interpret.ind.
 103.200    NUM016_5_bnd_prime SX0 \<or> NUM016_5_bnd_prime (NUM016_5_bnd_prime_divisor SX0))) \<or>
 103.201 -                       \<not> (\<forall>SX0\<Colon>TPTP_Interpret.ind.
 103.202 +                       \<not> (\<forall>SX0::TPTP_Interpret.ind.
 103.203                               NUM016_5_bnd_prime SX0 \<or>
 103.204                               NUM016_5_bnd_less (NUM016_5_bnd_prime_divisor SX0)
 103.205                                SX0)) \<or>
 103.206                    \<not> NUM016_5_bnd_prime NUM016_5_bnd_a) \<or>
 103.207 -             \<not> (\<forall>SX0\<Colon>TPTP_Interpret.ind.
 103.208 +             \<not> (\<forall>SX0::TPTP_Interpret.ind.
 103.209                     (\<not> NUM016_5_bnd_prime SX0 \<or> \<not> NUM016_5_bnd_less NUM016_5_bnd_a SX0) \<or>
 103.210                     NUM016_5_bnd_less (NUM016_5_bnd_factorial_plus_one NUM016_5_bnd_a)
 103.211                      SX0))) =
 103.212 @@ -1248,7 +1248,7 @@
 103.213  
 103.214  (*test that nullary skolem terms are OK*)
 103.215       (* (Annotated_step ("79", "extcnf_forall_neg"), *)
 103.216 -lemma "(\<forall>SX0\<Colon>TPTP_Interpret.ind.
 103.217 +lemma "(\<forall>SX0::TPTP_Interpret.ind.
 103.218               AGT037_2_bnd_possibly_likes AGT037_2_bnd_jan AGT037_2_bnd_cola SX0) =
 103.219           False \<Longrightarrow>
 103.220           AGT037_2_bnd_possibly_likes AGT037_2_bnd_jan AGT037_2_bnd_cola AGT037_2_bnd_sK1_SX0 =
 103.221 @@ -1256,27 +1256,27 @@
 103.222  by (tactic {*nonfull_extcnf_combined_tac @{context} [Existential_Var]*})
 103.223  
 103.224       (* (Annotated_step ("202", "extcnf_forall_neg"), *)
 103.225 -lemma "\<forall>(SV13\<Colon>TPTP_Interpret.ind) (SV39\<Colon>AGT037_2_bnd_mu) (SV29\<Colon>AGT037_2_bnd_mu)
 103.226 -            SV45\<Colon>TPTP_Interpret.ind.
 103.227 -            ((((\<forall>SY68\<Colon>TPTP_Interpret.ind.
 103.228 +lemma "\<forall>(SV13::TPTP_Interpret.ind) (SV39::AGT037_2_bnd_mu) (SV29::AGT037_2_bnd_mu)
 103.229 +            SV45::TPTP_Interpret.ind.
 103.230 +            ((((\<forall>SY68::TPTP_Interpret.ind.
 103.231                     \<not> AGT037_2_bnd_a1 SV45 SY68 \<or>
 103.232                     AGT037_2_bnd_likes SV29 SV39 SY68) =
 103.233                 False \<or>
 103.234 -               (\<not> (\<forall>SY69\<Colon>TPTP_Interpret.ind.
 103.235 +               (\<not> (\<forall>SY69::TPTP_Interpret.ind.
 103.236                        \<not> AGT037_2_bnd_a2 SV45 SY69 \<or>
 103.237                        AGT037_2_bnd_likes SV29 SV39 SY69)) =
 103.238                 True) \<or>
 103.239                AGT037_2_bnd_likes SV29 SV39 SV45 = False) \<or>
 103.240               AGT037_2_bnd_very_much_likes SV29 SV39 SV45 = True) \<or>
 103.241              AGT037_2_bnd_a3 SV13 SV45 = False \<Longrightarrow>
 103.242 -         \<forall>(SV29\<Colon>AGT037_2_bnd_mu) (SV39\<Colon>AGT037_2_bnd_mu) (SV13\<Colon>TPTP_Interpret.ind)
 103.243 -            SV45\<Colon>TPTP_Interpret.ind.
 103.244 +         \<forall>(SV29::AGT037_2_bnd_mu) (SV39::AGT037_2_bnd_mu) (SV13::TPTP_Interpret.ind)
 103.245 +            SV45::TPTP_Interpret.ind.
 103.246              ((((\<not> AGT037_2_bnd_a1 SV45
 103.247                     (AGT037_2_bnd_sK5_SY68 SV13 SV39 SV29 SV45) \<or>
 103.248                  AGT037_2_bnd_likes SV29 SV39
 103.249                   (AGT037_2_bnd_sK5_SY68 SV13 SV39 SV29 SV45)) =
 103.250                 False \<or>
 103.251 -               (\<not> (\<forall>SY69\<Colon>TPTP_Interpret.ind.
 103.252 +               (\<not> (\<forall>SY69::TPTP_Interpret.ind.
 103.253                        \<not> AGT037_2_bnd_a2 SV45 SY69 \<or>
 103.254                        AGT037_2_bnd_likes SV29 SV39 SY69)) =
 103.255                 True) \<or>
 103.256 @@ -1555,10 +1555,10 @@
 103.257            bnd_addition bnd_sK2_X2 bnd_sK1_X1) =
 103.258           True \<Longrightarrow>
 103.259           (bnd_sup
 103.260 -           (\<lambda>SX0\<Colon>TPTP_Interpret.ind.
 103.261 +           (\<lambda>SX0::TPTP_Interpret.ind.
 103.262                 SX0 = bnd_sK1_X1 \<or> SX0 = bnd_sK2_X2) \<noteq>
 103.263            bnd_sup
 103.264 -           (\<lambda>SX0\<Colon>TPTP_Interpret.ind.
 103.265 +           (\<lambda>SX0::TPTP_Interpret.ind.
 103.266                 SX0 = bnd_sK2_X2 \<or> SX0 = bnd_sK1_X1)) =
 103.267           True"
 103.268  by (tactic {*rtac (leo2_tac @{context} (hd prob_names) "20") 1*})
 103.269 @@ -2011,60 +2011,60 @@
 103.270  
 103.271       (* (Annotated_step ("12", "unfold_def"), *)
 103.272  lemma "bnd_mor =
 103.273 -         (\<lambda>(X\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.274 -             (Y\<Colon>TPTP_Interpret.ind \<Rightarrow> bool) U\<Colon>TPTP_Interpret.ind.
 103.275 +         (\<lambda>(X::TPTP_Interpret.ind \<Rightarrow> bool)
 103.276 +             (Y::TPTP_Interpret.ind \<Rightarrow> bool) U::TPTP_Interpret.ind.
 103.277               X U \<or> Y U) \<and>
 103.278           bnd_mnot =
 103.279 -         (\<lambda>(X\<Colon>TPTP_Interpret.ind \<Rightarrow> bool) U\<Colon>TPTP_Interpret.ind.
 103.280 +         (\<lambda>(X::TPTP_Interpret.ind \<Rightarrow> bool) U::TPTP_Interpret.ind.
 103.281               \<not> X U) \<and>
 103.282           bnd_mimplies =
 103.283 -         (\<lambda>U\<Colon>TPTP_Interpret.ind \<Rightarrow> bool. bnd_mor (bnd_mnot U)) \<and>
 103.284 +         (\<lambda>U::TPTP_Interpret.ind \<Rightarrow> bool. bnd_mor (bnd_mnot U)) \<and>
 103.285           bnd_mbox_s4 =
 103.286 -         (\<lambda>(P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool) X\<Colon>TPTP_Interpret.ind.
 103.287 -             \<forall>Y\<Colon>TPTP_Interpret.ind. bnd_irel X Y \<longrightarrow> P Y) \<and>
 103.288 +         (\<lambda>(P::TPTP_Interpret.ind \<Rightarrow> bool) X::TPTP_Interpret.ind.
 103.289 +             \<forall>Y::TPTP_Interpret.ind. bnd_irel X Y \<longrightarrow> P Y) \<and>
 103.290           bnd_mand =
 103.291 -         (\<lambda>(X\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.292 -             (Y\<Colon>TPTP_Interpret.ind \<Rightarrow> bool) U\<Colon>TPTP_Interpret.ind.
 103.293 +         (\<lambda>(X::TPTP_Interpret.ind \<Rightarrow> bool)
 103.294 +             (Y::TPTP_Interpret.ind \<Rightarrow> bool) U::TPTP_Interpret.ind.
 103.295               X U \<and> Y U) \<and>
 103.296           bnd_ixor =
 103.297 -         (\<lambda>(P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.298 -             Q\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.299 +         (\<lambda>(P::TPTP_Interpret.ind \<Rightarrow> bool)
 103.300 +             Q::TPTP_Interpret.ind \<Rightarrow> bool.
 103.301               bnd_inot (bnd_iequiv P Q)) \<and>
 103.302           bnd_ivalid = All \<and>
 103.303 -         bnd_itrue = (\<lambda>W\<Colon>TPTP_Interpret.ind. True) \<and>
 103.304 +         bnd_itrue = (\<lambda>W::TPTP_Interpret.ind. True) \<and>
 103.305           bnd_isatisfiable = Ex \<and>
 103.306           bnd_ior =
 103.307 -         (\<lambda>(P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.308 -             Q\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.309 +         (\<lambda>(P::TPTP_Interpret.ind \<Rightarrow> bool)
 103.310 +             Q::TPTP_Interpret.ind \<Rightarrow> bool.
 103.311               bnd_mor (bnd_mbox_s4 P) (bnd_mbox_s4 Q)) \<and>
 103.312           bnd_inot =
 103.313 -         (\<lambda>P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.314 +         (\<lambda>P::TPTP_Interpret.ind \<Rightarrow> bool.
 103.315               bnd_mnot (bnd_mbox_s4 P)) \<and>
 103.316           bnd_iinvalid =
 103.317 -         (\<lambda>Phi\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.318 -             \<forall>W\<Colon>TPTP_Interpret.ind. \<not> Phi W) \<and>
 103.319 +         (\<lambda>Phi::TPTP_Interpret.ind \<Rightarrow> bool.
 103.320 +             \<forall>W::TPTP_Interpret.ind. \<not> Phi W) \<and>
 103.321           bnd_iimplies =
 103.322 -         (\<lambda>(P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.323 -             Q\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.324 +         (\<lambda>(P::TPTP_Interpret.ind \<Rightarrow> bool)
 103.325 +             Q::TPTP_Interpret.ind \<Rightarrow> bool.
 103.326               bnd_mimplies (bnd_mbox_s4 P) (bnd_mbox_s4 Q)) \<and>
 103.327           bnd_iimplied =
 103.328 -         (\<lambda>(P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.329 -             Q\<Colon>TPTP_Interpret.ind \<Rightarrow> bool. bnd_iimplies Q P) \<and>
 103.330 +         (\<lambda>(P::TPTP_Interpret.ind \<Rightarrow> bool)
 103.331 +             Q::TPTP_Interpret.ind \<Rightarrow> bool. bnd_iimplies Q P) \<and>
 103.332           bnd_ifalse = bnd_inot bnd_itrue \<and>
 103.333           bnd_iequiv =
 103.334 -         (\<lambda>(P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.335 -             Q\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.336 +         (\<lambda>(P::TPTP_Interpret.ind \<Rightarrow> bool)
 103.337 +             Q::TPTP_Interpret.ind \<Rightarrow> bool.
 103.338               bnd_iand (bnd_iimplies P Q) (bnd_iimplies Q P)) \<and>
 103.339           bnd_icountersatisfiable =
 103.340 -         (\<lambda>Phi\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.341 -             \<exists>W\<Colon>TPTP_Interpret.ind. \<not> Phi W) \<and>
 103.342 -         bnd_iatom = (\<lambda>P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool. P) \<and>
 103.343 +         (\<lambda>Phi::TPTP_Interpret.ind \<Rightarrow> bool.
 103.344 +             \<exists>W::TPTP_Interpret.ind. \<not> Phi W) \<and>
 103.345 +         bnd_iatom = (\<lambda>P::TPTP_Interpret.ind \<Rightarrow> bool. P) \<and>
 103.346           bnd_iand = bnd_mand \<and>
 103.347 -         (\<forall>(X\<Colon>TPTP_Interpret.ind) (Y\<Colon>TPTP_Interpret.ind)
 103.348 -             Z\<Colon>TPTP_Interpret.ind.
 103.349 +         (\<forall>(X::TPTP_Interpret.ind) (Y::TPTP_Interpret.ind)
 103.350 +             Z::TPTP_Interpret.ind.
 103.351               bnd_irel X Y \<and> bnd_irel Y Z \<longrightarrow> bnd_irel X Z) \<Longrightarrow>
 103.352 -         (\<forall>(X\<Colon>TPTP_Interpret.ind) (Y\<Colon>TPTP_Interpret.ind)
 103.353 -             Z\<Colon>TPTP_Interpret.ind.
 103.354 +         (\<forall>(X::TPTP_Interpret.ind) (Y::TPTP_Interpret.ind)
 103.355 +             Z::TPTP_Interpret.ind.
 103.356               bnd_irel X Y \<and> bnd_irel Y Z \<longrightarrow> bnd_irel X Z) =
 103.357           True"
 103.358  (* by (tactic {*tectoc @{context}*}) *)
 103.359 @@ -2072,61 +2072,61 @@
 103.360  
 103.361       (* (Annotated_step ("11", "unfold_def"), *)
 103.362  lemma "bnd_mor =
 103.363 -         (\<lambda>(X\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.364 -             (Y\<Colon>TPTP_Interpret.ind \<Rightarrow> bool) U\<Colon>TPTP_Interpret.ind.
 103.365 +         (\<lambda>(X::TPTP_Interpret.ind \<Rightarrow> bool)
 103.366 +             (Y::TPTP_Interpret.ind \<Rightarrow> bool) U::TPTP_Interpret.ind.
 103.367               X U \<or> Y U) \<and>
 103.368           bnd_mnot =
 103.369 -         (\<lambda>(X\<Colon>TPTP_Interpret.ind \<Rightarrow> bool) U\<Colon>TPTP_Interpret.ind.
 103.370 +         (\<lambda>(X::TPTP_Interpret.ind \<Rightarrow> bool) U::TPTP_Interpret.ind.
 103.371               \<not> X U) \<and>
 103.372           bnd_mimplies =
 103.373 -         (\<lambda>U\<Colon>TPTP_Interpret.ind \<Rightarrow> bool. bnd_mor (bnd_mnot U)) \<and>
 103.374 +         (\<lambda>U::TPTP_Interpret.ind \<Rightarrow> bool. bnd_mor (bnd_mnot U)) \<and>
 103.375           bnd_mbox_s4 =
 103.376 -         (\<lambda>(P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool) X\<Colon>TPTP_Interpret.ind.
 103.377 -             \<forall>Y\<Colon>TPTP_Interpret.ind. bnd_irel X Y \<longrightarrow> P Y) \<and>
 103.378 +         (\<lambda>(P::TPTP_Interpret.ind \<Rightarrow> bool) X::TPTP_Interpret.ind.
 103.379 +             \<forall>Y::TPTP_Interpret.ind. bnd_irel X Y \<longrightarrow> P Y) \<and>
 103.380           bnd_mand =
 103.381 -         (\<lambda>(X\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.382 -             (Y\<Colon>TPTP_Interpret.ind \<Rightarrow> bool) U\<Colon>TPTP_Interpret.ind.
 103.383 +         (\<lambda>(X::TPTP_Interpret.ind \<Rightarrow> bool)
 103.384 +             (Y::TPTP_Interpret.ind \<Rightarrow> bool) U::TPTP_Interpret.ind.
 103.385               X U \<and> Y U) \<and>
 103.386           bnd_ixor =
 103.387 -         (\<lambda>(P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.388 -             Q\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.389 +         (\<lambda>(P::TPTP_Interpret.ind \<Rightarrow> bool)
 103.390 +             Q::TPTP_Interpret.ind \<Rightarrow> bool.
 103.391               bnd_inot (bnd_iequiv P Q)) \<and>
 103.392           bnd_ivalid = All \<and>
 103.393 -         bnd_itrue = (\<lambda>W\<Colon>TPTP_Interpret.ind. True) \<and>
 103.394 +         bnd_itrue = (\<lambda>W::TPTP_Interpret.ind. True) \<and>
 103.395           bnd_isatisfiable = Ex \<and>
 103.396           bnd_ior =
 103.397 -         (\<lambda>(P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.398 -             Q\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.399 +         (\<lambda>(P::TPTP_Interpret.ind \<Rightarrow> bool)
 103.400 +             Q::TPTP_Interpret.ind \<Rightarrow> bool.
 103.401               bnd_mor (bnd_mbox_s4 P) (bnd_mbox_s4 Q)) \<and>
 103.402           bnd_inot =
 103.403 -         (\<lambda>P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.404 +         (\<lambda>P::TPTP_Interpret.ind \<Rightarrow> bool.
 103.405               bnd_mnot (bnd_mbox_s4 P)) \<and>
 103.406           bnd_iinvalid =
 103.407 -         (\<lambda>Phi\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.408 -             \<forall>W\<Colon>TPTP_Interpret.ind. \<not> Phi W) \<and>
 103.409 +         (\<lambda>Phi::TPTP_Interpret.ind \<Rightarrow> bool.
 103.410 +             \<forall>W::TPTP_Interpret.ind. \<not> Phi W) \<and>
 103.411           bnd_iimplies =
 103.412 -         (\<lambda>(P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.413 -             Q\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.414 +         (\<lambda>(P::TPTP_Interpret.ind \<Rightarrow> bool)
 103.415 +             Q::TPTP_Interpret.ind \<Rightarrow> bool.
 103.416               bnd_mimplies (bnd_mbox_s4 P) (bnd_mbox_s4 Q)) \<and>
 103.417           bnd_iimplied =
 103.418 -         (\<lambda>(P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.419 -             Q\<Colon>TPTP_Interpret.ind \<Rightarrow> bool. bnd_iimplies Q P) \<and>
 103.420 +         (\<lambda>(P::TPTP_Interpret.ind \<Rightarrow> bool)
 103.421 +             Q::TPTP_Interpret.ind \<Rightarrow> bool. bnd_iimplies Q P) \<and>
 103.422           bnd_ifalse = bnd_inot bnd_itrue \<and>
 103.423           bnd_iequiv =
 103.424 -         (\<lambda>(P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool)
 103.425 -             Q\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.426 +         (\<lambda>(P::TPTP_Interpret.ind \<Rightarrow> bool)
 103.427 +             Q::TPTP_Interpret.ind \<Rightarrow> bool.
 103.428               bnd_iand (bnd_iimplies P Q) (bnd_iimplies Q P)) \<and>
 103.429           bnd_icountersatisfiable =
 103.430 -         (\<lambda>Phi\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.431 -             \<exists>W\<Colon>TPTP_Interpret.ind. \<not> Phi W) \<and>
 103.432 -         bnd_iatom = (\<lambda>P\<Colon>TPTP_Interpret.ind \<Rightarrow> bool. P) \<and>
 103.433 +         (\<lambda>Phi::TPTP_Interpret.ind \<Rightarrow> bool.
 103.434 +             \<exists>W::TPTP_Interpret.ind. \<not> Phi W) \<and>
 103.435 +         bnd_iatom = (\<lambda>P::TPTP_Interpret.ind \<Rightarrow> bool. P) \<and>
 103.436           bnd_iand = bnd_mand \<and>
 103.437           bnd_ivalid
 103.438            (bnd_iimplies (bnd_iatom bnd_q) (bnd_iatom bnd_r)) \<Longrightarrow>
 103.439 -         (\<forall>SY161\<Colon>TPTP_Interpret.ind.
 103.440 -             \<not> (\<forall>SY162\<Colon>TPTP_Interpret.ind.
 103.441 +         (\<forall>SY161::TPTP_Interpret.ind.
 103.442 +             \<not> (\<forall>SY162::TPTP_Interpret.ind.
 103.443                     bnd_irel SY161 SY162 \<longrightarrow> bnd_q SY162) \<or>
 103.444 -             (\<forall>SY163\<Colon>TPTP_Interpret.ind.
 103.445 +             (\<forall>SY163::TPTP_Interpret.ind.
 103.446                   bnd_irel SY161 SY163 \<longrightarrow> bnd_r SY163)) =
 103.447           True"
 103.448  (* by (tactic {*tectoc @{context}*}) *)
 103.449 @@ -2147,12 +2147,12 @@
 103.450  *)
 103.451  
 103.452       (* (Annotated_step ("11", "extcnf_forall_neg"), *)
 103.453 -lemma "\<forall>SV1\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.454 -            (\<forall>SY2\<Colon>TPTP_Interpret.ind.
 103.455 +lemma "\<forall>SV1::TPTP_Interpret.ind \<Rightarrow> bool.
 103.456 +            (\<forall>SY2::TPTP_Interpret.ind.
 103.457                  \<not> (\<not> (\<not> SV1 SY2 \<or> SEV405_5_bnd_cA) \<or>
 103.458                     \<not> (\<not> SEV405_5_bnd_cA \<or> SV1 SY2))) =
 103.459              False \<Longrightarrow>
 103.460 -         \<forall>SV1\<Colon>TPTP_Interpret.ind \<Rightarrow> bool.
 103.461 +         \<forall>SV1::TPTP_Interpret.ind \<Rightarrow> bool.
 103.462              (\<not> (\<not> (\<not> SV1 (SEV405_5_bnd_sK1_SY2 SV1) \<or> SEV405_5_bnd_cA) \<or>
 103.463                  \<not> (\<not> SEV405_5_bnd_cA \<or> SV1 (SEV405_5_bnd_sK1_SY2 SV1)))) =
 103.464              False"
 103.465 @@ -2184,7 +2184,7 @@
 103.466  
 103.467  (*from SYO198^5.p.out*)
 103.468     (* [[(Annotated_step ("11", "extcnf_forall_special_pos"), *)
 103.469 -lemma "(\<forall>SX0\<Colon>bool \<Rightarrow> bool.
 103.470 +lemma "(\<forall>SX0::bool \<Rightarrow> bool.
 103.471               \<not> \<not> (\<not> SX0 bnd_sK1_Xx \<or> \<not> SX0 bnd_sK2_Xy)) =
 103.472           True \<Longrightarrow>
 103.473           (\<not> \<not> (\<not> True \<or> \<not> True)) = True"
 103.474 @@ -2192,7 +2192,7 @@
 103.475  done
 103.476  
 103.477       (* (Annotated_step ("13", "extcnf_forall_special_pos"), *)
 103.478 -lemma "(\<forall>SX0\<Colon>bool \<Rightarrow> bool.
 103.479 +lemma "(\<forall>SX0::bool \<Rightarrow> bool.
 103.480               \<not> \<not> (\<not> SX0 bnd_sK1_Xx \<or> \<not> SX0 bnd_sK2_Xy)) =
 103.481           True \<Longrightarrow>
 103.482           (\<not> \<not> (\<not> bnd_sK1_Xx \<or> \<not> bnd_sK2_Xy)) = True"
 103.483 @@ -2200,9 +2200,9 @@
 103.484  done
 103.485  
 103.486     (* [[(Annotated_step ("8", "polarity_switch"), *)
 103.487 -lemma "(\<forall>(Xx\<Colon>bool) (Xy\<Colon>bool) Xz\<Colon>bool. True \<and> True \<longrightarrow> True) =
 103.488 +lemma "(\<forall>(Xx::bool) (Xy::bool) Xz::bool. True \<and> True \<longrightarrow> True) =
 103.489           False \<Longrightarrow>
 103.490 -         (\<not> (\<forall>(Xx\<Colon>bool) (Xy\<Colon>bool) Xz\<Colon>bool.
 103.491 +         (\<not> (\<forall>(Xx::bool) (Xy::bool) Xz::bool.
 103.492                  True \<and> True \<longrightarrow> True)) =
 103.493           True"
 103.494  apply (tactic {*nonfull_extcnf_combined_tac @{context} [Polarity_switch]*})
   104.1 --- a/src/HOL/Transcendental.thy	Tue Sep 01 17:25:36 2015 +0200
   104.2 +++ b/src/HOL/Transcendental.thy	Tue Sep 01 22:32:58 2015 +0200
   104.3 @@ -171,13 +171,13 @@
   104.4  using powser_times_n_limit_0 [of "inverse x"]
   104.5  by (simp add: norm_divide divide_simps)
   104.6  
   104.7 -lemma lim_1_over_n: "((\<lambda>n. 1 / of_nat n) ---> (0::'a\<Colon>real_normed_field)) sequentially"
   104.8 +lemma lim_1_over_n: "((\<lambda>n. 1 / of_nat n) ---> (0::'a::real_normed_field)) sequentially"
   104.9    apply (clarsimp simp: lim_sequentially norm_divide dist_norm divide_simps)
  104.10    apply (auto simp: mult_ac dest!: ex_less_of_nat_mult [of _ 1])
  104.11    by (metis le_eq_less_or_eq less_trans linordered_comm_semiring_strict_class.comm_mult_strict_left_mono 
  104.12            of_nat_less_0_iff of_nat_less_iff zero_less_mult_iff zero_less_one)
  104.13  
  104.14 -lemma lim_inverse_n: "((\<lambda>n. inverse(of_nat n)) ---> (0::'a\<Colon>real_normed_field)) sequentially"
  104.15 +lemma lim_inverse_n: "((\<lambda>n. inverse(of_nat n)) ---> (0::'a::real_normed_field)) sequentially"
  104.16    using lim_1_over_n
  104.17    by (simp add: inverse_eq_divide)
  104.18  
   105.1 --- a/src/HOL/UNITY/Follows.thy	Tue Sep 01 17:25:36 2015 +0200
   105.2 +++ b/src/HOL/UNITY/Follows.thy	Tue Sep 01 22:32:58 2015 +0200
   105.3 @@ -172,7 +172,7 @@
   105.4  instantiation multiset :: (order) ordered_ab_semigroup_add
   105.5  begin
   105.6  
   105.7 -definition less_multiset :: "'a\<Colon>order multiset \<Rightarrow> 'a multiset \<Rightarrow> bool" where
   105.8 +definition less_multiset :: "'a::order multiset \<Rightarrow> 'a multiset \<Rightarrow> bool" where
   105.9    "M' < M \<longleftrightarrow> M' #<# M"
  105.10  
  105.11  definition less_eq_multiset :: "'a multiset \<Rightarrow> 'a multiset \<Rightarrow> bool" where
   106.1 --- a/src/HOL/Word/Word.thy	Tue Sep 01 17:25:36 2015 +0200
   106.2 +++ b/src/HOL/Word/Word.thy	Tue Sep 01 22:32:58 2015 +0200
   106.3 @@ -43,7 +43,7 @@
   106.4    "uint a = uint b \<Longrightarrow> a = b"
   106.5    by (simp add: word_uint_eq_iff)
   106.6  
   106.7 -definition word_of_int :: "int \<Rightarrow> 'a\<Colon>len0 word"
   106.8 +definition word_of_int :: "int \<Rightarrow> 'a::len0 word"
   106.9  where
  106.10    -- {* representation of words using unsigned or signed bins,
  106.11      only difference in these is the type class *}
  106.12 @@ -2707,7 +2707,7 @@
  106.13    by (auto simp add: word_ubin.eq_norm nth_bintr nth_2p_bin)
  106.14  
  106.15  lemma nth_w2p:
  106.16 -  "((2\<Colon>'a\<Colon>len word) ^ n) !! m \<longleftrightarrow> m = n \<and> m < len_of TYPE('a\<Colon>len)"
  106.17 +  "((2::'a::len word) ^ n) !! m \<longleftrightarrow> m = n \<and> m < len_of TYPE('a::len)"
  106.18    unfolding test_bit_2p [symmetric] word_of_int [symmetric]
  106.19    by (simp add:  of_int_power)
  106.20  
  106.21 @@ -3736,7 +3736,7 @@
  106.22  
  106.23  lemma test_bit_split:
  106.24    "word_split c = (a, b) \<Longrightarrow>
  106.25 -    (\<forall>n\<Colon>nat. b !! n \<longleftrightarrow> n < size b \<and> c !! n) \<and> (\<forall>m\<Colon>nat. a !! m \<longleftrightarrow> m < size a \<and> c !! (m + size b))"
  106.26 +    (\<forall>n::nat. b !! n \<longleftrightarrow> n < size b \<and> c !! n) \<and> (\<forall>m::nat. a !! m \<longleftrightarrow> m < size a \<and> c !! (m + size b))"
  106.27    by (simp add: test_bit_split')
  106.28  
  106.29  lemma test_bit_split_eq: "word_split c = (a, b) <-> 
   107.1 --- a/src/HOL/ZF/HOLZF.thy	Tue Sep 01 17:25:36 2015 +0200
   107.2 +++ b/src/HOL/ZF/HOLZF.thy	Tue Sep 01 22:32:58 2015 +0200
   107.3 @@ -583,8 +583,8 @@
   107.4      ultimately have "False" using u by arith
   107.5    }
   107.6    note lemma_nat2Nat = this
   107.7 -  have th:"\<And>x y. \<not> (x < y \<and> (\<forall>(m\<Colon>nat). y \<noteq> x + m))" by presburger
   107.8 -  have th': "\<And>x y. \<not> (x \<noteq> y \<and> (\<not> x < y) \<and> (\<forall>(m\<Colon>nat). x \<noteq> y + m))" by presburger
   107.9 +  have th:"\<And>x y. \<not> (x < y \<and> (\<forall>(m::nat). y \<noteq> x + m))" by presburger
  107.10 +  have th': "\<And>x y. \<not> (x \<noteq> y \<and> (\<not> x < y) \<and> (\<forall>(m::nat). x \<noteq> y + m))" by presburger
  107.11    show ?thesis
  107.12      apply (auto simp add: inj_on_def)
  107.13      apply (case_tac "x = y")
   108.1 --- a/src/HOL/ex/Dedekind_Real.thy	Tue Sep 01 17:25:36 2015 +0200
   108.2 +++ b/src/HOL/ex/Dedekind_Real.thy	Tue Sep 01 22:32:58 2015 +0200
   108.3 @@ -102,7 +102,7 @@
   108.4    preal_inverse_def:
   108.5      "inverse R == Abs_preal (inverse_set (Rep_preal R))"
   108.6  
   108.7 -definition "R div S = R * inverse (S\<Colon>preal)"
   108.8 +definition "R div S = R * inverse (S::preal)"
   108.9  
  108.10  definition
  108.11    preal_one_def:
  108.12 @@ -220,10 +220,10 @@
  108.13  begin
  108.14  
  108.15  definition
  108.16 -  "(inf \<Colon> preal \<Rightarrow> preal \<Rightarrow> preal) = min"
  108.17 +  "(inf :: preal \<Rightarrow> preal \<Rightarrow> preal) = min"
  108.18  
  108.19  definition
  108.20 -  "(sup \<Colon> preal \<Rightarrow> preal \<Rightarrow> preal) = max"
  108.21 +  "(sup :: preal \<Rightarrow> preal \<Rightarrow> preal) = max"
  108.22  
  108.23  instance
  108.24    by intro_classes
  108.25 @@ -1229,7 +1229,7 @@
  108.26      (\<exists>x y u v. x+v \<le> u+y & (x,y) \<in> Rep_Real z & (u,v) \<in> Rep_Real w)"
  108.27  
  108.28  definition
  108.29 -  real_less_def: "x < (y\<Colon>real) \<longleftrightarrow> x \<le> y \<and> x \<noteq> y"
  108.30 +  real_less_def: "x < (y::real) \<longleftrightarrow> x \<le> y \<and> x \<noteq> y"
  108.31  
  108.32  definition
  108.33    real_abs_def:  "abs (r::real) = (if r < 0 then - r else r)"
  108.34 @@ -1561,10 +1561,10 @@
  108.35  begin
  108.36  
  108.37  definition
  108.38 -  "(inf \<Colon> real \<Rightarrow> real \<Rightarrow> real) = min"
  108.39 +  "(inf :: real \<Rightarrow> real \<Rightarrow> real) = min"
  108.40  
  108.41  definition
  108.42 -  "(sup \<Colon> real \<Rightarrow> real \<Rightarrow> real) = max"
  108.43 +  "(sup :: real \<Rightarrow> real \<Rightarrow> real) = max"
  108.44  
  108.45  instance
  108.46    by default (auto simp add: inf_real_def sup_real_def max_min_distrib2)
   109.1 --- a/src/HOL/ex/Eval_Examples.thy	Tue Sep 01 17:25:36 2015 +0200
   109.2 +++ b/src/HOL/ex/Eval_Examples.thy	Tue Sep 01 22:32:58 2015 +0200
   109.3 @@ -43,7 +43,7 @@
   109.4  text {* a fancy datatype *}
   109.5  
   109.6  datatype ('a, 'b) foo =
   109.7 -    Foo "'a\<Colon>order" 'b
   109.8 +    Foo "'a::order" 'b
   109.9    | Bla "('a, 'b) bar"
  109.10    | Dummy nat
  109.11  and ('a, 'b) bar =
   110.1 --- a/src/HOL/ex/FinFunPred.thy	Tue Sep 01 17:25:36 2015 +0200
   110.2 +++ b/src/HOL/ex/FinFunPred.thy	Tue Sep 01 22:32:58 2015 +0200
   110.3 @@ -15,7 +15,7 @@
   110.4  
   110.5  definition le_finfun_def [code del]: "f \<le> g \<longleftrightarrow> (\<forall>x. f $ x \<le> g $ x)"
   110.6  
   110.7 -definition [code del]: "(f\<Colon>'a \<Rightarrow>f 'b) < g \<longleftrightarrow> f \<le> g \<and> \<not> g \<le> f"
   110.8 +definition [code del]: "(f::'a \<Rightarrow>f 'b) < g \<longleftrightarrow> f \<le> g \<and> \<not> g \<le> f"
   110.9  
  110.10  instance ..
  110.11  
   111.1 --- a/src/HOL/ex/Normalization_by_Evaluation.thy	Tue Sep 01 17:25:36 2015 +0200
   111.2 +++ b/src/HOL/ex/Normalization_by_Evaluation.thy	Tue Sep 01 22:32:58 2015 +0200
   111.3 @@ -99,8 +99,8 @@
   111.4  lemma "(2::int) < 3" by normalization
   111.5  lemma "(2::int) <= 3" by normalization
   111.6  lemma "abs ((-4::int) + 2 * 1) = 2" by normalization
   111.7 -lemma "4 - 42 * abs (3 + (-7\<Colon>int)) = -164" by normalization
   111.8 -lemma "(if (0\<Colon>nat) \<le> (x\<Colon>nat) then 0\<Colon>nat else x) = 0" by normalization
   111.9 +lemma "4 - 42 * abs (3 + (-7::int)) = -164" by normalization
  111.10 +lemma "(if (0::nat) \<le> (x::nat) then 0::nat else x) = 0" by normalization
  111.11  lemma "4 = Suc (Suc (Suc (Suc 0)))" by normalization
  111.12  lemma "nat 4 = Suc (Suc (Suc (Suc 0)))" by normalization
  111.13  lemma "[Suc 0, 0] = [Suc 0, 0]" by normalization
  111.14 @@ -127,8 +127,8 @@
  111.15  
  111.16  lemma "map f [x, y] = [f x, f y]" by normalization
  111.17  lemma "(map f [x, y], w) = ([f x, f y], w)" by normalization
  111.18 -lemma "map f [x, y] = [f x \<Colon> 'a\<Colon>semigroup_add, f y]" by normalization
  111.19 -lemma "map f [x \<Colon> 'a\<Colon>semigroup_add, y] = [f x, f y]" by normalization
  111.20 -lemma "(map f [x \<Colon> 'a\<Colon>semigroup_add, y], w \<Colon> 'b\<Colon>finite) = ([f x, f y], w)" by normalization
  111.21 +lemma "map f [x, y] = [f x :: 'a::semigroup_add, f y]" by normalization
  111.22 +lemma "map f [x :: 'a::semigroup_add, y] = [f x, f y]" by normalization
  111.23 +lemma "(map f [x :: 'a::semigroup_add, y], w :: 'b::finite) = ([f x, f y], w)" by normalization
  111.24  
  111.25  end
   112.1 --- a/src/HOL/ex/Transfer_Ex.thy	Tue Sep 01 17:25:36 2015 +0200
   112.2 +++ b/src/HOL/ex/Transfer_Ex.thy	Tue Sep 01 22:32:58 2015 +0200
   112.3 @@ -8,58 +8,58 @@
   112.4  lemma ex1: "(x::nat) + y = y + x"
   112.5    by auto
   112.6  
   112.7 -lemma "0 \<le> (y\<Colon>int) \<Longrightarrow> 0 \<le> (x\<Colon>int) \<Longrightarrow> x + y = y + x"
   112.8 +lemma "0 \<le> (y::int) \<Longrightarrow> 0 \<le> (x::int) \<Longrightarrow> x + y = y + x"
   112.9    by (fact ex1 [transferred])
  112.10  
  112.11  (* Using new transfer package *)
  112.12 -lemma "0 \<le> (x\<Colon>int) \<Longrightarrow> 0 \<le> (y\<Colon>int) \<Longrightarrow> x + y = y + x"
  112.13 +lemma "0 \<le> (x::int) \<Longrightarrow> 0 \<le> (y::int) \<Longrightarrow> x + y = y + x"
  112.14    by (fact ex1 [untransferred])
  112.15  
  112.16  lemma ex2: "(a::nat) div b * b + a mod b = a"
  112.17    by (rule mod_div_equality)
  112.18  
  112.19 -lemma "0 \<le> (b\<Colon>int) \<Longrightarrow> 0 \<le> (a\<Colon>int) \<Longrightarrow> a div b * b + a mod b = a"
  112.20 +lemma "0 \<le> (b::int) \<Longrightarrow> 0 \<le> (a::int) \<Longrightarrow> a div b * b + a mod b = a"
  112.21    by (fact ex2 [transferred])
  112.22  
  112.23  (* Using new transfer package *)
  112.24 -lemma "0 \<le> (a\<Colon>int) \<Longrightarrow> 0 \<le> (b\<Colon>int) \<Longrightarrow> a div b * b + a mod b = a"
  112.25 +lemma "0 \<le> (a::int) \<Longrightarrow> 0 \<le> (b::int) \<Longrightarrow> a div b * b + a mod b = a"
  112.26    by (fact ex2 [untransferred])
  112.27  
  112.28  lemma ex3: "ALL (x::nat). ALL y. EX z. z >= x + y"
  112.29    by auto
  112.30  
  112.31 -lemma "\<forall>x\<ge>0\<Colon>int. \<forall>y\<ge>0. \<exists>z\<ge>0. x + y \<le> z"
  112.32 +lemma "\<forall>x\<ge>0::int. \<forall>y\<ge>0. \<exists>z\<ge>0. x + y \<le> z"
  112.33    by (fact ex3 [transferred nat_int])
  112.34  
  112.35  (* Using new transfer package *)
  112.36 -lemma "\<forall>x\<Colon>int\<in>{0..}. \<forall>y\<in>{0..}. \<exists>z\<in>{0..}. x + y \<le> z"
  112.37 +lemma "\<forall>x::int\<in>{0..}. \<forall>y\<in>{0..}. \<exists>z\<in>{0..}. x + y \<le> z"
  112.38    by (fact ex3 [untransferred])
  112.39  
  112.40  lemma ex4: "(x::nat) >= y \<Longrightarrow> (x - y) + y = x"
  112.41    by auto
  112.42  
  112.43 -lemma "0 \<le> (x\<Colon>int) \<Longrightarrow> 0 \<le> (y\<Colon>int) \<Longrightarrow> y \<le> x \<Longrightarrow> tsub x y + y = x"
  112.44 +lemma "0 \<le> (x::int) \<Longrightarrow> 0 \<le> (y::int) \<Longrightarrow> y \<le> x \<Longrightarrow> tsub x y + y = x"
  112.45    by (fact ex4 [transferred])
  112.46  
  112.47  (* Using new transfer package *)
  112.48 -lemma "0 \<le> (y\<Colon>int) \<Longrightarrow> 0 \<le> (x\<Colon>int) \<Longrightarrow> y \<le> x \<Longrightarrow> tsub x y + y = x"
  112.49 +lemma "0 \<le> (y::int) \<Longrightarrow> 0 \<le> (x::int) \<Longrightarrow> y \<le> x \<Longrightarrow> tsub x y + y = x"
  112.50    by (fact ex4 [untransferred])
  112.51  
  112.52  lemma ex5: "(2::nat) * \<Sum>{..n} = n * (n + 1)"
  112.53    by (induct n rule: nat_induct, auto)
  112.54  
  112.55 -lemma "0 \<le> (n\<Colon>int) \<Longrightarrow> 2 * \<Sum>{0..n} = n * (n + 1)"
  112.56 +lemma "0 \<le> (n::int) \<Longrightarrow> 2 * \<Sum>{0..n} = n * (n + 1)"
  112.57    by (fact ex5 [transferred])
  112.58  
  112.59  (* Using new transfer package *)
  112.60 -lemma "0 \<le> (n\<Colon>int) \<Longrightarrow> 2 * \<Sum>{0..n} = n * (n + 1)"
  112.61 +lemma "0 \<le> (n::int) \<Longrightarrow> 2 * \<Sum>{0..n} = n * (n + 1)"
  112.62    by (fact ex5 [untransferred])
  112.63  
  112.64 -lemma "0 \<le> (n\<Colon>nat) \<Longrightarrow> 2 * \<Sum>{0..n} = n * (n + 1)"
  112.65 +lemma "0 \<le> (n::nat) \<Longrightarrow> 2 * \<Sum>{0..n} = n * (n + 1)"
  112.66    by (fact ex5 [transferred, transferred])
  112.67  
  112.68  (* Using new transfer package *)
  112.69 -lemma "0 \<le> (n\<Colon>nat) \<Longrightarrow> 2 * \<Sum>{..n} = n * (n + 1)"
  112.70 +lemma "0 \<le> (n::nat) \<Longrightarrow> 2 * \<Sum>{..n} = n * (n + 1)"
  112.71    by (fact ex5 [untransferred, Transfer.transferred])
  112.72  
  112.73  end
   113.1 --- a/src/HOL/ex/Transfer_Int_Nat.thy	Tue Sep 01 17:25:36 2015 +0200
   113.2 +++ b/src/HOL/ex/Transfer_Int_Nat.thy	Tue Sep 01 22:32:58 2015 +0200
   113.3 @@ -200,7 +200,7 @@
   113.4    involved are bi-unique. *}
   113.5  
   113.6  lemma
   113.7 -  assumes "\<And>xs\<Colon>int list. \<lbrakk>list_all (\<lambda>x. x \<ge> 0) xs; xs \<noteq> []\<rbrakk> \<Longrightarrow>
   113.8 +  assumes "\<And>xs::int list. \<lbrakk>list_all (\<lambda>x. x \<ge> 0) xs; xs \<noteq> []\<rbrakk> \<Longrightarrow>
   113.9      listsum xs < listsum (map (\<lambda>x. x + 1) xs)"
  113.10    shows "xs \<noteq> [] \<Longrightarrow> listsum xs < listsum (map Suc xs)"
  113.11  apply transfer
   114.1 --- a/src/Tools/Code_Generator.thy	Tue Sep 01 17:25:36 2015 +0200
   114.2 +++ b/src/Tools/Code_Generator.thy	Tue Sep 01 22:32:58 2015 +0200
   114.3 @@ -26,7 +26,7 @@
   114.4  ML_file "~~/src/Tools/Code/code_haskell.ML"
   114.5  ML_file "~~/src/Tools/Code/code_scala.ML"
   114.6  
   114.7 -code_datatype "TYPE('a\<Colon>{})"
   114.8 +code_datatype "TYPE('a::{})"
   114.9  
  114.10  definition holds :: "prop" where
  114.11    "holds \<equiv> ((\<lambda>x::prop. x) \<equiv> (\<lambda>x. x))"
  114.12 @@ -59,4 +59,3 @@
  114.13  hide_const (open) holds
  114.14  
  114.15  end
  114.16 -