removed relics of ASCII syntax for indexed big operators
authorhaftmann
Thu Nov 08 09:11:52 2018 +0100 (11 months ago)
changeset 692600a9688695a1b
parent 69259 438e1a11445f
child 69261 a41f49148525
removed relics of ASCII syntax for indexed big operators
src/HOL/Analysis/Binary_Product_Measure.thy
src/HOL/Analysis/Borel_Space.thy
src/HOL/Analysis/Bounded_Continuous_Function.thy
src/HOL/Analysis/Bounded_Linear_Function.thy
src/HOL/Analysis/Caratheodory.thy
src/HOL/Analysis/Complete_Measure.thy
src/HOL/Analysis/Connected.thy
src/HOL/Analysis/Convex_Euclidean_Space.thy
src/HOL/Analysis/Embed_Measure.thy
src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy
src/HOL/Analysis/Extended_Real_Limits.thy
src/HOL/Analysis/Finite_Cartesian_Product.thy
src/HOL/Analysis/Finite_Product_Measure.thy
src/HOL/Analysis/Function_Topology.thy
src/HOL/Analysis/Gamma_Function.thy
src/HOL/Analysis/Improper_Integral.thy
src/HOL/Analysis/Lebesgue_Measure.thy
src/HOL/Analysis/Measurable.thy
src/HOL/Analysis/Measure_Space.thy
src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy
src/HOL/Analysis/Ordered_Euclidean_Space.thy
src/HOL/Analysis/Polytope.thy
src/HOL/Analysis/Product_Vector.thy
src/HOL/Analysis/Radon_Nikodym.thy
src/HOL/Analysis/Regularity.thy
src/HOL/Analysis/Riemann_Mapping.thy
src/HOL/Analysis/Tagged_Division.thy
src/HOL/Analysis/Topology_Euclidean_Space.thy
src/HOL/Analysis/Uniform_Limit.thy
src/HOL/Analysis/Weierstrass_Theorems.thy
src/HOL/Complete_Lattices.thy
src/HOL/Complex.thy
src/HOL/Computational_Algebra/Formal_Power_Series.thy
src/HOL/Filter.thy
src/HOL/IMP/Collecting.thy
src/HOL/Library/Countable_Complete_Lattices.thy
src/HOL/Library/Extended_Nonnegative_Real.thy
src/HOL/Library/Extended_Real.thy
src/HOL/Library/Finite_Lattice.thy
src/HOL/Library/Liminf_Limsup.thy
src/HOL/Library/Multiset.thy
src/HOL/Library/Product_Order.thy
src/HOL/Probability/Discrete_Topology.thy
src/HOL/Probability/Distribution_Functions.thy
src/HOL/Probability/Essential_Supremum.thy
src/HOL/Probability/Fin_Map.thy
src/HOL/Probability/Giry_Monad.thy
src/HOL/Probability/Helly_Selection.thy
src/HOL/Probability/Projective_Family.thy
src/HOL/Probability/Projective_Limit.thy
src/HOL/Probability/SPMF.thy
src/HOL/Probability/Stream_Space.thy
src/HOL/Probability/Weak_Convergence.thy
src/HOL/Real_Vector_Spaces.thy
src/HOL/Topological_Spaces.thy
     1.1 --- a/src/HOL/Analysis/Binary_Product_Measure.thy	Wed Nov 07 23:03:45 2018 +0100
     1.2 +++ b/src/HOL/Analysis/Binary_Product_Measure.thy	Thu Nov 08 09:11:52 2018 +0100
     1.3 @@ -613,7 +613,7 @@
     1.4    have [simp]: "snd \<in> X \<times> Y \<rightarrow> Y" "fst \<in> X \<times> Y \<rightarrow> X"
     1.5      by auto
     1.6    let ?XY = "{{fst -` a \<inter> X \<times> Y | a. a \<in> A}, {snd -` b \<inter> X \<times> Y | b. b \<in> B}}"
     1.7 -  have "sets ?P = sets (SUP xy:?XY. sigma (X \<times> Y) xy)"
     1.8 +  have "sets ?P = sets (SUP xy\<in>?XY. sigma (X \<times> Y) xy)"
     1.9      by (simp add: vimage_algebra_sigma sets_pair_eq_sets_fst_snd A B)
    1.10    also have "\<dots> = sets (sigma (X \<times> Y) (\<Union>?XY))"
    1.11      by (intro Sup_sigma arg_cong[where f=sets]) auto
    1.12 @@ -713,7 +713,7 @@
    1.13    also have "{sigma ?\<Omega> {fst -` Aa \<inter> ?\<Omega> |Aa. Aa \<in> Ea}, sigma ?\<Omega> {snd -` Aa \<inter> ?\<Omega> |Aa. Aa \<in> Eb}} =
    1.14      sigma ?\<Omega> ` {{fst -` Aa \<inter> ?\<Omega> |Aa. Aa \<in> Ea}, {snd -` Aa \<inter> ?\<Omega> |Aa. Aa \<in> Eb}}"
    1.15      by auto
    1.16 -  also have "sets (SUP S:{{fst -` Aa \<inter> ?\<Omega> |Aa. Aa \<in> Ea}, {snd -` Aa \<inter> ?\<Omega> |Aa. Aa \<in> Eb}}. sigma ?\<Omega> S) =
    1.17 +  also have "sets (SUP S\<in>{{fst -` Aa \<inter> ?\<Omega> |Aa. Aa \<in> Ea}, {snd -` Aa \<inter> ?\<Omega> |Aa. Aa \<in> Eb}}. sigma ?\<Omega> S) =
    1.18      sets (sigma ?\<Omega> (\<Union>{{fst -` Aa \<inter> ?\<Omega> |Aa. Aa \<in> Ea}, {snd -` Aa \<inter> ?\<Omega> |Aa. Aa \<in> Eb}}))"
    1.19      using Ea(1) Eb(1) by (intro sets_Sup_sigma) auto
    1.20    also have "\<dots> \<subseteq> sets (sigma ?\<Omega> ?E)"
     2.1 --- a/src/HOL/Analysis/Borel_Space.thy	Wed Nov 07 23:03:45 2018 +0100
     2.2 +++ b/src/HOL/Analysis/Borel_Space.thy	Thu Nov 08 09:11:52 2018 +0100
     2.3 @@ -811,14 +811,14 @@
     2.4    fixes F :: "_ \<Rightarrow> _ \<Rightarrow> _::{complete_linorder, linorder_topology, second_countable_topology}"
     2.5    assumes [simp]: "countable I"
     2.6    assumes [measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> borel_measurable M"
     2.7 -  shows "(\<lambda>x. SUP i:I. F i x) \<in> borel_measurable M"
     2.8 +  shows "(\<lambda>x. SUP i\<in>I. F i x) \<in> borel_measurable M"
     2.9    by%unimportant (rule borel_measurableI_greater) (simp add: less_SUP_iff)
    2.10  
    2.11  lemma%unimportant borel_measurable_INF[measurable (raw)]:
    2.12    fixes F :: "_ \<Rightarrow> _ \<Rightarrow> _::{complete_linorder, linorder_topology, second_countable_topology}"
    2.13    assumes [simp]: "countable I"
    2.14    assumes [measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> borel_measurable M"
    2.15 -  shows "(\<lambda>x. INF i:I. F i x) \<in> borel_measurable M"
    2.16 +  shows "(\<lambda>x. INF i\<in>I. F i x) \<in> borel_measurable M"
    2.17    by (rule borel_measurableI_less) (simp add: INF_less_iff)
    2.18  
    2.19  lemma%unimportant borel_measurable_cSUP[measurable (raw)]:
    2.20 @@ -826,7 +826,7 @@
    2.21    assumes [simp]: "countable I"
    2.22    assumes [measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> borel_measurable M"
    2.23    assumes bdd: "\<And>x. x \<in> space M \<Longrightarrow> bdd_above ((\<lambda>i. F i x) ` I)"
    2.24 -  shows "(\<lambda>x. SUP i:I. F i x) \<in> borel_measurable M"
    2.25 +  shows "(\<lambda>x. SUP i\<in>I. F i x) \<in> borel_measurable M"
    2.26  proof cases
    2.27    assume "I = {}" then show ?thesis
    2.28      unfolding \<open>I = {}\<close> image_empty by simp
    2.29 @@ -837,9 +837,9 @@
    2.30      fix y
    2.31      have "{x \<in> space M. \<forall>i\<in>I. F i x \<le> y} \<in> sets M"
    2.32        by measurable
    2.33 -    also have "{x \<in> space M. \<forall>i\<in>I. F i x \<le> y} = {x \<in> space M. (SUP i:I. F i x) \<le> y}"
    2.34 +    also have "{x \<in> space M. \<forall>i\<in>I. F i x \<le> y} = {x \<in> space M. (SUP i\<in>I. F i x) \<le> y}"
    2.35        by (simp add: cSUP_le_iff \<open>I \<noteq> {}\<close> bdd cong: conj_cong)
    2.36 -    finally show "{x \<in> space M. (SUP i:I. F i x) \<le>  y} \<in> sets M"  .
    2.37 +    finally show "{x \<in> space M. (SUP i\<in>I. F i x) \<le>  y} \<in> sets M"  .
    2.38    qed
    2.39  qed
    2.40  
    2.41 @@ -848,7 +848,7 @@
    2.42    assumes [simp]: "countable I"
    2.43    assumes [measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> borel_measurable M"
    2.44    assumes bdd: "\<And>x. x \<in> space M \<Longrightarrow> bdd_below ((\<lambda>i. F i x) ` I)"
    2.45 -  shows "(\<lambda>x. INF i:I. F i x) \<in> borel_measurable M"
    2.46 +  shows "(\<lambda>x. INF i\<in>I. F i x) \<in> borel_measurable M"
    2.47  proof%unimportant cases
    2.48    assume "I = {}" then show ?thesis
    2.49      unfolding \<open>I = {}\<close> image_empty by simp
    2.50 @@ -859,9 +859,9 @@
    2.51      fix y
    2.52      have "{x \<in> space M. \<forall>i\<in>I. y \<le> F i x} \<in> sets M"
    2.53        by measurable
    2.54 -    also have "{x \<in> space M. \<forall>i\<in>I. y \<le> F i x} = {x \<in> space M. y \<le> (INF i:I. F i x)}"
    2.55 +    also have "{x \<in> space M. \<forall>i\<in>I. y \<le> F i x} = {x \<in> space M. y \<le> (INF i\<in>I. F i x)}"
    2.56        by (simp add: le_cINF_iff \<open>I \<noteq> {}\<close> bdd cong: conj_cong)
    2.57 -    finally show "{x \<in> space M. y \<le> (INF i:I. F i x)} \<in> sets M"  .
    2.58 +    finally show "{x \<in> space M. y \<le> (INF i\<in>I. F i x)} \<in> sets M"  .
    2.59    qed
    2.60  qed
    2.61  
    2.62 @@ -1958,22 +1958,22 @@
    2.63    fixes F :: "_ \<Rightarrow> _ \<Rightarrow> real"
    2.64    assumes [simp]: "countable I"
    2.65    assumes F[measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> borel_measurable M"
    2.66 -  shows "(\<lambda>x. INF i:I. F i x) \<in> borel_measurable M"
    2.67 +  shows "(\<lambda>x. INF i\<in>I. F i x) \<in> borel_measurable M"
    2.68  proof%unimportant (rule measurable_piecewise_restrict)
    2.69    let ?\<Omega> = "{x\<in>space M. bdd_below ((\<lambda>i. F i x)`I)}"
    2.70    show "countable {?\<Omega>, - ?\<Omega>}" "space M \<subseteq> \<Union>{?\<Omega>, - ?\<Omega>}" "\<And>X. X \<in> {?\<Omega>, - ?\<Omega>} \<Longrightarrow> X \<inter> space M \<in> sets M"
    2.71      by auto
    2.72 -  fix X assume "X \<in> {?\<Omega>, - ?\<Omega>}" then show "(\<lambda>x. INF i:I. F i x) \<in> borel_measurable (restrict_space M X)"
    2.73 +  fix X assume "X \<in> {?\<Omega>, - ?\<Omega>}" then show "(\<lambda>x. INF i\<in>I. F i x) \<in> borel_measurable (restrict_space M X)"
    2.74    proof safe
    2.75 -    show "(\<lambda>x. INF i:I. F i x) \<in> borel_measurable (restrict_space M ?\<Omega>)"
    2.76 +    show "(\<lambda>x. INF i\<in>I. F i x) \<in> borel_measurable (restrict_space M ?\<Omega>)"
    2.77        by (intro borel_measurable_cINF measurable_restrict_space1 F)
    2.78           (auto simp: space_restrict_space)
    2.79 -    show "(\<lambda>x. INF i:I. F i x) \<in> borel_measurable (restrict_space M (-?\<Omega>))"
    2.80 +    show "(\<lambda>x. INF i\<in>I. F i x) \<in> borel_measurable (restrict_space M (-?\<Omega>))"
    2.81      proof (subst measurable_cong)
    2.82        fix x assume "x \<in> space (restrict_space M (-?\<Omega>))"
    2.83        then have "\<not> (\<forall>i\<in>I. - F i x \<le> y)" for y
    2.84          by (auto simp: space_restrict_space bdd_above_def bdd_above_uminus[symmetric])
    2.85 -      then show "(INF i:I. F i x) = - (THE x. False)"
    2.86 +      then show "(INF i\<in>I. F i x) = - (THE x. False)"
    2.87          by (auto simp: space_restrict_space Inf_real_def Sup_real_def Least_def simp del: Set.ball_simps(10))
    2.88      qed simp
    2.89    qed
     3.1 --- a/src/HOL/Analysis/Bounded_Continuous_Function.thy	Wed Nov 07 23:03:45 2018 +0100
     3.2 +++ b/src/HOL/Analysis/Bounded_Continuous_Function.thy	Thu Nov 08 09:11:52 2018 +0100
     3.3 @@ -45,7 +45,7 @@
     3.4    is "\<lambda>f g. (SUP x. dist (f x) (g x))" .
     3.5  
     3.6  definition uniformity_bcontfun :: "('a \<Rightarrow>\<^sub>C 'b \<times> 'a \<Rightarrow>\<^sub>C 'b) filter"
     3.7 -  where "uniformity_bcontfun = (INF e:{0 <..}. principal {(x, y). dist x y < e})"
     3.8 +  where "uniformity_bcontfun = (INF e\<in>{0 <..}. principal {(x, y). dist x y < e})"
     3.9  
    3.10  definition open_bcontfun :: "('a \<Rightarrow>\<^sub>C 'b) set \<Rightarrow> bool"
    3.11    where "open_bcontfun S = (\<forall>x\<in>S. \<forall>\<^sub>F (x', y) in uniformity. x' = x \<longrightarrow> y \<in> S)"
     4.1 --- a/src/HOL/Analysis/Bounded_Linear_Function.thy	Wed Nov 07 23:03:45 2018 +0100
     4.2 +++ b/src/HOL/Analysis/Bounded_Linear_Function.thy	Thu Nov 08 09:11:52 2018 +0100
     4.3 @@ -150,7 +150,7 @@
     4.4    where "dist_blinfun a b = norm (a - b)"
     4.5  
     4.6  definition [code del]:
     4.7 -  "(uniformity :: (('a \<Rightarrow>\<^sub>L 'b) \<times> ('a \<Rightarrow>\<^sub>L 'b)) filter) = (INF e:{0 <..}. principal {(x, y). dist x y < e})"
     4.8 +  "(uniformity :: (('a \<Rightarrow>\<^sub>L 'b) \<times> ('a \<Rightarrow>\<^sub>L 'b)) filter) = (INF e\<in>{0 <..}. principal {(x, y). dist x y < e})"
     4.9  
    4.10  definition open_blinfun :: "('a \<Rightarrow>\<^sub>L 'b) set \<Rightarrow> bool"
    4.11    where [code del]: "open_blinfun S = (\<forall>x\<in>S. \<forall>\<^sub>F (x', y) in uniformity. x' = x \<longrightarrow> y \<in> S)"
     5.1 --- a/src/HOL/Analysis/Caratheodory.thy	Wed Nov 07 23:03:45 2018 +0100
     5.2 +++ b/src/HOL/Analysis/Caratheodory.thy	Thu Nov 08 09:11:52 2018 +0100
     5.3 @@ -22,7 +22,7 @@
     5.4      using assms by (simp add: fun_eq_iff)
     5.5    have reindex: "\<And>B. (\<Sum>x\<in>B. f (prod_decode x)) = sum f (prod_decode ` B)"
     5.6      by (simp add: sum.reindex[OF inj_prod_decode] comp_def)
     5.7 -  have "(SUP n. \<Sum>i<n. f (prod_decode i)) = (SUP p : UNIV \<times> UNIV. \<Sum>i<fst p. \<Sum>n<snd p. f (i, n))"
     5.8 +  have "(SUP n. \<Sum>i<n. f (prod_decode i)) = (SUP p \<in> UNIV \<times> UNIV. \<Sum>i<fst p. \<Sum>n<snd p. f (i, n))"
     5.9    proof (intro SUP_eq; clarsimp simp: sum.cartesian_product reindex)
    5.10      fix n
    5.11      let ?M = "\<lambda>f. Suc (Max (f ` prod_decode ` {..<n}))"
    5.12 @@ -299,7 +299,7 @@
    5.13  
    5.14  definition%important outer_measure :: "'a set set \<Rightarrow> ('a set \<Rightarrow> ennreal) \<Rightarrow> 'a set \<Rightarrow> ennreal" where
    5.15     "outer_measure M f X =
    5.16 -     (INF A:{A. range A \<subseteq> M \<and> disjoint_family A \<and> X \<subseteq> (\<Union>i. A i)}. \<Sum>i. f (A i))"
    5.17 +     (INF A\<in>{A. range A \<subseteq> M \<and> disjoint_family A \<and> X \<subseteq> (\<Union>i. A i)}. \<Sum>i. f (A i))"
    5.18  
    5.19  lemma%unimportant (in ring_of_sets) outer_measure_agrees:
    5.20    assumes posf: "positive M f" and ca: "countably_additive M f" and s: "s \<in> M"
    5.21 @@ -321,7 +321,7 @@
    5.22  next
    5.23    have "(\<Sum>i. f (if i = 0 then s else {})) \<le> f s"
    5.24      using positiveD1[OF posf] by (subst suminf_finite[of "{0}"]) auto
    5.25 -  with s show "(INF A:{A. range A \<subseteq> M \<and> disjoint_family A \<and> s \<subseteq> UNION UNIV A}. \<Sum>i. f (A i)) \<le> f s"
    5.26 +  with s show "(INF A\<in>{A. range A \<subseteq> M \<and> disjoint_family A \<and> s \<subseteq> UNION UNIV A}. \<Sum>i. f (A i)) \<le> f s"
    5.27      by (intro INF_lower2[of "\<lambda>i. if i = 0 then s else {}"])
    5.28         (auto simp: disjoint_family_on_def)
    5.29  qed
     6.1 --- a/src/HOL/Analysis/Complete_Measure.thy	Wed Nov 07 23:03:45 2018 +0100
     6.2 +++ b/src/HOL/Analysis/Complete_Measure.thy	Thu Nov 08 09:11:52 2018 +0100
     6.3 @@ -452,7 +452,7 @@
     6.4  locale cld_measure = complete_measure M + locally_determined_measure M for M :: "'a measure"
     6.5  
     6.6  definition outer_measure_of :: "'a measure \<Rightarrow> 'a set \<Rightarrow> ennreal"
     6.7 -  where "outer_measure_of M A = (INF B : {B\<in>sets M. A \<subseteq> B}. emeasure M B)"
     6.8 +  where "outer_measure_of M A = (INF B \<in> {B\<in>sets M. A \<subseteq> B}. emeasure M B)"
     6.9  
    6.10  lemma outer_measure_of_eq[simp]: "A \<in> sets M \<Longrightarrow> outer_measure_of M A = emeasure M A"
    6.11    by (auto simp: outer_measure_of_def intro!: INF_eqI emeasure_mono)
     7.1 --- a/src/HOL/Analysis/Connected.thy	Wed Nov 07 23:03:45 2018 +0100
     7.2 +++ b/src/HOL/Analysis/Connected.thy	Thu Nov 08 09:11:52 2018 +0100
     7.3 @@ -1057,14 +1057,14 @@
     7.4    proof
     7.5      assume L: ?lhs
     7.6      then have "is_interval S" "compact S" by auto
     7.7 -    define a where "a \<equiv> \<Sum>i\<in>Basis. (INF x:S. x \<bullet> i) *\<^sub>R i"
     7.8 -    define b where "b \<equiv> \<Sum>i\<in>Basis. (SUP x:S. x \<bullet> i) *\<^sub>R i"
     7.9 -    have 1: "\<And>x i. \<lbrakk>x \<in> S; i \<in> Basis\<rbrakk> \<Longrightarrow> (INF x:S. x \<bullet> i) \<le> x \<bullet> i"
    7.10 +    define a where "a \<equiv> \<Sum>i\<in>Basis. (INF x\<in>S. x \<bullet> i) *\<^sub>R i"
    7.11 +    define b where "b \<equiv> \<Sum>i\<in>Basis. (SUP x\<in>S. x \<bullet> i) *\<^sub>R i"
    7.12 +    have 1: "\<And>x i. \<lbrakk>x \<in> S; i \<in> Basis\<rbrakk> \<Longrightarrow> (INF x\<in>S. x \<bullet> i) \<le> x \<bullet> i"
    7.13        by (simp add: cInf_lower bounded_inner_imp_bdd_below compact_imp_bounded L)
    7.14 -    have 2: "\<And>x i. \<lbrakk>x \<in> S; i \<in> Basis\<rbrakk> \<Longrightarrow> x \<bullet> i \<le> (SUP x:S. x \<bullet> i)"
    7.15 +    have 2: "\<And>x i. \<lbrakk>x \<in> S; i \<in> Basis\<rbrakk> \<Longrightarrow> x \<bullet> i \<le> (SUP x\<in>S. x \<bullet> i)"
    7.16        by (simp add: cSup_upper bounded_inner_imp_bdd_above compact_imp_bounded L)
    7.17 -    have 3: "x \<in> S" if inf: "\<And>i. i \<in> Basis \<Longrightarrow> (INF x:S. x \<bullet> i) \<le> x \<bullet> i"
    7.18 -                   and sup: "\<And>i. i \<in> Basis \<Longrightarrow> x \<bullet> i \<le> (SUP x:S. x \<bullet> i)" for x
    7.19 +    have 3: "x \<in> S" if inf: "\<And>i. i \<in> Basis \<Longrightarrow> (INF x\<in>S. x \<bullet> i) \<le> x \<bullet> i"
    7.20 +                   and sup: "\<And>i. i \<in> Basis \<Longrightarrow> x \<bullet> i \<le> (SUP x\<in>S. x \<bullet> i)" for x
    7.21      proof (rule mem_box_componentwiseI [OF \<open>is_interval S\<close>])
    7.22        fix i::'a
    7.23        assume i: "i \<in> Basis"
    7.24 @@ -1074,14 +1074,14 @@
    7.25          using continuous_attains_inf [OF \<open>compact S\<close> False cont] by blast
    7.26        obtain b where "b \<in> S" and b: "\<And>y. y\<in>S \<Longrightarrow> y \<bullet> i \<le> b \<bullet> i"
    7.27          using continuous_attains_sup [OF \<open>compact S\<close> False cont] by blast
    7.28 -      have "a \<bullet> i \<le> (INF x:S. x \<bullet> i)"
    7.29 +      have "a \<bullet> i \<le> (INF x\<in>S. x \<bullet> i)"
    7.30          by (simp add: False a cINF_greatest)
    7.31        also have "\<dots> \<le> x \<bullet> i"
    7.32          by (simp add: i inf)
    7.33        finally have ai: "a \<bullet> i \<le> x \<bullet> i" .
    7.34 -      have "x \<bullet> i \<le> (SUP x:S. x \<bullet> i)"
    7.35 +      have "x \<bullet> i \<le> (SUP x\<in>S. x \<bullet> i)"
    7.36          by (simp add: i sup)
    7.37 -      also have "(SUP x:S. x \<bullet> i) \<le> b \<bullet> i"
    7.38 +      also have "(SUP x\<in>S. x \<bullet> i) \<le> b \<bullet> i"
    7.39          by (simp add: False b cSUP_least)
    7.40        finally have bi: "x \<bullet> i \<le> b \<bullet> i" .
    7.41        show "x \<bullet> i \<in> (\<lambda>x. x \<bullet> i) ` S"
    7.42 @@ -1282,12 +1282,12 @@
    7.43  
    7.44  subsection \<open>Infimum Distance\<close>
    7.45  
    7.46 -definition%important "infdist x A = (if A = {} then 0 else INF a:A. dist x a)"
    7.47 +definition%important "infdist x A = (if A = {} then 0 else INF a\<in>A. dist x a)"
    7.48  
    7.49  lemma bdd_below_image_dist[intro, simp]: "bdd_below (dist x ` A)"
    7.50    by (auto intro!: zero_le_dist)
    7.51  
    7.52 -lemma infdist_notempty: "A \<noteq> {} \<Longrightarrow> infdist x A = (INF a:A. dist x a)"
    7.53 +lemma infdist_notempty: "A \<noteq> {} \<Longrightarrow> infdist x A = (INF a\<in>A. dist x a)"
    7.54    by (simp add: infdist_def)
    7.55  
    7.56  lemma infdist_nonneg: "0 \<le> infdist x A"
    7.57 @@ -2665,7 +2665,7 @@
    7.58  subsection \<open>The diameter of a set\<close>
    7.59  
    7.60  definition%important diameter :: "'a::metric_space set \<Rightarrow> real" where
    7.61 -  "diameter S = (if S = {} then 0 else SUP (x,y):S\<times>S. dist x y)"
    7.62 +  "diameter S = (if S = {} then 0 else SUP (x,y)\<in>S\<times>S. dist x y)"
    7.63  
    7.64  lemma diameter_empty [simp]: "diameter{} = 0"
    7.65    by (auto simp: diameter_def)
    7.66 @@ -2696,7 +2696,7 @@
    7.67        by (simp add: dist_commute)
    7.68    qed
    7.69    moreover have "(x,y) \<in> s\<times>s" using s by auto
    7.70 -  ultimately have "dist x y \<le> (SUP (x,y):s\<times>s. dist x y)"
    7.71 +  ultimately have "dist x y \<le> (SUP (x,y)\<in>s\<times>s. dist x y)"
    7.72      by (rule cSUP_upper2) simp
    7.73    with \<open>x \<in> s\<close> show ?thesis
    7.74      by (auto simp: diameter_def)
     8.1 --- a/src/HOL/Analysis/Convex_Euclidean_Space.thy	Wed Nov 07 23:03:45 2018 +0100
     8.2 +++ b/src/HOL/Analysis/Convex_Euclidean_Space.thy	Thu Nov 08 09:11:52 2018 +0100
     8.3 @@ -5474,7 +5474,7 @@
     8.4      apply (erule_tac x="x - y" in ballE)
     8.5      apply (auto simp: inner_diff)
     8.6      done
     8.7 -  define k where "k = (SUP x:T. a \<bullet> x)"
     8.8 +  define k where "k = (SUP x\<in>T. a \<bullet> x)"
     8.9    show ?thesis
    8.10      apply (rule_tac x="-a" in exI)
    8.11      apply (rule_tac x="-(k + b / 2)" in exI)
    8.12 @@ -5580,7 +5580,7 @@
    8.13      using \<open>T \<noteq> {}\<close> by (auto intro: bdd_aboveI2[OF *])
    8.14    show ?thesis
    8.15      using \<open>a\<noteq>0\<close>
    8.16 -    by (intro exI[of _ a] exI[of _ "SUP x:S. a \<bullet> x"])
    8.17 +    by (intro exI[of _ a] exI[of _ "SUP x\<in>S. a \<bullet> x"])
    8.18         (auto intro!: cSUP_upper bdd cSUP_least \<open>a \<noteq> 0\<close> \<open>S \<noteq> {}\<close> *)
    8.19  qed
    8.20  
     9.1 --- a/src/HOL/Analysis/Embed_Measure.thy	Wed Nov 07 23:03:45 2018 +0100
     9.2 +++ b/src/HOL/Analysis/Embed_Measure.thy	Thu Nov 08 09:11:52 2018 +0100
     9.3 @@ -381,24 +381,24 @@
     9.4    assumes nonempty: "Y \<noteq> {}"
     9.5    and chain: "Complete_Partial_Order.chain (\<le>) (f ` Y)"
     9.6    and countable: "countable B"
     9.7 -  shows "(\<integral>\<^sup>+ x. (SUP i:Y. f i x) \<partial>count_space B) = (SUP i:Y. (\<integral>\<^sup>+ x. f i x \<partial>count_space B))"
     9.8 +  shows "(\<integral>\<^sup>+ x. (SUP i\<in>Y. f i x) \<partial>count_space B) = (SUP i\<in>Y. (\<integral>\<^sup>+ x. f i x \<partial>count_space B))"
     9.9    (is "?lhs = ?rhs")
    9.10  proof -
    9.11    let ?f = "(\<lambda>i x. f i (from_nat_into B x) * indicator (to_nat_on B ` B) x)"
    9.12 -  have "?lhs = \<integral>\<^sup>+ x. (SUP i:Y. f i (from_nat_into B (to_nat_on B x))) \<partial>count_space B"
    9.13 +  have "?lhs = \<integral>\<^sup>+ x. (SUP i\<in>Y. f i (from_nat_into B (to_nat_on B x))) \<partial>count_space B"
    9.14      by(rule nn_integral_cong)(simp add: countable)
    9.15 -  also have "\<dots> = \<integral>\<^sup>+ x. (SUP i:Y. f i (from_nat_into B x)) \<partial>count_space (to_nat_on B ` B)"
    9.16 +  also have "\<dots> = \<integral>\<^sup>+ x. (SUP i\<in>Y. f i (from_nat_into B x)) \<partial>count_space (to_nat_on B ` B)"
    9.17      by(simp add: embed_measure_count_space'[symmetric] inj_on_to_nat_on countable nn_integral_embed_measure' measurable_embed_measure1)
    9.18 -  also have "\<dots> = \<integral>\<^sup>+ x. (SUP i:Y. ?f i x) \<partial>count_space UNIV"
    9.19 +  also have "\<dots> = \<integral>\<^sup>+ x. (SUP i\<in>Y. ?f i x) \<partial>count_space UNIV"
    9.20      by(simp add: nn_integral_count_space_indicator ennreal_indicator[symmetric] SUP_mult_right_ennreal nonempty)
    9.21 -  also have "\<dots> = (SUP i:Y. \<integral>\<^sup>+ x. ?f i x \<partial>count_space UNIV)"
    9.22 +  also have "\<dots> = (SUP i\<in>Y. \<integral>\<^sup>+ x. ?f i x \<partial>count_space UNIV)"
    9.23    proof(rule nn_integral_monotone_convergence_SUP_nat)
    9.24      show "Complete_Partial_Order.chain (\<le>) (?f ` Y)"
    9.25        by(rule chain_imageI[OF chain, unfolded image_image])(auto intro!: le_funI split: split_indicator dest: le_funD)
    9.26    qed fact
    9.27 -  also have "\<dots> = (SUP i:Y. \<integral>\<^sup>+ x. f i (from_nat_into B x) \<partial>count_space (to_nat_on B ` B))"
    9.28 +  also have "\<dots> = (SUP i\<in>Y. \<integral>\<^sup>+ x. f i (from_nat_into B x) \<partial>count_space (to_nat_on B ` B))"
    9.29      by(simp add: nn_integral_count_space_indicator)
    9.30 -  also have "\<dots> = (SUP i:Y. \<integral>\<^sup>+ x. f i (from_nat_into B (to_nat_on B x)) \<partial>count_space B)"
    9.31 +  also have "\<dots> = (SUP i\<in>Y. \<integral>\<^sup>+ x. f i (from_nat_into B (to_nat_on B x)) \<partial>count_space B)"
    9.32      by(simp add: embed_measure_count_space'[symmetric] inj_on_to_nat_on countable nn_integral_embed_measure' measurable_embed_measure1)
    9.33    also have "\<dots> = ?rhs"
    9.34      by(intro arg_cong2[where f="SUPREMUM"] ext nn_integral_cong_AE)(simp_all add: AE_count_space countable)
    10.1 --- a/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy	Wed Nov 07 23:03:45 2018 +0100
    10.2 +++ b/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy	Thu Nov 08 09:11:52 2018 +0100
    10.3 @@ -2150,7 +2150,7 @@
    10.4    have D_2: "bdd_above (?f`?D)"
    10.5      by (metis * mem_Collect_eq bdd_aboveI2)
    10.6    note D = D_1 D_2
    10.7 -  let ?S = "SUP x:?D. ?f x"
    10.8 +  let ?S = "SUP x\<in>?D. ?f x"
    10.9    have *: "\<exists>\<gamma>. gauge \<gamma> \<and>
   10.10               (\<forall>p. p tagged_division_of cbox a b \<and>
   10.11                    \<gamma> fine p \<longrightarrow>
   10.12 @@ -2533,7 +2533,7 @@
   10.13    have D_2: "bdd_above (?f`?D)"
   10.14      by (intro bdd_aboveI2[where M=B] assms(2)[rule_format]) simp
   10.15    note D = D_1 D_2
   10.16 -  let ?S = "SUP d:?D. ?f d"
   10.17 +  let ?S = "SUP d\<in>?D. ?f d"
   10.18    have "\<And>a b. f integrable_on cbox a b"
   10.19      using assms(1) integrable_on_subcbox by blast
   10.20    then have f_int: "\<And>a b. f absolutely_integrable_on cbox a b"
   10.21 @@ -3807,7 +3807,7 @@
   10.22      by (intro tendsto_lowerbound[OF lim])
   10.23         (auto simp: eventually_at_top_linorder)
   10.24  
   10.25 -  have "(SUP i::nat. ?f i x) = ?fR x" for x
   10.26 +  have "(SUP i. ?f i x) = ?fR x" for x
   10.27    proof (rule LIMSEQ_unique[OF LIMSEQ_SUP])
   10.28      obtain n where "x - a < real n"
   10.29        using reals_Archimedean2[of "x - a"] ..
   10.30 @@ -3816,16 +3816,16 @@
   10.31      then show "(\<lambda>n. ?f n x) \<longlonglongrightarrow> ?fR x"
   10.32        by (rule Lim_eventually)
   10.33    qed (auto simp: nonneg incseq_def le_fun_def split: split_indicator)
   10.34 -  then have "integral\<^sup>N lborel ?fR = (\<integral>\<^sup>+ x. (SUP i::nat. ?f i x) \<partial>lborel)"
   10.35 +  then have "integral\<^sup>N lborel ?fR = (\<integral>\<^sup>+ x. (SUP i. ?f i x) \<partial>lborel)"
   10.36      by simp
   10.37 -  also have "\<dots> = (SUP i::nat. (\<integral>\<^sup>+ x. ?f i x \<partial>lborel))"
   10.38 +  also have "\<dots> = (SUP i. (\<integral>\<^sup>+ x. ?f i x \<partial>lborel))"
   10.39    proof (rule nn_integral_monotone_convergence_SUP)
   10.40      show "incseq ?f"
   10.41        using nonneg by (auto simp: incseq_def le_fun_def split: split_indicator)
   10.42      show "\<And>i. (?f i) \<in> borel_measurable lborel"
   10.43        using f_borel by auto
   10.44    qed
   10.45 -  also have "\<dots> = (SUP i::nat. ennreal (F (a + real i) - F a))"
   10.46 +  also have "\<dots> = (SUP i. ennreal (F (a + real i) - F a))"
   10.47      by (subst nn_integral_FTC_Icc[OF f_borel f nonneg]) auto
   10.48    also have "\<dots> = T - F a"
   10.49    proof (rule LIMSEQ_unique[OF LIMSEQ_SUP])
    11.1 --- a/src/HOL/Analysis/Extended_Real_Limits.thy	Wed Nov 07 23:03:45 2018 +0100
    11.2 +++ b/src/HOL/Analysis/Extended_Real_Limits.thy	Thu Nov 08 09:11:52 2018 +0100
    11.3 @@ -298,7 +298,7 @@
    11.4  
    11.5  lemma%important Liminf_within:
    11.6    fixes f :: "'a::metric_space \<Rightarrow> 'b::complete_lattice"
    11.7 -  shows "Liminf (at x within S) f = (SUP e:{0<..}. INF y:(S \<inter> ball x e - {x}). f y)"
    11.8 +  shows "Liminf (at x within S) f = (SUP e\<in>{0<..}. INF y\<in>(S \<inter> ball x e - {x}). f y)"
    11.9    unfolding Liminf_def eventually_at
   11.10  proof%unimportant (rule SUP_eq, simp_all add: Ball_def Bex_def, safe)
   11.11    fix P d
   11.12 @@ -318,7 +318,7 @@
   11.13  
   11.14  lemma%important Limsup_within:
   11.15    fixes f :: "'a::metric_space \<Rightarrow> 'b::complete_lattice"
   11.16 -  shows "Limsup (at x within S) f = (INF e:{0<..}. SUP y:(S \<inter> ball x e - {x}). f y)"
   11.17 +  shows "Limsup (at x within S) f = (INF e\<in>{0<..}. SUP y\<in>(S \<inter> ball x e - {x}). f y)"
   11.18    unfolding Limsup_def eventually_at
   11.19  proof%unimportant (rule INF_eq, simp_all add: Ball_def Bex_def, safe)
   11.20    fix P d
   11.21 @@ -338,17 +338,17 @@
   11.22  
   11.23  lemma Liminf_at:
   11.24    fixes f :: "'a::metric_space \<Rightarrow> 'b::complete_lattice"
   11.25 -  shows "Liminf (at x) f = (SUP e:{0<..}. INF y:(ball x e - {x}). f y)"
   11.26 +  shows "Liminf (at x) f = (SUP e\<in>{0<..}. INF y\<in>(ball x e - {x}). f y)"
   11.27    using Liminf_within[of x UNIV f] by simp
   11.28  
   11.29  lemma Limsup_at:
   11.30    fixes f :: "'a::metric_space \<Rightarrow> 'b::complete_lattice"
   11.31 -  shows "Limsup (at x) f = (INF e:{0<..}. SUP y:(ball x e - {x}). f y)"
   11.32 +  shows "Limsup (at x) f = (INF e\<in>{0<..}. SUP y\<in>(ball x e - {x}). f y)"
   11.33    using Limsup_within[of x UNIV f] by simp
   11.34  
   11.35  lemma min_Liminf_at:
   11.36    fixes f :: "'a::metric_space \<Rightarrow> 'b::complete_linorder"
   11.37 -  shows "min (f x) (Liminf (at x) f) = (SUP e:{0<..}. INF y:ball x e. f y)"
   11.38 +  shows "min (f x) (Liminf (at x) f) = (SUP e\<in>{0<..}. INF y\<in>ball x e. f y)"
   11.39    unfolding inf_min[symmetric] Liminf_at
   11.40    apply (subst inf_commute)
   11.41    apply (subst SUP_inf)
   11.42 @@ -1231,16 +1231,16 @@
   11.43  lemma limsup_shift:
   11.44    "limsup (\<lambda>n. u (n+1)) = limsup u"
   11.45  proof -
   11.46 -  have "(SUP m:{n+1..}. u m) = (SUP m:{n..}. u (m + 1))" for n
   11.47 +  have "(SUP m\<in>{n+1..}. u m) = (SUP m\<in>{n..}. u (m + 1))" for n
   11.48      apply (rule SUP_eq) using Suc_le_D by auto
   11.49 -  then have a: "(INF n. SUP m:{n..}. u (m + 1)) = (INF n. (SUP m:{n+1..}. u m))" by auto
   11.50 -  have b: "(INF n. (SUP m:{n+1..}. u m)) = (INF n:{1..}. (SUP m:{n..}. u m))"
   11.51 +  then have a: "(INF n. SUP m\<in>{n..}. u (m + 1)) = (INF n. (SUP m\<in>{n+1..}. u m))" by auto
   11.52 +  have b: "(INF n. (SUP m\<in>{n+1..}. u m)) = (INF n\<in>{1..}. (SUP m\<in>{n..}. u m))"
   11.53      apply (rule INF_eq) using Suc_le_D by auto
   11.54 -  have "(INF n:{1..}. v n) = (INF n. v n)" if "decseq v" for v::"nat \<Rightarrow> 'a"
   11.55 +  have "(INF n\<in>{1..}. v n) = (INF n. v n)" if "decseq v" for v::"nat \<Rightarrow> 'a"
   11.56      apply (rule INF_eq) using \<open>decseq v\<close> decseq_Suc_iff by auto
   11.57 -  moreover have "decseq (\<lambda>n. (SUP m:{n..}. u m))" by (simp add: SUP_subset_mono decseq_def)
   11.58 -  ultimately have c: "(INF n:{1..}. (SUP m:{n..}. u m)) = (INF n. (SUP m:{n..}. u m))" by simp
   11.59 -  have "(INF n. SUPREMUM {n..} u) = (INF n. SUP m:{n..}. u (m + 1))" using a b c by simp
   11.60 +  moreover have "decseq (\<lambda>n. (SUP m\<in>{n..}. u m))" by (simp add: SUP_subset_mono decseq_def)
   11.61 +  ultimately have c: "(INF n\<in>{1..}. (SUP m\<in>{n..}. u m)) = (INF n. (SUP m\<in>{n..}. u m))" by simp
   11.62 +  have "(INF n. SUPREMUM {n..} u) = (INF n. SUP m\<in>{n..}. u (m + 1))" using a b c by simp
   11.63    then show ?thesis by (auto cong: limsup_INF_SUP)
   11.64  qed
   11.65  
   11.66 @@ -1255,16 +1255,16 @@
   11.67  lemma liminf_shift:
   11.68    "liminf (\<lambda>n. u (n+1)) = liminf u"
   11.69  proof -
   11.70 -  have "(INF m:{n+1..}. u m) = (INF m:{n..}. u (m + 1))" for n
   11.71 +  have "(INF m\<in>{n+1..}. u m) = (INF m\<in>{n..}. u (m + 1))" for n
   11.72      apply (rule INF_eq) using Suc_le_D by (auto)
   11.73 -  then have a: "(SUP n. INF m:{n..}. u (m + 1)) = (SUP n. (INF m:{n+1..}. u m))" by auto
   11.74 -  have b: "(SUP n. (INF m:{n+1..}. u m)) = (SUP n:{1..}. (INF m:{n..}. u m))"
   11.75 +  then have a: "(SUP n. INF m\<in>{n..}. u (m + 1)) = (SUP n. (INF m\<in>{n+1..}. u m))" by auto
   11.76 +  have b: "(SUP n. (INF m\<in>{n+1..}. u m)) = (SUP n\<in>{1..}. (INF m\<in>{n..}. u m))"
   11.77      apply (rule SUP_eq) using Suc_le_D by (auto)
   11.78 -  have "(SUP n:{1..}. v n) = (SUP n. v n)" if "incseq v" for v::"nat \<Rightarrow> 'a"
   11.79 +  have "(SUP n\<in>{1..}. v n) = (SUP n. v n)" if "incseq v" for v::"nat \<Rightarrow> 'a"
   11.80      apply (rule SUP_eq) using \<open>incseq v\<close> incseq_Suc_iff by auto
   11.81 -  moreover have "incseq (\<lambda>n. (INF m:{n..}. u m))" by (simp add: INF_superset_mono mono_def)
   11.82 -  ultimately have c: "(SUP n:{1..}. (INF m:{n..}. u m)) = (SUP n. (INF m:{n..}. u m))" by simp
   11.83 -  have "(SUP n. INFIMUM {n..} u) = (SUP n. INF m:{n..}. u (m + 1))" using a b c by simp
   11.84 +  moreover have "incseq (\<lambda>n. (INF m\<in>{n..}. u m))" by (simp add: INF_superset_mono mono_def)
   11.85 +  ultimately have c: "(SUP n\<in>{1..}. (INF m\<in>{n..}. u m)) = (SUP n. (INF m\<in>{n..}. u m))" by simp
   11.86 +  have "(SUP n. INFIMUM {n..} u) = (SUP n. INF m\<in>{n..}. u (m + 1))" using a b c by simp
   11.87    then show ?thesis by (auto cong: liminf_SUP_INF)
   11.88  qed
   11.89  
   11.90 @@ -1281,7 +1281,7 @@
   11.91    assumes "Limsup F u > c"
   11.92    shows "\<exists>i. u i > c"
   11.93  proof%unimportant -
   11.94 -  have "(INF P:{P. eventually P F}. SUP x:{x. P x}. u x) > c" using assms by (simp add: Limsup_def)
   11.95 +  have "(INF P\<in>{P. eventually P F}. SUP x\<in>{x. P x}. u x) > c" using assms by (simp add: Limsup_def)
   11.96    then show ?thesis by (metis eventually_True mem_Collect_eq less_INF_D less_SUP_iff)
   11.97  qed
   11.98  
   11.99 @@ -1297,7 +1297,7 @@
  11.100      by (intro dependent_nat_choice) (auto simp: conj_commute)
  11.101    then obtain r :: "nat \<Rightarrow> nat" where "strict_mono r" and mono: "\<And>n m. r n \<le> m \<Longrightarrow> u m \<le> u (r n)"
  11.102      by (auto simp: strict_mono_Suc_iff)
  11.103 -  define umax where "umax = (\<lambda>n. (SUP m:{n..}. u m))"
  11.104 +  define umax where "umax = (\<lambda>n. (SUP m\<in>{n..}. u m))"
  11.105    have "decseq umax" unfolding umax_def by (simp add: SUP_subset_mono antimono_def)
  11.106    then have "umax \<longlonglongrightarrow> limsup u" unfolding umax_def by (metis LIMSEQ_INF limsup_INF_SUP)
  11.107    then have *: "(umax o r) \<longlonglongrightarrow> limsup u" by (simp add: LIMSEQ_subseq_LIMSEQ \<open>strict_mono r\<close>)
  11.108 @@ -1373,7 +1373,7 @@
  11.109      then have "u i \<le> u (r(Suc n))" using r by simp
  11.110      then have "u i \<le> (SUP n. (u o r) n)" unfolding o_def by (meson SUP_upper2 UNIV_I)
  11.111    }
  11.112 -  then have "(SUP i:{N<..}. u i) \<le> (SUP n. (u o r) n)" using SUP_least by blast
  11.113 +  then have "(SUP i\<in>{N<..}. u i) \<le> (SUP n. (u o r) n)" using SUP_least by blast
  11.114    then have "limsup u \<le> (SUP n. (u o r) n)" unfolding Limsup_def
  11.115      by (metis (mono_tags, lifting) INF_lower2 atLeast_Suc_greaterThan atLeast_def eventually_ge_at_top mem_Collect_eq)
  11.116    then have "limsup u = (SUP n. (u o r) n)" using \<open>(SUP n. (u o r) n) \<le> limsup u\<close> by simp
  11.117 @@ -1390,7 +1390,7 @@
  11.118      by (intro dependent_nat_choice) (auto simp: conj_commute)
  11.119    then obtain r :: "nat \<Rightarrow> nat" where "strict_mono r" and mono: "\<And>n m. r n \<le> m \<Longrightarrow> u m \<ge> u (r n)"
  11.120      by (auto simp: strict_mono_Suc_iff)
  11.121 -  define umin where "umin = (\<lambda>n. (INF m:{n..}. u m))"
  11.122 +  define umin where "umin = (\<lambda>n. (INF m\<in>{n..}. u m))"
  11.123    have "incseq umin" unfolding umin_def by (simp add: INF_superset_mono incseq_def)
  11.124    then have "umin \<longlonglongrightarrow> liminf u" unfolding umin_def by (metis LIMSEQ_SUP liminf_SUP_INF)
  11.125    then have *: "(umin o r) \<longlonglongrightarrow> liminf u" by (simp add: LIMSEQ_subseq_LIMSEQ \<open>strict_mono r\<close>)
  11.126 @@ -1467,7 +1467,7 @@
  11.127      then have "u i \<ge> u (r(Suc n))" using r by simp
  11.128      then have "u i \<ge> (INF n. (u o r) n)" unfolding o_def by (meson INF_lower2 UNIV_I)
  11.129    }
  11.130 -  then have "(INF i:{N<..}. u i) \<ge> (INF n. (u o r) n)" using INF_greatest by blast
  11.131 +  then have "(INF i\<in>{N<..}. u i) \<ge> (INF n. (u o r) n)" using INF_greatest by blast
  11.132    then have "liminf u \<ge> (INF n. (u o r) n)" unfolding Liminf_def
  11.133      by (metis (mono_tags, lifting) SUP_upper2 atLeast_Suc_greaterThan atLeast_def eventually_ge_at_top mem_Collect_eq)
  11.134    then have "liminf u = (INF n. (u o r) n)" using \<open>(INF n. (u o r) n) \<ge> liminf u\<close> by simp
  11.135 @@ -1757,7 +1757,7 @@
  11.136      using * by (intro SUP_upper2[of x]) auto
  11.137    moreover have "0 \<le> (SUPREMUM {x..} u)" for x
  11.138      using * by (intro SUP_upper2[of x]) auto
  11.139 -  ultimately show "(SUP n. INF n:{n..}. max 0 (u n - v n))
  11.140 +  ultimately show "(SUP n. INF n\<in>{n..}. max 0 (u n - v n))
  11.141              \<le> max 0 ((INF x. max 0 (SUPREMUM {x..} u)) - (INF x. max 0 (SUPREMUM {x..} v)))"
  11.142      by (auto simp: * ereal_diff_positive max.absorb2 liminf_SUP_INF[symmetric] limsup_INF_SUP[symmetric] ereal_liminf_limsup_minus)
  11.143  qed
    12.1 --- a/src/HOL/Analysis/Finite_Cartesian_Product.thy	Wed Nov 07 23:03:45 2018 +0100
    12.2 +++ b/src/HOL/Analysis/Finite_Cartesian_Product.thy	Thu Nov 08 09:11:52 2018 +0100
    12.3 @@ -459,7 +459,7 @@
    12.4  
    12.5  definition%important [code del]:
    12.6    "(uniformity :: (('a^'b::_) \<times> ('a^'b::_)) filter) =
    12.7 -    (INF e:{0 <..}. principal {(x, y). dist x y < e})"
    12.8 +    (INF e\<in>{0 <..}. principal {(x, y). dist x y < e})"
    12.9  
   12.10  instance%unimportant
   12.11    by standard (rule uniformity_vec_def)
    13.1 --- a/src/HOL/Analysis/Finite_Product_Measure.thy	Wed Nov 07 23:03:45 2018 +0100
    13.2 +++ b/src/HOL/Analysis/Finite_Product_Measure.thy	Thu Nov 08 09:11:52 2018 +0100
    13.3 @@ -389,7 +389,7 @@
    13.4  qed
    13.5  
    13.6  lemma%unimportant sets_PiM_eq_proj:
    13.7 -  "I \<noteq> {} \<Longrightarrow> sets (PiM I M) = sets (SUP i:I. vimage_algebra (\<Pi>\<^sub>E i\<in>I. space (M i)) (\<lambda>x. x i) (M i))"
    13.8 +  "I \<noteq> {} \<Longrightarrow> sets (PiM I M) = sets (SUP i\<in>I. vimage_algebra (\<Pi>\<^sub>E i\<in>I. space (M i)) (\<lambda>x. x i) (M i))"
    13.9    apply (simp add: sets_PiM_single)
   13.10    apply (subst sets_Sup_eq[where X="\<Pi>\<^sub>E i\<in>I. space (M i)"])
   13.11    apply auto []
   13.12 @@ -422,9 +422,9 @@
   13.13    let ?F = "\<lambda>i. {(\<lambda>x. x i) -` A \<inter> Pi\<^sub>E I \<Omega> |A. A \<in> E i}"
   13.14    assume "I \<noteq> {}"
   13.15    then have "sets (Pi\<^sub>M I (\<lambda>i. sigma (\<Omega> i) (E i))) =
   13.16 -      sets (SUP i:I. vimage_algebra (\<Pi>\<^sub>E i\<in>I. \<Omega> i) (\<lambda>x. x i) (sigma (\<Omega> i) (E i)))"
   13.17 +      sets (SUP i\<in>I. vimage_algebra (\<Pi>\<^sub>E i\<in>I. \<Omega> i) (\<lambda>x. x i) (sigma (\<Omega> i) (E i)))"
   13.18      by (subst sets_PiM_eq_proj) (auto simp: space_measure_of_conv)
   13.19 -  also have "\<dots> = sets (SUP i:I. sigma (Pi\<^sub>E I \<Omega>) (?F i))"
   13.20 +  also have "\<dots> = sets (SUP i\<in>I. sigma (Pi\<^sub>E I \<Omega>) (?F i))"
   13.21      using E by (intro sets_SUP_cong arg_cong[where f=sets] vimage_algebra_sigma) auto
   13.22    also have "\<dots> = sets (sigma (Pi\<^sub>E I \<Omega>) (\<Union>i\<in>I. ?F i))"
   13.23      using \<open>I \<noteq> {}\<close> by (intro arg_cong[where f=sets] SUP_sigma_sigma) auto
    14.1 --- a/src/HOL/Analysis/Function_Topology.thy	Wed Nov 07 23:03:45 2018 +0100
    14.2 +++ b/src/HOL/Analysis/Function_Topology.thy	Thu Nov 08 09:11:52 2018 +0100
    14.3 @@ -1220,7 +1220,7 @@
    14.4    "dist x y = (\<Sum>n. (1/2)^n * min (dist (x (from_nat n)) (y (from_nat n))) 1)"
    14.5  
    14.6  definition%important uniformity_fun_def:
    14.7 -  "(uniformity::(('a \<Rightarrow> 'b) \<times> ('a \<Rightarrow> 'b)) filter) = (INF e:{0<..}. principal {(x, y). dist (x::('a\<Rightarrow>'b)) y < e})"
    14.8 +  "(uniformity::(('a \<Rightarrow> 'b) \<times> ('a \<Rightarrow> 'b)) filter) = (INF e\<in>{0<..}. principal {(x, y). dist (x::('a\<Rightarrow>'b)) y < e})"
    14.9  
   14.10  text \<open>Except for the first one, the auxiliary lemmas below are only useful when proving the
   14.11  instance: once it is proved, they become trivial consequences of the general theory of metric
    15.1 --- a/src/HOL/Analysis/Gamma_Function.thy	Wed Nov 07 23:03:45 2018 +0100
    15.2 +++ b/src/HOL/Analysis/Gamma_Function.thy	Thu Nov 08 09:11:52 2018 +0100
    15.3 @@ -372,7 +372,7 @@
    15.4    shows "uniformly_convergent_on (ball z d) (\<lambda>n z. ln_Gamma_series z n :: complex)"
    15.5  proof (intro Cauchy_uniformly_convergent uniformly_Cauchy_onI')
    15.6    fix e :: real assume e: "e > 0"
    15.7 -  define e'' where "e'' = (SUP t:ball z d. norm t + norm t^2)"
    15.8 +  define e'' where "e'' = (SUP t\<in>ball z d. norm t + norm t^2)"
    15.9    define e' where "e' = e / (2*e'')"
   15.10    have "bounded ((\<lambda>t. norm t + norm t^2) ` cball z d)"
   15.11      by (intro compact_imp_bounded compact_continuous_image) (auto intro!: continuous_intros)
   15.12 @@ -2270,7 +2270,7 @@
   15.13      qed
   15.14      ultimately have compact: "compact B" by (subst compact_eq_bounded_closed) blast
   15.15  
   15.16 -    define M where "M = (SUP z:B. norm (h' z))"
   15.17 +    define M where "M = (SUP z\<in>B. norm (h' z))"
   15.18      have "compact (h' ` B)"
   15.19        by (intro compact_continuous_image continuous_on_subset[OF h'_cont] compact) blast+
   15.20      hence bdd: "bdd_above ((\<lambda>z. norm (h' z)) ` B)"
    16.1 --- a/src/HOL/Analysis/Improper_Integral.thy	Wed Nov 07 23:03:45 2018 +0100
    16.2 +++ b/src/HOL/Analysis/Improper_Integral.thy	Thu Nov 08 09:11:52 2018 +0100
    16.3 @@ -674,9 +674,9 @@
    16.4      qed
    16.5    qed
    16.6    define \<gamma> where "\<gamma> \<equiv> \<lambda>x. \<gamma>0 x \<inter>
    16.7 -                          ball x ((\<epsilon>/8 / (norm(f x) + 1)) * (INF m:Basis. b \<bullet> m - a \<bullet> m) / content(cbox a b))"
    16.8 +                          ball x ((\<epsilon>/8 / (norm(f x) + 1)) * (INF m\<in>Basis. b \<bullet> m - a \<bullet> m) / content(cbox a b))"
    16.9    have "gauge (\<lambda>x. ball x
   16.10 -                    (\<epsilon> * (INF m:Basis. b \<bullet> m - a \<bullet> m) / ((8 * norm (f x) + 8) * content (cbox a b))))"
   16.11 +                    (\<epsilon> * (INF m\<in>Basis. b \<bullet> m - a \<bullet> m) / ((8 * norm (f x) + 8) * content (cbox a b))))"
   16.12      using \<open>0 < content (cbox a b)\<close> \<open>0 < \<epsilon>\<close> a_less_b
   16.13      apply (auto simp: gauge_def divide_simps mult_less_0_iff zero_less_mult_iff add_nonneg_eq_0_iff finite_less_Inf_iff)
   16.14      apply (meson add_nonneg_nonneg mult_nonneg_nonneg norm_ge_zero not_less zero_le_numeral)
   16.15 @@ -693,7 +693,7 @@
   16.16      have "finite S"
   16.17        using S by blast
   16.18      have "\<gamma>0 fine S" and fineS:
   16.19 -         "(\<lambda>x. ball x (\<epsilon> * (INF m:Basis. b \<bullet> m - a \<bullet> m) / ((8 * norm (f x) + 8) * content (cbox a b)))) fine S"
   16.20 +         "(\<lambda>x. ball x (\<epsilon> * (INF m\<in>Basis. b \<bullet> m - a \<bullet> m) / ((8 * norm (f x) + 8) * content (cbox a b)))) fine S"
   16.21        using \<open>\<gamma> fine S\<close> by (auto simp: \<gamma>_def fine_Int)
   16.22      then have "(\<Sum>(x,K) \<in> S. norm (content K *\<^sub>R h x - integral K h)) < \<epsilon>/2"
   16.23        by (intro \<gamma>0 that fineS)
   16.24 @@ -735,11 +735,11 @@
   16.25              using that by auto
   16.26            ultimately have "norm (h x) \<le> (\<epsilon> * (b \<bullet> i - a \<bullet> i)) / (4 * content (cbox a b) * ?\<Delta>)"
   16.27            proof -
   16.28 -            have "dist x u < \<epsilon> * (INF m:Basis. b \<bullet> m - a \<bullet> m) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2"
   16.29 -                 "dist x v < \<epsilon> * (INF m:Basis. b \<bullet> m - a \<bullet> m) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2"
   16.30 +            have "dist x u < \<epsilon> * (INF m\<in>Basis. b \<bullet> m - a \<bullet> m) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2"
   16.31 +                 "dist x v < \<epsilon> * (INF m\<in>Basis. b \<bullet> m - a \<bullet> m) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2"
   16.32                using fineS u_less_v uv xK
   16.33                by (force simp: fine_def mem_box field_simps dest!: bspec)+
   16.34 -            moreover have "\<epsilon> * (INF m:Basis. b \<bullet> m - a \<bullet> m) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2
   16.35 +            moreover have "\<epsilon> * (INF m\<in>Basis. b \<bullet> m - a \<bullet> m) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2
   16.36                    \<le> \<epsilon> * (b \<bullet> i - a \<bullet> i) / (4 * (norm (f x) + 1) * content (cbox a b)) / 2"
   16.37                apply (intro mult_left_mono divide_right_mono)
   16.38                using \<open>i \<in> Basis\<close> \<open>0 < \<epsilon>\<close> apply (auto simp: intro!: cInf_le_finite)
    17.1 --- a/src/HOL/Analysis/Lebesgue_Measure.thy	Wed Nov 07 23:03:45 2018 +0100
    17.2 +++ b/src/HOL/Analysis/Lebesgue_Measure.thy	Thu Nov 08 09:11:52 2018 +0100
    17.3 @@ -1189,7 +1189,7 @@
    17.4        using emeasure_bounded_finite[of "?B n"] by (auto simp: emeasure_A)
    17.5      interpret A: finite_measure ?A
    17.6        by rule fact
    17.7 -    have "emeasure ?A B + ?e n > (INF U:{U. B \<subseteq> U \<and> open U}. emeasure ?A U)"
    17.8 +    have "emeasure ?A B + ?e n > (INF U\<in>{U. B \<subseteq> U \<and> open U}. emeasure ?A U)"
    17.9        using \<open>0<e\<close> by (auto simp: outer_regular[OF _ finite_A B, symmetric])
   17.10      then obtain U where U: "B \<subseteq> U" "open U" and muU: "?\<mu> (?B n \<inter> B) + ?e n > ?\<mu> (?B n \<inter> U)"
   17.11        unfolding INF_less_iff by (auto simp: emeasure_A)
    18.1 --- a/src/HOL/Analysis/Measurable.thy	Wed Nov 07 23:03:45 2018 +0100
    18.2 +++ b/src/HOL/Analysis/Measurable.thy	Thu Nov 08 09:11:52 2018 +0100
    18.3 @@ -392,32 +392,32 @@
    18.4    fixes F :: "'i \<Rightarrow> 'a \<Rightarrow> 'b::{complete_lattice, countable}"
    18.5    assumes [simp]: "countable I"
    18.6    assumes [measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> measurable M (count_space UNIV)"
    18.7 -  shows "(\<lambda>x. SUP i:I. F i x) \<in> measurable M (count_space UNIV)"
    18.8 +  shows "(\<lambda>x. SUP i\<in>I. F i x) \<in> measurable M (count_space UNIV)"
    18.9    unfolding measurable_count_space_eq2_countable
   18.10  proof (safe intro!: UNIV_I)
   18.11    fix a
   18.12 -  have "(\<lambda>x. SUP i:I. F i x) -` {a} \<inter> space M =
   18.13 +  have "(\<lambda>x. SUP i\<in>I. F i x) -` {a} \<inter> space M =
   18.14      {x\<in>space M. (\<forall>i\<in>I. F i x \<le> a) \<and> (\<forall>b. (\<forall>i\<in>I. F i x \<le> b) \<longrightarrow> a \<le> b)}"
   18.15      unfolding SUP_le_iff[symmetric] by auto
   18.16    also have "\<dots> \<in> sets M"
   18.17      by measurable
   18.18 -  finally show "(\<lambda>x. SUP i:I. F i x) -` {a} \<inter> space M \<in> sets M" .
   18.19 +  finally show "(\<lambda>x. SUP i\<in>I. F i x) -` {a} \<inter> space M \<in> sets M" .
   18.20  qed
   18.21  
   18.22  lemma measurable_INF[measurable]:
   18.23    fixes F :: "'i \<Rightarrow> 'a \<Rightarrow> 'b::{complete_lattice, countable}"
   18.24    assumes [simp]: "countable I"
   18.25    assumes [measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> measurable M (count_space UNIV)"
   18.26 -  shows "(\<lambda>x. INF i:I. F i x) \<in> measurable M (count_space UNIV)"
   18.27 +  shows "(\<lambda>x. INF i\<in>I. F i x) \<in> measurable M (count_space UNIV)"
   18.28    unfolding measurable_count_space_eq2_countable
   18.29  proof (safe intro!: UNIV_I)
   18.30    fix a
   18.31 -  have "(\<lambda>x. INF i:I. F i x) -` {a} \<inter> space M =
   18.32 +  have "(\<lambda>x. INF i\<in>I. F i x) -` {a} \<inter> space M =
   18.33      {x\<in>space M. (\<forall>i\<in>I. a \<le> F i x) \<and> (\<forall>b. (\<forall>i\<in>I. b \<le> F i x) \<longrightarrow> b \<le> a)}"
   18.34      unfolding le_INF_iff[symmetric] by auto
   18.35    also have "\<dots> \<in> sets M"
   18.36      by measurable
   18.37 -  finally show "(\<lambda>x. INF i:I. F i x) -` {a} \<inter> space M \<in> sets M" .
   18.38 +  finally show "(\<lambda>x. INF i\<in>I. F i x) -` {a} \<inter> space M \<in> sets M" .
   18.39  qed
   18.40  
   18.41  lemma measurable_lfp_coinduct[consumes 1, case_names continuity step]:
    19.1 --- a/src/HOL/Analysis/Measure_Space.thy	Wed Nov 07 23:03:45 2018 +0100
    19.2 +++ b/src/HOL/Analysis/Measure_Space.thy	Thu Nov 08 09:11:52 2018 +0100
    19.3 @@ -582,12 +582,12 @@
    19.4    assumes I: "I \<noteq> {}" and F: "\<And>i j. i \<in> I \<Longrightarrow> j \<in> I \<Longrightarrow> i \<le> j \<Longrightarrow> F j \<subseteq> F i"
    19.5    assumes F_sets[measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M"
    19.6      and fin: "\<And>i. i \<in> I \<Longrightarrow> emeasure M (F i) \<noteq> \<infinity>"
    19.7 -  shows "emeasure M (\<Inter>i\<in>I. F i) = (INF i:I. emeasure M (F i))"
    19.8 +  shows "emeasure M (\<Inter>i\<in>I. F i) = (INF i\<in>I. emeasure M (F i))"
    19.9  proof cases
   19.10    assume "finite I"
   19.11    have "(\<Inter>i\<in>I. F i) = F (Max I)"
   19.12      using I \<open>finite I\<close> by (intro antisym INF_lower INF_greatest F) auto
   19.13 -  moreover have "(INF i:I. emeasure M (F i)) = emeasure M (F (Max I))"
   19.14 +  moreover have "(INF i\<in>I. emeasure M (F i)) = emeasure M (F (Max I))"
   19.15      using I \<open>finite I\<close> by (intro antisym INF_lower INF_greatest F emeasure_mono) auto
   19.16    ultimately show ?thesis
   19.17      by simp
   19.18 @@ -611,7 +611,7 @@
   19.19      show "decseq (\<lambda>i. F (L i))"
   19.20        using L by (intro antimonoI F L_mono) auto
   19.21    qed (insert L fin, auto)
   19.22 -  also have "\<dots> = (INF i:I. emeasure M (F i))"
   19.23 +  also have "\<dots> = (INF i\<in>I. emeasure M (F i))"
   19.24    proof (intro antisym INF_greatest)
   19.25      show "i \<in> I \<Longrightarrow> (INF i. emeasure M (F (L i))) \<le> emeasure M (F i)" for i
   19.26        by (intro INF_lower2[of i]) auto
   19.27 @@ -990,7 +990,7 @@
   19.28  subsection \<open>The almost everywhere filter (i.e.\ quantifier)\<close>
   19.29  
   19.30  definition%important ae_filter :: "'a measure \<Rightarrow> 'a filter" where
   19.31 -  "ae_filter M = (INF N:null_sets M. principal (space M - N))"
   19.32 +  "ae_filter M = (INF N\<in>null_sets M. principal (space M - N))"
   19.33  
   19.34  abbreviation almost_everywhere :: "'a measure \<Rightarrow> ('a \<Rightarrow> bool) \<Rightarrow> bool" where
   19.35    "almost_everywhere M P \<equiv> eventually P (ae_filter M)"
   19.36 @@ -2702,7 +2702,7 @@
   19.37      by (intro bdd_aboveI[where M="measure M (space M)"])
   19.38         (auto simp: d_def field_simps subset_eq intro!: add_increasing M.finite_measure_mono)
   19.39  
   19.40 -  define \<gamma> where "\<gamma> = (SUP X:sets M. d X)"
   19.41 +  define \<gamma> where "\<gamma> = (SUP X\<in>sets M. d X)"
   19.42    have le_\<gamma>[intro]: "X \<in> sets M \<Longrightarrow> d X \<le> \<gamma>" for X
   19.43      by (auto simp: \<gamma>_def intro!: cSUP_upper)
   19.44  
   19.45 @@ -2876,7 +2876,7 @@
   19.46  
   19.47  definition%important sup_measure' :: "'a measure \<Rightarrow> 'a measure \<Rightarrow> 'a measure"
   19.48  where
   19.49 -  "sup_measure' A B = measure_of (space A) (sets A) (\<lambda>X. SUP Y:sets A. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y))"
   19.50 +  "sup_measure' A B = measure_of (space A) (sets A) (\<lambda>X. SUP Y\<in>sets A. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y))"
   19.51  
   19.52  lemma assumes [simp]: "sets B = sets A"
   19.53    shows space_sup_measure'[simp]: "space (sup_measure' A B) = space A"
   19.54 @@ -2885,7 +2885,7 @@
   19.55  
   19.56  lemma emeasure_sup_measure':
   19.57    assumes sets_eq[simp]: "sets B = sets A" and [simp, intro]: "X \<in> sets A"
   19.58 -  shows "emeasure (sup_measure' A B) X = (SUP Y:sets A. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y))"
   19.59 +  shows "emeasure (sup_measure' A B) X = (SUP Y\<in>sets A. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y))"
   19.60      (is "_ = ?S X")
   19.61  proof -
   19.62    note sets_eq_imp_space_eq[OF sets_eq, simp]
   19.63 @@ -2893,12 +2893,12 @@
   19.64      using sup_measure'_def
   19.65    proof (rule emeasure_measure_of)
   19.66      let ?d = "\<lambda>X Y. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y)"
   19.67 -    show "countably_additive (sets (sup_measure' A B)) (\<lambda>X. SUP Y : sets A. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y))"
   19.68 +    show "countably_additive (sets (sup_measure' A B)) (\<lambda>X. SUP Y \<in> sets A. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y))"
   19.69      proof (rule countably_additiveI, goal_cases)
   19.70        case (1 X)
   19.71        then have [measurable]: "\<And>i. X i \<in> sets A" and "disjoint_family X"
   19.72          by auto
   19.73 -      have "(\<Sum>i. ?S (X i)) = (SUP Y:sets A. \<Sum>i. ?d (X i) Y)"
   19.74 +      have "(\<Sum>i. ?S (X i)) = (SUP Y\<in>sets A. \<Sum>i. ?d (X i) Y)"
   19.75        proof (rule ennreal_suminf_SUP_eq_directed)
   19.76          fix J :: "nat set" and a b assume "finite J" and [measurable]: "a \<in> sets A" "b \<in> sets A"
   19.77          have "\<exists>c\<in>sets A. c \<subseteq> X i \<and> (\<forall>a\<in>sets A. ?d (X i) a \<le> ?d (X i) c)" for i
   19.78 @@ -2988,7 +2988,7 @@
   19.79    assumes B: "\<And>Y. Y \<subseteq> X \<Longrightarrow> Y \<in> sets A \<Longrightarrow> emeasure B Y \<le> emeasure C Y"
   19.80    shows "emeasure (sup_measure' A B) X \<le> emeasure C X"
   19.81  proof (subst emeasure_sup_measure')
   19.82 -  show "(SUP Y:sets A. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y)) \<le> emeasure C X"
   19.83 +  show "(SUP Y\<in>sets A. emeasure A (X \<inter> Y) + emeasure B (X \<inter> - Y)) \<le> emeasure C X"
   19.84      unfolding \<open>sets A = sets C\<close>
   19.85    proof (intro SUP_least)
   19.86      fix Y assume [measurable]: "Y \<in> sets C"
   19.87 @@ -3137,10 +3137,10 @@
   19.88  
   19.89  definition Sup_lexord :: "('a \<Rightarrow> 'b::complete_lattice) \<Rightarrow> ('a set \<Rightarrow> 'a) \<Rightarrow> ('a set \<Rightarrow> 'a) \<Rightarrow> 'a set \<Rightarrow> 'a"
   19.90  where
   19.91 -  "Sup_lexord k c s A = (let U = (SUP a:A. k a) in if \<exists>a\<in>A. k a = U then c {a\<in>A. k a = U} else s A)"
   19.92 +  "Sup_lexord k c s A = (let U = (SUP a\<in>A. k a) in if \<exists>a\<in>A. k a = U then c {a\<in>A. k a = U} else s A)"
   19.93  
   19.94  lemma Sup_lexord:
   19.95 -  "(\<And>a S. a \<in> A \<Longrightarrow> k a = (SUP a:A. k a) \<Longrightarrow> S = {a'\<in>A. k a' = k a} \<Longrightarrow> P (c S)) \<Longrightarrow> ((\<And>a. a \<in> A \<Longrightarrow> k a \<noteq> (SUP a:A. k a)) \<Longrightarrow> P (s A)) \<Longrightarrow>
   19.96 +  "(\<And>a S. a \<in> A \<Longrightarrow> k a = (SUP a\<in>A. k a) \<Longrightarrow> S = {a'\<in>A. k a' = k a} \<Longrightarrow> P (c S)) \<Longrightarrow> ((\<And>a. a \<in> A \<Longrightarrow> k a \<noteq> (SUP a\<in>A. k a)) \<Longrightarrow> P (s A)) \<Longrightarrow>
   19.97      P (Sup_lexord k c s A)"
   19.98    by (auto simp: Sup_lexord_def Let_def)
   19.99  
  19.100 @@ -3197,7 +3197,7 @@
  19.101  definition%important Sup_measure' :: "'a measure set \<Rightarrow> 'a measure"
  19.102  where
  19.103    "Sup_measure' M = measure_of (\<Union>a\<in>M. space a) (\<Union>a\<in>M. sets a)
  19.104 -    (\<lambda>X. (SUP P:{P. finite P \<and> P \<subseteq> M }. sup_measure.F id P X))"
  19.105 +    (\<lambda>X. (SUP P\<in>{P. finite P \<and> P \<subseteq> M }. sup_measure.F id P X))"
  19.106  
  19.107  lemma space_Sup_measure'2: "space (Sup_measure' M) = (\<Union>m\<in>M. space m)"
  19.108    unfolding Sup_measure'_def by (intro space_measure_of[OF UN_space_closed])
  19.109 @@ -3218,7 +3218,7 @@
  19.110  
  19.111  lemma emeasure_Sup_measure':
  19.112    assumes sets_eq[simp]: "\<And>m. m \<in> M \<Longrightarrow> sets m = sets A" and "X \<in> sets A" "M \<noteq> {}"
  19.113 -  shows "emeasure (Sup_measure' M) X = (SUP P:{P. finite P \<and> P \<subseteq> M}. sup_measure.F id P X)"
  19.114 +  shows "emeasure (Sup_measure' M) X = (SUP P\<in>{P. finite P \<and> P \<subseteq> M}. sup_measure.F id P X)"
  19.115      (is "_ = ?S X")
  19.116    using Sup_measure'_def
  19.117  proof (rule emeasure_measure_of)
  19.118 @@ -3245,7 +3245,7 @@
  19.119        with ij show "\<exists>k\<in>{P. finite P \<and> P \<subseteq> M}. \<forall>n\<in>N. ?\<mu> i (F n) \<le> ?\<mu> k (F n) \<and> ?\<mu> j (F n) \<le> ?\<mu> k (F n)"
  19.120          by (safe intro!: bexI[of _ "i \<union> j"]) auto
  19.121      next
  19.122 -      show "(SUP P : {P. finite P \<and> P \<subseteq> M}. \<Sum>n. ?\<mu> P (F n)) = (SUP P : {P. finite P \<and> P \<subseteq> M}. ?\<mu> P (UNION UNIV F))"
  19.123 +      show "(SUP P \<in> {P. finite P \<and> P \<subseteq> M}. \<Sum>n. ?\<mu> P (F n)) = (SUP P \<in> {P. finite P \<and> P \<subseteq> M}. ?\<mu> P (UNION UNIV F))"
  19.124        proof (intro SUP_cong refl)
  19.125          fix i assume i: "i \<in> {P. finite P \<and> P \<subseteq> M}"
  19.126          show "(\<Sum>n. ?\<mu> i (F n)) = ?\<mu> i (UNION UNIV F)"
  19.127 @@ -3337,7 +3337,7 @@
  19.128            fix X assume "X \<in> sets x"
  19.129            show "emeasure x X \<le> emeasure (Sup_measure' S') X"
  19.130            proof (subst emeasure_Sup_measure'[OF _ \<open>X \<in> sets x\<close>])
  19.131 -            show "emeasure x X \<le> (SUP P : {P. finite P \<and> P \<subseteq> S'}. emeasure (sup_measure.F id P) X)"
  19.132 +            show "emeasure x X \<le> (SUP P \<in> {P. finite P \<and> P \<subseteq> S'}. emeasure (sup_measure.F id P) X)"
  19.133                using \<open>x\<in>S'\<close> by (intro SUP_upper2[where i="{x}"]) auto
  19.134            qed (insert \<open>x\<in>S'\<close> S', auto)
  19.135          qed
  19.136 @@ -3401,7 +3401,7 @@
  19.137            show "emeasure (Sup_measure' S') X \<le> emeasure x X"
  19.138              unfolding ***
  19.139            proof (subst emeasure_Sup_measure'[OF _ \<open>X \<in> sets (Sup_measure' S')\<close>])
  19.140 -            show "(SUP P : {P. finite P \<and> P \<subseteq> S'}. emeasure (sup_measure.F id P) X) \<le> emeasure x X"
  19.141 +            show "(SUP P \<in> {P. finite P \<and> P \<subseteq> S'}. emeasure (sup_measure.F id P) X) \<le> emeasure x X"
  19.142              proof (safe intro!: SUP_least)
  19.143                fix P assume P: "finite P" "P \<subseteq> S'"
  19.144                show "emeasure (sup_measure.F id P) X \<le> emeasure x X"
  19.145 @@ -3455,7 +3455,7 @@
  19.146  
  19.147  lemma sets_SUP:
  19.148    assumes "\<And>x. x \<in> I \<Longrightarrow> sets (M x) = sets N"
  19.149 -  shows "I \<noteq> {} \<Longrightarrow> sets (SUP i:I. M i) = sets N"
  19.150 +  shows "I \<noteq> {} \<Longrightarrow> sets (SUP i\<in>I. M i) = sets N"
  19.151    unfolding Sup_measure_def
  19.152    using assms assms[THEN sets_eq_imp_space_eq]
  19.153      sets_Sup_measure'[where A=N and M="M`I"]
  19.154 @@ -3463,27 +3463,27 @@
  19.155  
  19.156  lemma emeasure_SUP:
  19.157    assumes sets: "\<And>i. i \<in> I \<Longrightarrow> sets (M i) = sets N" "X \<in> sets N" "I \<noteq> {}"
  19.158 -  shows "emeasure (SUP i:I. M i) X = (SUP J:{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I}. emeasure (SUP i:J. M i) X)"
  19.159 +  shows "emeasure (SUP i\<in>I. M i) X = (SUP J\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I}. emeasure (SUP i\<in>J. M i) X)"
  19.160  proof -
  19.161    interpret sup_measure: comm_monoid_set sup "bot :: 'b measure"
  19.162      by standard (auto intro!: antisym)
  19.163 -  have eq: "finite J \<Longrightarrow> sup_measure.F id J = (SUP i:J. i)" for J :: "'b measure set"
  19.164 +  have eq: "finite J \<Longrightarrow> sup_measure.F id J = (SUP i\<in>J. i)" for J :: "'b measure set"
  19.165      by (induction J rule: finite_induct) auto
  19.166 -  have 1: "J \<noteq> {} \<Longrightarrow> J \<subseteq> I \<Longrightarrow> sets (SUP x:J. M x) = sets N" for J
  19.167 +  have 1: "J \<noteq> {} \<Longrightarrow> J \<subseteq> I \<Longrightarrow> sets (SUP x\<in>J. M x) = sets N" for J
  19.168      by (intro sets_SUP sets) (auto )
  19.169    from \<open>I \<noteq> {}\<close> obtain i where "i\<in>I" by auto
  19.170 -  have "Sup_measure' (M`I) X = (SUP P:{P. finite P \<and> P \<subseteq> M`I}. sup_measure.F id P X)"
  19.171 +  have "Sup_measure' (M`I) X = (SUP P\<in>{P. finite P \<and> P \<subseteq> M`I}. sup_measure.F id P X)"
  19.172      using sets by (intro emeasure_Sup_measure') auto
  19.173 -  also have "Sup_measure' (M`I) = (SUP i:I. M i)"
  19.174 +  also have "Sup_measure' (M`I) = (SUP i\<in>I. M i)"
  19.175      unfolding Sup_measure_def using \<open>I \<noteq> {}\<close> sets sets(1)[THEN sets_eq_imp_space_eq]
  19.176      by (intro Sup_lexord1[where P="\<lambda>x. _ = x"]) auto
  19.177 -  also have "(SUP P:{P. finite P \<and> P \<subseteq> M`I}. sup_measure.F id P X) =
  19.178 -    (SUP J:{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I}. (SUP i:J. M i) X)"
  19.179 +  also have "(SUP P\<in>{P. finite P \<and> P \<subseteq> M`I}. sup_measure.F id P X) =
  19.180 +    (SUP J\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I}. (SUP i\<in>J. M i) X)"
  19.181    proof (intro SUP_eq)
  19.182      fix J assume "J \<in> {P. finite P \<and> P \<subseteq> M`I}"
  19.183      then obtain J' where J': "J' \<subseteq> I" "finite J'" and J: "J = M`J'" and "finite J"
  19.184        using finite_subset_image[of J M I] by auto
  19.185 -    show "\<exists>j\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I}. sup_measure.F id J X \<le> (SUP i:j. M i) X"
  19.186 +    show "\<exists>j\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> I}. sup_measure.F id J X \<le> (SUP i\<in>j. M i) X"
  19.187      proof cases
  19.188        assume "J' = {}" with \<open>i \<in> I\<close> show ?thesis
  19.189          by (auto simp add: J)
  19.190 @@ -3493,7 +3493,7 @@
  19.191      qed
  19.192    next
  19.193      fix J assume J: "J \<in> {P. P \<noteq> {} \<and> finite P \<and> P \<subseteq> I}"
  19.194 -    show "\<exists>J'\<in>{J. finite J \<and> J \<subseteq> M`I}. (SUP i:J. M i) X \<le> sup_measure.F id J' X"
  19.195 +    show "\<exists>J'\<in>{J. finite J \<and> J \<subseteq> M`I}. (SUP i\<in>J. M i) X \<le> sup_measure.F id J' X"
  19.196        using J by (intro bexI[of _ "M`J"]) (auto simp add: eq simp del: id_apply)
  19.197    qed
  19.198    finally show ?thesis .
  19.199 @@ -3502,14 +3502,14 @@
  19.200  lemma emeasure_SUP_chain:
  19.201    assumes sets: "\<And>i. i \<in> A \<Longrightarrow> sets (M i) = sets N" "X \<in> sets N"
  19.202    assumes ch: "Complete_Partial_Order.chain (\<le>) (M ` A)" and "A \<noteq> {}"
  19.203 -  shows "emeasure (SUP i:A. M i) X = (SUP i:A. emeasure (M i) X)"
  19.204 +  shows "emeasure (SUP i\<in>A. M i) X = (SUP i\<in>A. emeasure (M i) X)"
  19.205  proof (subst emeasure_SUP[OF sets \<open>A \<noteq> {}\<close>])
  19.206 -  show "(SUP J:{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> A}. emeasure (SUPREMUM J M) X) = (SUP i:A. emeasure (M i) X)"
  19.207 +  show "(SUP J\<in>{J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> A}. emeasure (SUPREMUM J M) X) = (SUP i\<in>A. emeasure (M i) X)"
  19.208    proof (rule SUP_eq)
  19.209      fix J assume "J \<in> {J. J \<noteq> {} \<and> finite J \<and> J \<subseteq> A}"
  19.210      then have J: "Complete_Partial_Order.chain (\<le>) (M ` J)" "finite J" "J \<noteq> {}" and "J \<subseteq> A"
  19.211        using ch[THEN chain_subset, of "M`J"] by auto
  19.212 -    with in_chain_finite[OF J(1)] obtain j where "j \<in> J" "(SUP j:J. M j) = M j"
  19.213 +    with in_chain_finite[OF J(1)] obtain j where "j \<in> J" "(SUP j\<in>J. M j) = M j"
  19.214        by auto
  19.215      with \<open>J \<subseteq> A\<close> show "\<exists>j\<in>A. emeasure (SUPREMUM J M) X \<le> emeasure (M j) X"
  19.216        by auto
  19.217 @@ -3554,20 +3554,20 @@
  19.218  
  19.219  lemma Sup_lexord_rel:
  19.220    assumes "\<And>i. i \<in> I \<Longrightarrow> k (A i) = k (B i)"
  19.221 -    "R (c (A ` {a \<in> I. k (B a) = (SUP x:I. k (B x))})) (c (B ` {a \<in> I. k (B a) = (SUP x:I. k (B x))}))"
  19.222 +    "R (c (A ` {a \<in> I. k (B a) = (SUP x\<in>I. k (B x))})) (c (B ` {a \<in> I. k (B a) = (SUP x\<in>I. k (B x))}))"
  19.223      "R (s (A`I)) (s (B`I))"
  19.224    shows "R (Sup_lexord k c s (A`I)) (Sup_lexord k c s (B`I))"
  19.225  proof -
  19.226 -  have "A ` {a \<in> I. k (B a) = (SUP x:I. k (B x))} =  {a \<in> A ` I. k a = (SUP x:I. k (B x))}"
  19.227 +  have "A ` {a \<in> I. k (B a) = (SUP x\<in>I. k (B x))} =  {a \<in> A ` I. k a = (SUP x\<in>I. k (B x))}"
  19.228      using assms(1) by auto
  19.229 -  moreover have "B ` {a \<in> I. k (B a) = (SUP x:I. k (B x))} =  {a \<in> B ` I. k a = (SUP x:I. k (B x))}"
  19.230 +  moreover have "B ` {a \<in> I. k (B a) = (SUP x\<in>I. k (B x))} =  {a \<in> B ` I. k a = (SUP x\<in>I. k (B x))}"
  19.231      by auto
  19.232    ultimately show ?thesis
  19.233      using assms by (auto simp: Sup_lexord_def Let_def)
  19.234  qed
  19.235  
  19.236  lemma sets_SUP_cong:
  19.237 -  assumes eq: "\<And>i. i \<in> I \<Longrightarrow> sets (M i) = sets (N i)" shows "sets (SUP i:I. M i) = sets (SUP i:I. N i)"
  19.238 +  assumes eq: "\<And>i. i \<in> I \<Longrightarrow> sets (M i) = sets (N i)" shows "sets (SUP i\<in>I. M i) = sets (SUP i\<in>I. N i)"
  19.239    unfolding Sup_measure_def
  19.240    using eq eq[THEN sets_eq_imp_space_eq]
  19.241    apply (intro Sup_lexord_rel[where R="\<lambda>x y. sets x = sets y"])
  19.242 @@ -3627,17 +3627,17 @@
  19.243  
  19.244  lemma measurable_SUP2:
  19.245    "I \<noteq> {} \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> f \<in> measurable N (M i)) \<Longrightarrow>
  19.246 -    (\<And>i j. i \<in> I \<Longrightarrow> j \<in> I \<Longrightarrow> space (M i) = space (M j)) \<Longrightarrow> f \<in> measurable N (SUP i:I. M i)"
  19.247 +    (\<And>i j. i \<in> I \<Longrightarrow> j \<in> I \<Longrightarrow> space (M i) = space (M j)) \<Longrightarrow> f \<in> measurable N (SUP i\<in>I. M i)"
  19.248    by (auto intro!: measurable_Sup2)
  19.249  
  19.250  lemma sets_Sup_sigma:
  19.251    assumes [simp]: "M \<noteq> {}" and M: "\<And>m. m \<in> M \<Longrightarrow> m \<subseteq> Pow \<Omega>"
  19.252 -  shows "sets (SUP m:M. sigma \<Omega> m) = sets (sigma \<Omega> (\<Union>M))"
  19.253 +  shows "sets (SUP m\<in>M. sigma \<Omega> m) = sets (sigma \<Omega> (\<Union>M))"
  19.254  proof -
  19.255    { fix a m assume "a \<in> sigma_sets \<Omega> m" "m \<in> M"
  19.256      then have "a \<in> sigma_sets \<Omega> (\<Union>M)"
  19.257       by induction (auto intro: sigma_sets.intros(2-)) }
  19.258 -  then show "sets (SUP m:M. sigma \<Omega> m) = sets (sigma \<Omega> (\<Union>M))"
  19.259 +  then show "sets (SUP m\<in>M. sigma \<Omega> m) = sets (sigma \<Omega> (\<Union>M))"
  19.260      apply (subst sets_Sup_eq[where X="\<Omega>"])
  19.261      apply (auto simp add: M) []
  19.262      apply auto []
  19.263 @@ -3649,14 +3649,14 @@
  19.264  
  19.265  lemma Sup_sigma:
  19.266    assumes [simp]: "M \<noteq> {}" and M: "\<And>m. m \<in> M \<Longrightarrow> m \<subseteq> Pow \<Omega>"
  19.267 -  shows "(SUP m:M. sigma \<Omega> m) = (sigma \<Omega> (\<Union>M))"
  19.268 +  shows "(SUP m\<in>M. sigma \<Omega> m) = (sigma \<Omega> (\<Union>M))"
  19.269  proof (intro antisym SUP_least)
  19.270    have *: "\<Union>M \<subseteq> Pow \<Omega>"
  19.271      using M by auto
  19.272 -  show "sigma \<Omega> (\<Union>M) \<le> (SUP m:M. sigma \<Omega> m)"
  19.273 +  show "sigma \<Omega> (\<Union>M) \<le> (SUP m\<in>M. sigma \<Omega> m)"
  19.274    proof (intro less_eq_measure.intros(3))
  19.275 -    show "space (sigma \<Omega> (\<Union>M)) = space (SUP m:M. sigma \<Omega> m)"
  19.276 -      "sets (sigma \<Omega> (\<Union>M)) = sets (SUP m:M. sigma \<Omega> m)"
  19.277 +    show "space (sigma \<Omega> (\<Union>M)) = space (SUP m\<in>M. sigma \<Omega> m)"
  19.278 +      "sets (sigma \<Omega> (\<Union>M)) = sets (SUP m\<in>M. sigma \<Omega> m)"
  19.279        using sets_Sup_sigma[OF assms] sets_Sup_sigma[OF assms, THEN sets_eq_imp_space_eq]
  19.280        by auto
  19.281    qed (simp add: emeasure_sigma le_fun_def)
  19.282 @@ -3665,12 +3665,12 @@
  19.283  qed
  19.284  
  19.285  lemma SUP_sigma_sigma:
  19.286 -  "M \<noteq> {} \<Longrightarrow> (\<And>m. m \<in> M \<Longrightarrow> f m \<subseteq> Pow \<Omega>) \<Longrightarrow> (SUP m:M. sigma \<Omega> (f m)) = sigma \<Omega> (\<Union>m\<in>M. f m)"
  19.287 +  "M \<noteq> {} \<Longrightarrow> (\<And>m. m \<in> M \<Longrightarrow> f m \<subseteq> Pow \<Omega>) \<Longrightarrow> (SUP m\<in>M. sigma \<Omega> (f m)) = sigma \<Omega> (\<Union>m\<in>M. f m)"
  19.288    using Sup_sigma[of "f`M" \<Omega>] by auto
  19.289  
  19.290  lemma sets_vimage_Sup_eq:
  19.291    assumes *: "M \<noteq> {}" "f \<in> X \<rightarrow> Y" "\<And>m. m \<in> M \<Longrightarrow> space m = Y"
  19.292 -  shows "sets (vimage_algebra X f (Sup M)) = sets (SUP m : M. vimage_algebra X f m)"
  19.293 +  shows "sets (vimage_algebra X f (Sup M)) = sets (SUP m \<in> M. vimage_algebra X f m)"
  19.294    (is "?IS = ?SI")
  19.295  proof
  19.296    show "?IS \<subseteq> ?SI"
  19.297 @@ -3767,12 +3767,12 @@
  19.298      using x by (induct rule: sigma_sets.induct) (insert a, auto)
  19.299  qed
  19.300  
  19.301 -lemma in_sets_SUP: "i \<in> I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> space (M i) = Y) \<Longrightarrow> X \<in> sets (M i) \<Longrightarrow> X \<in> sets (SUP i:I. M i)"
  19.302 +lemma in_sets_SUP: "i \<in> I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> space (M i) = Y) \<Longrightarrow> X \<in> sets (M i) \<Longrightarrow> X \<in> sets (SUP i\<in>I. M i)"
  19.303    by (intro in_sets_Sup[where X=Y]) auto
  19.304  
  19.305  lemma measurable_SUP1:
  19.306    "i \<in> I \<Longrightarrow> f \<in> measurable (M i) N \<Longrightarrow> (\<And>m n. m \<in> I \<Longrightarrow> n \<in> I \<Longrightarrow> space (M m) = space (M n)) \<Longrightarrow>
  19.307 -    f \<in> measurable (SUP i:I. M i) N"
  19.308 +    f \<in> measurable (SUP i\<in>I. M i) N"
  19.309    by (auto intro: measurable_Sup1)
  19.310  
  19.311  lemma sets_image_in_sets':
    20.1 --- a/src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy	Wed Nov 07 23:03:45 2018 +0100
    20.2 +++ b/src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy	Thu Nov 08 09:11:52 2018 +0100
    20.3 @@ -811,7 +811,7 @@
    20.4  subsection \<open>Integral on nonnegative functions\<close>
    20.5  
    20.6  definition nn_integral :: "'a measure \<Rightarrow> ('a \<Rightarrow> ennreal) \<Rightarrow> ennreal" ("integral\<^sup>N") where
    20.7 -  "integral\<^sup>N M f = (SUP g : {g. simple_function M g \<and> g \<le> f}. integral\<^sup>S M g)"
    20.8 +  "integral\<^sup>N M f = (SUP g \<in> {g. simple_function M g \<and> g \<le> f}. integral\<^sup>S M g)"
    20.9  
   20.10  syntax
   20.11    "_nn_integral" :: "pttrn \<Rightarrow> ennreal \<Rightarrow> 'a measure \<Rightarrow> ennreal" ("\<integral>\<^sup>+((2 _./ _)/ \<partial>_)" [60,61] 110)
   20.12 @@ -820,7 +820,7 @@
   20.13    "\<integral>\<^sup>+x. f \<partial>M" == "CONST nn_integral M (\<lambda>x. f)"
   20.14  
   20.15  lemma nn_integral_def_finite:
   20.16 -  "integral\<^sup>N M f = (SUP g : {g. simple_function M g \<and> g \<le> f \<and> (\<forall>x. g x < top)}. integral\<^sup>S M g)"
   20.17 +  "integral\<^sup>N M f = (SUP g \<in> {g. simple_function M g \<and> g \<le> f \<and> (\<forall>x. g x < top)}. integral\<^sup>S M g)"
   20.18      (is "_ = SUPREMUM ?A ?f")
   20.19    unfolding nn_integral_def
   20.20  proof (safe intro!: antisym SUP_least)
   20.21 @@ -1342,7 +1342,7 @@
   20.22    assumes u: "\<And>i. u i \<in> borel_measurable M"
   20.23    shows "(\<integral>\<^sup>+ x. liminf (\<lambda>n. u n x) \<partial>M) \<le> liminf (\<lambda>n. integral\<^sup>N M (u n))"
   20.24  proof -
   20.25 -  have "(\<integral>\<^sup>+ x. liminf (\<lambda>n. u n x) \<partial>M) = (SUP n. \<integral>\<^sup>+ x. (INF i:{n..}. u i x) \<partial>M)"
   20.26 +  have "(\<integral>\<^sup>+ x. liminf (\<lambda>n. u n x) \<partial>M) = (SUP n. \<integral>\<^sup>+ x. (INF i\<in>{n..}. u i x) \<partial>M)"
   20.27      unfolding liminf_SUP_INF using u
   20.28      by (intro nn_integral_monotone_convergence_SUP_AE)
   20.29         (auto intro!: AE_I2 intro: INF_greatest INF_superset_mono)
   20.30 @@ -1361,7 +1361,7 @@
   20.31      using bounds by (auto simp: AE_all_countable)
   20.32    then have "(\<integral>\<^sup>+ x. (SUP n. u n x) \<partial>M) \<le> (\<integral>\<^sup>+ x. w x \<partial>M)"
   20.33      by (auto intro!: nn_integral_mono_AE elim: eventually_mono intro: SUP_least)
   20.34 -  then have "(\<integral>\<^sup>+ x. limsup (\<lambda>n. u n x) \<partial>M) = (INF n. \<integral>\<^sup>+ x. (SUP i:{n..}. u i x) \<partial>M)"
   20.35 +  then have "(\<integral>\<^sup>+ x. limsup (\<lambda>n. u n x) \<partial>M) = (INF n. \<integral>\<^sup>+ x. (SUP i\<in>{n..}. u i x) \<partial>M)"
   20.36      unfolding limsup_INF_SUP using bnd w
   20.37      by (intro nn_integral_monotone_convergence_INF_AE')
   20.38         (auto intro!: AE_I2 intro: SUP_least SUP_subset_mono)
   20.39 @@ -1875,24 +1875,24 @@
   20.40    fixes f :: "'a \<Rightarrow> nat \<Rightarrow> ennreal"
   20.41    assumes chain: "Complete_Partial_Order.chain (\<le>) (f ` Y)"
   20.42    and nonempty: "Y \<noteq> {}"
   20.43 -  shows "(\<integral>\<^sup>+ x. (SUP i:Y. f i x) \<partial>count_space UNIV) = (SUP i:Y. (\<integral>\<^sup>+ x. f i x \<partial>count_space UNIV))"
   20.44 +  shows "(\<integral>\<^sup>+ x. (SUP i\<in>Y. f i x) \<partial>count_space UNIV) = (SUP i\<in>Y. (\<integral>\<^sup>+ x. f i x \<partial>count_space UNIV))"
   20.45    (is "?lhs = ?rhs" is "integral\<^sup>N ?M _ = _")
   20.46  proof (rule order_class.order.antisym)
   20.47    show "?rhs \<le> ?lhs"
   20.48      by (auto intro!: SUP_least SUP_upper nn_integral_mono)
   20.49  next
   20.50 -  have "\<exists>g. incseq g \<and> range g \<subseteq> (\<lambda>i. f i x) ` Y \<and> (SUP i:Y. f i x) = (SUP i. g i)" for x
   20.51 +  have "\<exists>g. incseq g \<and> range g \<subseteq> (\<lambda>i. f i x) ` Y \<and> (SUP i\<in>Y. f i x) = (SUP i. g i)" for x
   20.52      by (rule ennreal_Sup_countable_SUP) (simp add: nonempty)
   20.53    then obtain g where incseq: "\<And>x. incseq (g x)"
   20.54      and range: "\<And>x. range (g x) \<subseteq> (\<lambda>i. f i x) ` Y"
   20.55 -    and sup: "\<And>x. (SUP i:Y. f i x) = (SUP i. g x i)" by moura
   20.56 +    and sup: "\<And>x. (SUP i\<in>Y. f i x) = (SUP i. g x i)" by moura
   20.57    from incseq have incseq': "incseq (\<lambda>i x. g x i)"
   20.58      by(blast intro: incseq_SucI le_funI dest: incseq_SucD)
   20.59  
   20.60    have "?lhs = \<integral>\<^sup>+ x. (SUP i. g x i) \<partial>?M" by(simp add: sup)
   20.61    also have "\<dots> = (SUP i. \<integral>\<^sup>+ x. g x i \<partial>?M)" using incseq'
   20.62      by(rule nn_integral_monotone_convergence_SUP) simp
   20.63 -  also have "\<dots> \<le> (SUP i:Y. \<integral>\<^sup>+ x. f i x \<partial>?M)"
   20.64 +  also have "\<dots> \<le> (SUP i\<in>Y. \<integral>\<^sup>+ x. f i x \<partial>?M)"
   20.65    proof(rule SUP_least)
   20.66      fix n
   20.67      have "\<And>x. \<exists>i. g x n = f i x \<and> i \<in> Y" using range by blast
   20.68 @@ -1902,7 +1902,7 @@
   20.69        by(rule nn_integral_count_space_nat)
   20.70      also have "\<dots> = (SUP m. \<Sum>x<m. g x n)"
   20.71        by(rule suminf_eq_SUP)
   20.72 -    also have "\<dots> \<le> (SUP i:Y. \<integral>\<^sup>+ x. f i x \<partial>?M)"
   20.73 +    also have "\<dots> \<le> (SUP i\<in>Y. \<integral>\<^sup>+ x. f i x \<partial>?M)"
   20.74      proof(rule SUP_mono)
   20.75        fix m
   20.76        show "\<exists>m'\<in>Y. (\<Sum>x<m. g x n) \<le> (\<integral>\<^sup>+ x. f m' x \<partial>?M)"
   20.77 @@ -1916,7 +1916,7 @@
   20.78          with chain have chain': "Complete_Partial_Order.chain (\<le>) (f ` ?Y)" by(rule chain_subset)
   20.79          hence "Sup (f ` ?Y) \<in> f ` ?Y"
   20.80            by(rule ccpo_class.in_chain_finite)(auto simp add: True lessThan_empty_iff)
   20.81 -        then obtain m' where "m' < m" and m': "(SUP i:?Y. f i) = f (I m')" by auto
   20.82 +        then obtain m' where "m' < m" and m': "(SUP i\<in>?Y. f i) = f (I m')" by auto
   20.83          have "I m' \<in> Y" using I by blast
   20.84          have "(\<Sum>x<m. g x n) \<le> (\<Sum>x<m. f (I m') x)"
   20.85          proof(rule sum_mono)
   20.86 @@ -1924,7 +1924,7 @@
   20.87            assume "x \<in> {..<m}"
   20.88            hence "x < m" by simp
   20.89            have "g x n = f (I x) x" by(simp add: I)
   20.90 -          also have "\<dots> \<le> (SUP i:?Y. f i) x" unfolding Sup_fun_def image_image
   20.91 +          also have "\<dots> \<le> (SUP i\<in>?Y. f i) x" unfolding Sup_fun_def image_image
   20.92              using \<open>x \<in> {..<m}\<close> by (rule Sup_upper [OF imageI])
   20.93            also have "\<dots> = f (I m') x" unfolding m' by simp
   20.94            finally show "g x n \<le> f (I m') x" .
    21.1 --- a/src/HOL/Analysis/Ordered_Euclidean_Space.thy	Wed Nov 07 23:03:45 2018 +0100
    21.2 +++ b/src/HOL/Analysis/Ordered_Euclidean_Space.thy	Thu Nov 08 09:11:52 2018 +0100
    21.3 @@ -11,8 +11,8 @@
    21.4    assumes eucl_less_le_not_le: "x < y \<longleftrightarrow> x \<le> y \<and> \<not> y \<le> x"
    21.5    assumes eucl_inf: "inf x y = (\<Sum>i\<in>Basis. inf (x \<bullet> i) (y \<bullet> i) *\<^sub>R i)"
    21.6    assumes eucl_sup: "sup x y = (\<Sum>i\<in>Basis. sup (x \<bullet> i) (y \<bullet> i) *\<^sub>R i)"
    21.7 -  assumes eucl_Inf: "Inf X = (\<Sum>i\<in>Basis. (INF x:X. x \<bullet> i) *\<^sub>R i)"
    21.8 -  assumes eucl_Sup: "Sup X = (\<Sum>i\<in>Basis. (SUP x:X. x \<bullet> i) *\<^sub>R i)"
    21.9 +  assumes eucl_Inf: "Inf X = (\<Sum>i\<in>Basis. (INF x\<in>X. x \<bullet> i) *\<^sub>R i)"
   21.10 +  assumes eucl_Sup: "Sup X = (\<Sum>i\<in>Basis. (SUP x\<in>X. x \<bullet> i) *\<^sub>R i)"
   21.11    assumes eucl_abs: "\<bar>x\<bar> = (\<Sum>i\<in>Basis. \<bar>x \<bullet> i\<bar> *\<^sub>R i)"
   21.12  begin
   21.13  
   21.14 @@ -49,8 +49,8 @@
   21.15    by (simp_all add: eucl_inf eucl_sup inner_sum_left inner_Basis if_distrib comm_monoid_add_class.sum.delta
   21.16        cong: if_cong)
   21.17  
   21.18 -lemma%unimportant inner_Basis_INF_left: "i \<in> Basis \<Longrightarrow> (INF x:X. f x) \<bullet> i = (INF x:X. f x \<bullet> i)"
   21.19 -  and inner_Basis_SUP_left: "i \<in> Basis \<Longrightarrow> (SUP x:X. f x) \<bullet> i = (SUP x:X. f x \<bullet> i)"
   21.20 +lemma%unimportant inner_Basis_INF_left: "i \<in> Basis \<Longrightarrow> (INF x\<in>X. f x) \<bullet> i = (INF x\<in>X. f x \<bullet> i)"
   21.21 +  and inner_Basis_SUP_left: "i \<in> Basis \<Longrightarrow> (SUP x\<in>X. f x) \<bullet> i = (SUP x\<in>X. f x \<bullet> i)"
   21.22    using eucl_Sup [of "f ` X"] eucl_Inf [of "f ` X"] by (simp_all add: comp_def)
   21.23  
   21.24  lemma%unimportant abs_inner: "i \<in> Basis \<Longrightarrow> \<bar>x\<bar> \<bullet> i = \<bar>x \<bullet> i\<bar>"
   21.25 @@ -284,8 +284,8 @@
   21.26  
   21.27  definition%important "inf x y = (\<chi> i. inf (x $ i) (y $ i))"
   21.28  definition%important "sup x y = (\<chi> i. sup (x $ i) (y $ i))"
   21.29 -definition%important "Inf X = (\<chi> i. (INF x:X. x $ i))"
   21.30 -definition%important "Sup X = (\<chi> i. (SUP x:X. x $ i))"
   21.31 +definition%important "Inf X = (\<chi> i. (INF x\<in>X. x $ i))"
   21.32 +definition%important "Sup X = (\<chi> i. (SUP x\<in>X. x $ i))"
   21.33  definition%important "\<bar>x\<bar> = (\<chi> i. \<bar>x $ i\<bar>)"
   21.34  
   21.35  instance
    22.1 --- a/src/HOL/Analysis/Polytope.thy	Wed Nov 07 23:03:45 2018 +0100
    22.2 +++ b/src/HOL/Analysis/Polytope.thy	Thu Nov 08 09:11:52 2018 +0100
    22.3 @@ -2080,7 +2080,7 @@
    22.4            case False
    22.5            then obtain h' where h': "h' \<in> F - {h}" by auto
    22.6            define inff where "inff =
    22.7 -            (INF j:F - {h}.
    22.8 +            (INF j\<in>F - {h}.
    22.9                if 0 < a j \<bullet> y - a j \<bullet> w
   22.10                then (b j - a j \<bullet> w) / (a j \<bullet> y - a j \<bullet> w)
   22.11                else 1)"
    23.1 --- a/src/HOL/Analysis/Product_Vector.thy	Wed Nov 07 23:03:45 2018 +0100
    23.2 +++ b/src/HOL/Analysis/Product_Vector.thy	Thu Nov 08 09:11:52 2018 +0100
    23.3 @@ -127,7 +127,7 @@
    23.4  
    23.5  definition [code del]:
    23.6    "(uniformity :: (('a \<times> 'b) \<times> ('a \<times> 'b)) filter) =
    23.7 -    (INF e:{0 <..}. principal {(x, y). dist x y < e})"
    23.8 +    (INF e\<in>{0 <..}. principal {(x, y). dist x y < e})"
    23.9  
   23.10  instance
   23.11    by standard (rule uniformity_prod_def)
    24.1 --- a/src/HOL/Analysis/Radon_Nikodym.thy	Wed Nov 07 23:03:45 2018 +0100
    24.2 +++ b/src/HOL/Analysis/Radon_Nikodym.thy	Thu Nov 08 09:11:52 2018 +0100
    24.3 @@ -254,7 +254,7 @@
    24.4          using f \<open>A \<in> sets M\<close> by (auto intro!: SUP_least simp: G_D)
    24.5      qed }
    24.6    note SUP_in_G = this
    24.7 -  let ?y = "SUP g : G. integral\<^sup>N M g"
    24.8 +  let ?y = "SUP g \<in> G. integral\<^sup>N M g"
    24.9    have y_le: "?y \<le> N (space M)" unfolding G_def
   24.10    proof (safe intro!: SUP_least)
   24.11      fix g assume "\<forall>A\<in>sets M. (\<integral>\<^sup>+x. g x * indicator A x \<partial>M) \<le> N A"
   24.12 @@ -390,7 +390,7 @@
   24.13      (\<forall>A\<in>sets M. A \<inter> (\<Union>i. B i) = {} \<longrightarrow> (emeasure M A = 0 \<and> N A = 0) \<or> (emeasure M A > 0 \<and> N A = \<infinity>))"
   24.14  proof%unimportant -
   24.15    let ?Q = "{Q\<in>sets M. N Q \<noteq> \<infinity>}"
   24.16 -  let ?a = "SUP Q:?Q. emeasure M Q"
   24.17 +  let ?a = "SUP Q\<in>?Q. emeasure M Q"
   24.18    have "{} \<in> ?Q" by auto
   24.19    then have Q_not_empty: "?Q \<noteq> {}" by blast
   24.20    have "?a \<le> emeasure M (space M)" using sets.sets_into_space
   24.21 @@ -404,7 +404,7 @@
   24.22    then have "\<forall>i. \<exists>Q'. Q'' i = emeasure M Q' \<and> Q' \<in> ?Q" by auto
   24.23    from choice[OF this] obtain Q' where Q': "\<And>i. Q'' i = emeasure M (Q' i)" "\<And>i. Q' i \<in> ?Q"
   24.24      by auto
   24.25 -  then have a_Lim: "?a = (SUP i::nat. emeasure M (Q' i))" using a by simp
   24.26 +  then have a_Lim: "?a = (SUP i. emeasure M (Q' i))" using a by simp
   24.27    let ?O = "\<lambda>n. \<Union>i\<le>n. Q' i"
   24.28    have Union: "(SUP i. emeasure M (?O i)) = emeasure M (\<Union>i. ?O i)"
   24.29    proof (rule SUP_emeasure_incseq[of ?O])
    25.1 --- a/src/HOL/Analysis/Regularity.thy	Wed Nov 07 23:03:45 2018 +0100
    25.2 +++ b/src/HOL/Analysis/Regularity.thy	Thu Nov 08 09:11:52 2018 +0100
    25.3 @@ -14,9 +14,9 @@
    25.4    assumes "emeasure M (space M) \<noteq> \<infinity>"
    25.5    assumes "B \<in> sets borel"
    25.6    shows inner_regular: "emeasure M B =
    25.7 -    (SUP K : {K. K \<subseteq> B \<and> compact K}. emeasure M K)" (is "?inner B")
    25.8 +    (SUP K \<in> {K. K \<subseteq> B \<and> compact K}. emeasure M K)" (is "?inner B")
    25.9    and outer_regular: "emeasure M B =
   25.10 -    (INF U : {U. B \<subseteq> U \<and> open U}. emeasure M U)" (is "?outer B")
   25.11 +    (INF U \<in> {U. B \<subseteq> U \<and> open U}. emeasure M U)" (is "?outer B")
   25.12  proof%unimportant -
   25.13    have Us: "UNIV = space M" by (metis assms(1) sets_eq_imp_space_eq space_borel)
   25.14    hence sU: "space M = UNIV" by simp
   25.15 @@ -183,7 +183,7 @@
   25.16        finally
   25.17        have "emeasure M A = (INF n. emeasure M {x. infdist x A < 1 / real (Suc n)})" .
   25.18        moreover
   25.19 -      have "\<dots> \<ge> (INF U:{U. A \<subseteq> U \<and> open U}. emeasure M U)"
   25.20 +      have "\<dots> \<ge> (INF U\<in>{U. A \<subseteq> U \<and> open U}. emeasure M U)"
   25.21        proof (intro INF_mono)
   25.22          fix m
   25.23          have "?G (1 / real (Suc m)) \<in> {U. A \<subseteq> U \<and> open U}" using open_G by auto
   25.24 @@ -193,7 +193,7 @@
   25.25            by blast
   25.26        qed
   25.27        moreover
   25.28 -      have "emeasure M A \<le> (INF U:{U. A \<subseteq> U \<and> open U}. emeasure M U)"
   25.29 +      have "emeasure M A \<le> (INF U\<in>{U. A \<subseteq> U \<and> open U}. emeasure M U)"
   25.30          by (rule INF_greatest) (auto intro!: emeasure_mono simp: sb)
   25.31        ultimately show ?thesis by simp
   25.32      qed (auto intro!: INF_eqI)
   25.33 @@ -217,38 +217,38 @@
   25.34      from compl have [simp]: "B \<in> sets M" by (auto simp: sb borel_eq_closed)
   25.35      case 2
   25.36      have "M (space M - B) = M (space M) - emeasure M B" by (auto simp: emeasure_compl)
   25.37 -    also have "\<dots> = (INF K:{K. K \<subseteq> B \<and> compact K}. M (space M) -  M K)"
   25.38 +    also have "\<dots> = (INF K\<in>{K. K \<subseteq> B \<and> compact K}. M (space M) -  M K)"
   25.39        by (subst ennreal_SUP_const_minus) (auto simp: less_top[symmetric] inner)
   25.40 -    also have "\<dots> = (INF U:{U. U \<subseteq> B \<and> compact U}. M (space M - U))"
   25.41 +    also have "\<dots> = (INF U\<in>{U. U \<subseteq> B \<and> compact U}. M (space M - U))"
   25.42        by (rule INF_cong) (auto simp add: emeasure_compl sb compact_imp_closed)
   25.43 -    also have "\<dots> \<ge> (INF U:{U. U \<subseteq> B \<and> closed U}. M (space M - U))"
   25.44 +    also have "\<dots> \<ge> (INF U\<in>{U. U \<subseteq> B \<and> closed U}. M (space M - U))"
   25.45        by (rule INF_superset_mono) (auto simp add: compact_imp_closed)
   25.46 -    also have "(INF U:{U. U \<subseteq> B \<and> closed U}. M (space M - U)) =
   25.47 -        (INF U:{U. space M - B \<subseteq> U \<and> open U}. emeasure M U)"
   25.48 +    also have "(INF U\<in>{U. U \<subseteq> B \<and> closed U}. M (space M - U)) =
   25.49 +        (INF U\<in>{U. space M - B \<subseteq> U \<and> open U}. emeasure M U)"
   25.50        unfolding INF_image [of _ "\<lambda>u. space M - u" _, symmetric, unfolded comp_def]
   25.51          by (rule INF_cong) (auto simp add: sU Compl_eq_Diff_UNIV [symmetric, simp])
   25.52      finally have
   25.53 -      "(INF U:{U. space M - B \<subseteq> U \<and> open U}. emeasure M U) \<le> emeasure M (space M - B)" .
   25.54 +      "(INF U\<in>{U. space M - B \<subseteq> U \<and> open U}. emeasure M U) \<le> emeasure M (space M - B)" .
   25.55      moreover have
   25.56 -      "(INF U:{U. space M - B \<subseteq> U \<and> open U}. emeasure M U) \<ge> emeasure M (space M - B)"
   25.57 +      "(INF U\<in>{U. space M - B \<subseteq> U \<and> open U}. emeasure M U) \<ge> emeasure M (space M - B)"
   25.58        by (auto simp: sb sU intro!: INF_greatest emeasure_mono)
   25.59      ultimately show ?case by (auto intro!: antisym simp: sets_eq_imp_space_eq[OF sb])
   25.60  
   25.61      case 1
   25.62      have "M (space M - B) = M (space M) - emeasure M B" by (auto simp: emeasure_compl)
   25.63 -    also have "\<dots> = (SUP U: {U. B \<subseteq> U \<and> open U}. M (space M) -  M U)"
   25.64 +    also have "\<dots> = (SUP U\<in> {U. B \<subseteq> U \<and> open U}. M (space M) -  M U)"
   25.65        unfolding outer by (subst ennreal_INF_const_minus) auto
   25.66 -    also have "\<dots> = (SUP U:{U. B \<subseteq> U \<and> open U}. M (space M - U))"
   25.67 +    also have "\<dots> = (SUP U\<in>{U. B \<subseteq> U \<and> open U}. M (space M - U))"
   25.68        by (rule SUP_cong) (auto simp add: emeasure_compl sb compact_imp_closed)
   25.69 -    also have "\<dots> = (SUP K:{K. K \<subseteq> space M - B \<and> closed K}. emeasure M K)"
   25.70 +    also have "\<dots> = (SUP K\<in>{K. K \<subseteq> space M - B \<and> closed K}. emeasure M K)"
   25.71        unfolding SUP_image [of _ "\<lambda>u. space M - u" _, symmetric, unfolded comp_def]
   25.72          by (rule SUP_cong) (auto simp add: sU)
   25.73 -    also have "\<dots> = (SUP K:{K. K \<subseteq> space M - B \<and> compact K}. emeasure M K)"
   25.74 +    also have "\<dots> = (SUP K\<in>{K. K \<subseteq> space M - B \<and> compact K}. emeasure M K)"
   25.75      proof (safe intro!: antisym SUP_least)
   25.76        fix K assume "closed K" "K \<subseteq> space M - B"
   25.77        from closed_in_D[OF \<open>closed K\<close>]
   25.78 -      have K_inner: "emeasure M K = (SUP K:{Ka. Ka \<subseteq> K \<and> compact Ka}. emeasure M K)" by simp
   25.79 -      show "emeasure M K \<le> (SUP K:{K. K \<subseteq> space M - B \<and> compact K}. emeasure M K)"
   25.80 +      have K_inner: "emeasure M K = (SUP K\<in>{Ka. Ka \<subseteq> K \<and> compact Ka}. emeasure M K)" by simp
   25.81 +      show "emeasure M K \<le> (SUP K\<in>{K. K \<subseteq> space M - B \<and> compact K}. emeasure M K)"
   25.82          unfolding K_inner using \<open>K \<subseteq> space M - B\<close>
   25.83          by (auto intro!: SUP_upper SUP_least)
   25.84      qed (fastforce intro!: SUP_least SUP_upper simp: compact_imp_closed)
   25.85 @@ -284,7 +284,7 @@
   25.86        proof
   25.87          fix i
   25.88          from \<open>0 < e\<close> have "0 < e/(2*Suc n0)" by simp
   25.89 -        have "emeasure M (D i) = (SUP K:{K. K \<subseteq> (D i) \<and> compact K}. emeasure M K)"
   25.90 +        have "emeasure M (D i) = (SUP K\<in>{K. K \<subseteq> (D i) \<and> compact K}. emeasure M K)"
   25.91            using union by blast
   25.92          from SUP_approx_ennreal[OF \<open>0 < e/(2*Suc n0)\<close> _ this]
   25.93          show "\<exists>K. K \<subseteq> D i \<and> compact K \<and> emeasure M (D i) \<le> emeasure M K + e/(2*Suc n0)"
   25.94 @@ -327,7 +327,7 @@
   25.95        proof
   25.96          fix i::nat
   25.97          from \<open>0 < e\<close> have "0 < e/(2 powr Suc i)" by simp
   25.98 -        have "emeasure M (D i) = (INF U:{U. (D i) \<subseteq> U \<and> open U}. emeasure M U)"
   25.99 +        have "emeasure M (D i) = (INF U\<in>{U. (D i) \<subseteq> U \<and> open U}. emeasure M U)"
  25.100            using union by blast
  25.101          from INF_approx_ennreal[OF \<open>0 < e/(2 powr Suc i)\<close> this]
  25.102          show "\<exists>U. D i \<subseteq> U \<and> open U \<and> e/(2 powr Suc i) > emeasure M U - emeasure M (D i)"
    26.1 --- a/src/HOL/Analysis/Riemann_Mapping.thy	Wed Nov 07 23:03:45 2018 +0100
    26.2 +++ b/src/HOL/Analysis/Riemann_Mapping.thy	Thu Nov 08 09:11:52 2018 +0100
    26.3 @@ -168,7 +168,7 @@
    26.4            by (simp add: deq norm_mult divide_simps o_def)
    26.5        qed
    26.6      qed
    26.7 -    define l where "l \<equiv> SUP h:F. norm (deriv h 0)"
    26.8 +    define l where "l \<equiv> SUP h\<in>F. norm (deriv h 0)"
    26.9      have eql: "norm (deriv f 0) = l" if le: "l \<le> norm (deriv f 0)" and "f \<in> F" for f
   26.10        apply (rule order_antisym [OF _ le])
   26.11        using \<open>f \<in> F\<close> bdd cSUP_upper by (fastforce simp: l_def)
    27.1 --- a/src/HOL/Analysis/Tagged_Division.thy	Wed Nov 07 23:03:45 2018 +0100
    27.2 +++ b/src/HOL/Analysis/Tagged_Division.thy	Thu Nov 08 09:11:52 2018 +0100
    27.3 @@ -133,10 +133,10 @@
    27.4  subsection%important \<open>Bounds on intervals where they exist\<close>
    27.5  
    27.6  definition%important interval_upperbound :: "('a::euclidean_space) set \<Rightarrow> 'a"
    27.7 -  where "interval_upperbound s = (\<Sum>i\<in>Basis. (SUP x:s. x\<bullet>i) *\<^sub>R i)"
    27.8 +  where "interval_upperbound s = (\<Sum>i\<in>Basis. (SUP x\<in>s. x\<bullet>i) *\<^sub>R i)"
    27.9  
   27.10  definition%important interval_lowerbound :: "('a::euclidean_space) set \<Rightarrow> 'a"
   27.11 -  where "interval_lowerbound s = (\<Sum>i\<in>Basis. (INF x:s. x\<bullet>i) *\<^sub>R i)"
   27.12 +  where "interval_lowerbound s = (\<Sum>i\<in>Basis. (INF x\<in>s. x\<bullet>i) *\<^sub>R i)"
   27.13  
   27.14  lemma interval_upperbound[simp]:
   27.15    "\<forall>i\<in>Basis. a\<bullet>i \<le> b\<bullet>i \<Longrightarrow>
   27.16 @@ -169,10 +169,10 @@
   27.17    shows "interval_upperbound (A \<times> B) = (interval_upperbound A, interval_upperbound B)"
   27.18  proof%unimportant-
   27.19    from assms have fst_image_times': "A = fst ` (A \<times> B)" by simp
   27.20 -  have "(\<Sum>i\<in>Basis. (SUP x:A \<times> B. x \<bullet> (i, 0)) *\<^sub>R i) = (\<Sum>i\<in>Basis. (SUP x:A. x \<bullet> i) *\<^sub>R i)"
   27.21 +  have "(\<Sum>i\<in>Basis. (SUP x\<in>A \<times> B. x \<bullet> (i, 0)) *\<^sub>R i) = (\<Sum>i\<in>Basis. (SUP x\<in>A. x \<bullet> i) *\<^sub>R i)"
   27.22        by (subst (2) fst_image_times') (simp del: fst_image_times add: o_def inner_Pair_0)
   27.23    moreover from assms have snd_image_times': "B = snd ` (A \<times> B)" by simp
   27.24 -  have "(\<Sum>i\<in>Basis. (SUP x:A \<times> B. x \<bullet> (0, i)) *\<^sub>R i) = (\<Sum>i\<in>Basis. (SUP x:B. x \<bullet> i) *\<^sub>R i)"
   27.25 +  have "(\<Sum>i\<in>Basis. (SUP x\<in>A \<times> B. x \<bullet> (0, i)) *\<^sub>R i) = (\<Sum>i\<in>Basis. (SUP x\<in>B. x \<bullet> i) *\<^sub>R i)"
   27.26        by (subst (2) snd_image_times') (simp del: snd_image_times add: o_def inner_Pair_0)
   27.27    ultimately show ?thesis unfolding interval_upperbound_def
   27.28        by (subst sum_Basis_prod_eq) (auto simp add: sum_prod)
   27.29 @@ -183,10 +183,10 @@
   27.30    shows "interval_lowerbound (A \<times> B) = (interval_lowerbound A, interval_lowerbound B)"
   27.31  proof%unimportant-
   27.32    from assms have fst_image_times': "A = fst ` (A \<times> B)" by simp
   27.33 -  have "(\<Sum>i\<in>Basis. (INF x:A \<times> B. x \<bullet> (i, 0)) *\<^sub>R i) = (\<Sum>i\<in>Basis. (INF x:A. x \<bullet> i) *\<^sub>R i)"
   27.34 +  have "(\<Sum>i\<in>Basis. (INF x\<in>A \<times> B. x \<bullet> (i, 0)) *\<^sub>R i) = (\<Sum>i\<in>Basis. (INF x\<in>A. x \<bullet> i) *\<^sub>R i)"
   27.35        by (subst (2) fst_image_times') (simp del: fst_image_times add: o_def inner_Pair_0)
   27.36    moreover from assms have snd_image_times': "B = snd ` (A \<times> B)" by simp
   27.37 -  have "(\<Sum>i\<in>Basis. (INF x:A \<times> B. x \<bullet> (0, i)) *\<^sub>R i) = (\<Sum>i\<in>Basis. (INF x:B. x \<bullet> i) *\<^sub>R i)"
   27.38 +  have "(\<Sum>i\<in>Basis. (INF x\<in>A \<times> B. x \<bullet> (0, i)) *\<^sub>R i) = (\<Sum>i\<in>Basis. (INF x\<in>B. x \<bullet> i) *\<^sub>R i)"
   27.39        by (subst (2) snd_image_times') (simp del: snd_image_times add: o_def inner_Pair_0)
   27.40    ultimately show ?thesis unfolding interval_lowerbound_def
   27.41        by (subst sum_Basis_prod_eq) (auto simp add: sum_prod)
   27.42 @@ -2576,7 +2576,7 @@
   27.43  text \<open>Divisions over all gauges towards finer divisions.\<close>
   27.44  
   27.45  definition%important division_filter :: "'a::euclidean_space set \<Rightarrow> ('a \<times> 'a set) set filter"
   27.46 -  where "division_filter s = (INF g:{g. gauge g}. principal {p. p tagged_division_of s \<and> g fine p})"
   27.47 +  where "division_filter s = (INF g\<in>{g. gauge g}. principal {p. p tagged_division_of s \<and> g fine p})"
   27.48  
   27.49  lemma%important eventually_division_filter:
   27.50    "(\<forall>\<^sub>F p in division_filter s. P p) \<longleftrightarrow>
    28.1 --- a/src/HOL/Analysis/Topology_Euclidean_Space.thy	Wed Nov 07 23:03:45 2018 +0100
    28.2 +++ b/src/HOL/Analysis/Topology_Euclidean_Space.thy	Thu Nov 08 09:11:52 2018 +0100
    28.3 @@ -4189,7 +4189,7 @@
    28.4  next
    28.5    fix A
    28.6    assume A: "\<forall>a\<in>A. closed a" "\<forall>B\<subseteq>A. finite B \<longrightarrow> U \<inter> \<Inter>B \<noteq> {}" "U \<inter> \<Inter>A = {}"
    28.7 -  define F where "F = (INF a:insert U A. principal a)"
    28.8 +  define F where "F = (INF a\<in>insert U A. principal a)"
    28.9    have "F \<noteq> bot"
   28.10      unfolding F_def
   28.11    proof (rule INF_filter_not_bot)
   28.12 @@ -4197,7 +4197,7 @@
   28.13      assume X: "X \<subseteq> insert U A" "finite X"
   28.14      with A(2)[THEN spec, of "X - {U}"] have "U \<inter> \<Inter>(X - {U}) \<noteq> {}"
   28.15        by auto
   28.16 -    with X show "(INF a:X. principal a) \<noteq> bot"
   28.17 +    with X show "(INF a\<in>X. principal a) \<noteq> bot"
   28.18        by (auto simp: INF_principal_finite principal_eq_bot_iff)
   28.19    qed
   28.20    moreover
    29.1 --- a/src/HOL/Analysis/Uniform_Limit.thy	Wed Nov 07 23:03:45 2018 +0100
    29.2 +++ b/src/HOL/Analysis/Uniform_Limit.thy	Thu Nov 08 09:11:52 2018 +0100
    29.3 @@ -13,7 +13,7 @@
    29.4  subsection \<open>Definition\<close>
    29.5  
    29.6  definition%important uniformly_on :: "'a set \<Rightarrow> ('a \<Rightarrow> 'b::metric_space) \<Rightarrow> ('a \<Rightarrow> 'b) filter"
    29.7 -  where "uniformly_on S l = (INF e:{0 <..}. principal {f. \<forall>x\<in>S. dist (f x) (l x) < e})"
    29.8 +  where "uniformly_on S l = (INF e\<in>{0 <..}. principal {f. \<forall>x\<in>S. dist (f x) (l x) < e})"
    29.9  
   29.10  abbreviation%important
   29.11    "uniform_limit S f l \<equiv> filterlim f (uniformly_on S l)"
    30.1 --- a/src/HOL/Analysis/Weierstrass_Theorems.thy	Wed Nov 07 23:03:45 2018 +0100
    30.2 +++ b/src/HOL/Analysis/Weierstrass_Theorems.thy	Thu Nov 08 09:11:52 2018 +0100
    30.3 @@ -202,7 +202,7 @@
    30.4      by (induct I rule: finite_induct; simp add: const mult)
    30.5  
    30.6    definition%important normf :: "('a::t2_space \<Rightarrow> real) \<Rightarrow> real"
    30.7 -    where "normf f \<equiv> SUP x:S. \<bar>f x\<bar>"
    30.8 +    where "normf f \<equiv> SUP x\<in>S. \<bar>f x\<bar>"
    30.9  
   30.10    lemma%unimportant normf_upper: "\<lbrakk>continuous_on S f; x \<in> S\<rbrakk> \<Longrightarrow> \<bar>f x\<bar> \<le> normf f"
   30.11      apply (simp add: normf_def)
    31.1 --- a/src/HOL/Complete_Lattices.thy	Wed Nov 07 23:03:45 2018 +0100
    31.2 +++ b/src/HOL/Complete_Lattices.thy	Thu Nov 08 09:11:52 2018 +0100
    31.3 @@ -32,12 +32,6 @@
    31.4  
    31.5  end
    31.6  
    31.7 -syntax (input)
    31.8 -  "_INF1"     :: "pttrns \<Rightarrow> 'b \<Rightarrow> 'b"           ("(3INF _./ _)" [0, 10] 10)
    31.9 -  "_INF"      :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'b \<Rightarrow> 'b"  ("(3INF _:_./ _)" [0, 0, 10] 10)
   31.10 -  "_SUP1"     :: "pttrns \<Rightarrow> 'b \<Rightarrow> 'b"           ("(3SUP _./ _)" [0, 10] 10)
   31.11 -  "_SUP"      :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'b \<Rightarrow> 'b"  ("(3SUP _:_./ _)" [0, 0, 10] 10)
   31.12 -
   31.13  syntax
   31.14    "_INF1"     :: "pttrns \<Rightarrow> 'b \<Rightarrow> 'b"           ("(3INF _./ _)" [0, 10] 10)
   31.15    "_INF"      :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'b \<Rightarrow> 'b"  ("(3INF _\<in>_./ _)" [0, 0, 10] 10)
   31.16 @@ -50,6 +44,12 @@
   31.17    "_SUP1"     :: "pttrns \<Rightarrow> 'b \<Rightarrow> 'b"           ("(3\<Squnion>_./ _)" [0, 10] 10)
   31.18    "_SUP"      :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'b \<Rightarrow> 'b"  ("(3\<Squnion>_\<in>_./ _)" [0, 0, 10] 10)
   31.19  
   31.20 +syntax (input) \<comment> \<open>legacy input syntax\<close>
   31.21 +  "_INF1"     :: "pttrns \<Rightarrow> 'b \<Rightarrow> 'b"           ("(3INF _./ _)" [0, 10] 10)
   31.22 +  "_INF"      :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'b \<Rightarrow> 'b"  ("(3INF _:_./ _)" [0, 0, 10] 10)
   31.23 +  "_SUP1"     :: "pttrns \<Rightarrow> 'b \<Rightarrow> 'b"           ("(3SUP _./ _)" [0, 10] 10)
   31.24 +  "_SUP"      :: "pttrn \<Rightarrow> 'a set \<Rightarrow> 'b \<Rightarrow> 'b"  ("(3SUP _:_./ _)" [0, 0, 10] 10)
   31.25 +
   31.26  translations
   31.27    "\<Sqinter>x y. f"   \<rightleftharpoons> "\<Sqinter>x. \<Sqinter>y. f"
   31.28    "\<Sqinter>x. f"     \<rightleftharpoons> "\<Sqinter>CONST range (\<lambda>x. f)"
   31.29 @@ -236,7 +236,7 @@
   31.30  lemma INF_mono: "(\<And>m. m \<in> B \<Longrightarrow> \<exists>n\<in>A. f n \<le> g m) \<Longrightarrow> (\<Sqinter>n\<in>A. f n) \<le> (\<Sqinter>n\<in>B. g n)"
   31.31    using Inf_mono [of "g ` B" "f ` A"] by auto
   31.32  
   31.33 -lemma INF_mono': "(\<And>x. f x \<le> g x) \<Longrightarrow> (INF x:A. f x) \<le> (INF x:A. g x)"
   31.34 +lemma INF_mono': "(\<And>x. f x \<le> g x) \<Longrightarrow> (\<Sqinter>x\<in>A. f x) \<le> (\<Sqinter>x\<in>A. g x)"
   31.35    by (rule INF_mono) auto
   31.36  
   31.37  lemma Sup_mono:
   31.38 @@ -252,7 +252,7 @@
   31.39  lemma SUP_mono: "(\<And>n. n \<in> A \<Longrightarrow> \<exists>m\<in>B. f n \<le> g m) \<Longrightarrow> (\<Squnion>n\<in>A. f n) \<le> (\<Squnion>n\<in>B. g n)"
   31.40    using Sup_mono [of "f ` A" "g ` B"] by auto
   31.41  
   31.42 -lemma SUP_mono': "(\<And>x. f x \<le> g x) \<Longrightarrow> (SUP x:A. f x) \<le> (SUP x:A. g x)"
   31.43 +lemma SUP_mono': "(\<And>x. f x \<le> g x) \<Longrightarrow> (\<Squnion>x\<in>A. f x) \<le> (\<Squnion>x\<in>A. g x)"
   31.44    by (rule SUP_mono) auto
   31.45  
   31.46  lemma INF_superset_mono: "B \<subseteq> A \<Longrightarrow> (\<And>x. x \<in> B \<Longrightarrow> f x \<le> g x) \<Longrightarrow> (\<Sqinter>x\<in>A. f x) \<le> (\<Sqinter>x\<in>B. g x)"
    32.1 --- a/src/HOL/Complex.thy	Wed Nov 07 23:03:45 2018 +0100
    32.2 +++ b/src/HOL/Complex.thy	Thu Nov 08 09:11:52 2018 +0100
    32.3 @@ -308,7 +308,7 @@
    32.4  definition dist_complex_def: "dist x y = cmod (x - y)"
    32.5  
    32.6  definition uniformity_complex_def [code del]:
    32.7 -  "(uniformity :: (complex \<times> complex) filter) = (INF e:{0 <..}. principal {(x, y). dist x y < e})"
    32.8 +  "(uniformity :: (complex \<times> complex) filter) = (INF e\<in>{0 <..}. principal {(x, y). dist x y < e})"
    32.9  
   32.10  definition open_complex_def [code del]:
   32.11    "open (U :: complex set) \<longleftrightarrow> (\<forall>x\<in>U. eventually (\<lambda>(x', y). x' = x \<longrightarrow> y \<in> U) uniformity)"
    33.1 --- a/src/HOL/Computational_Algebra/Formal_Power_Series.thy	Wed Nov 07 23:03:45 2018 +0100
    33.2 +++ b/src/HOL/Computational_Algebra/Formal_Power_Series.thy	Thu Nov 08 09:11:52 2018 +0100
    33.3 @@ -821,7 +821,7 @@
    33.4  begin
    33.5  
    33.6  definition uniformity_fps_def [code del]:
    33.7 -  "(uniformity :: ('a fps \<times> 'a fps) filter) = (INF e:{0 <..}. principal {(x, y). dist x y < e})"
    33.8 +  "(uniformity :: ('a fps \<times> 'a fps) filter) = (INF e\<in>{0 <..}. principal {(x, y). dist x y < e})"
    33.9  
   33.10  definition open_fps_def' [code del]:
   33.11    "open (U :: 'a fps set) \<longleftrightarrow> (\<forall>x\<in>U. eventually (\<lambda>(x', y). x' = x \<longrightarrow> y \<in> U) uniformity)"
   33.12 @@ -1470,40 +1470,40 @@
   33.13  
   33.14  lemma fps_Gcd:
   33.15    assumes "A - {0} \<noteq> {}"
   33.16 -  shows   "Gcd A = fps_X ^ (INF f:A-{0}. subdegree f)"
   33.17 +  shows   "Gcd A = fps_X ^ (INF f\<in>A-{0}. subdegree f)"
   33.18  proof (rule sym, rule GcdI)
   33.19    fix f assume "f \<in> A"
   33.20 -  thus "fps_X ^ (INF f:A - {0}. subdegree f) dvd f"
   33.21 +  thus "fps_X ^ (INF f\<in>A - {0}. subdegree f) dvd f"
   33.22      by (cases "f = 0") (auto simp: fps_dvd_iff intro!: cINF_lower)
   33.23  next
   33.24    fix d assume d: "\<And>f. f \<in> A \<Longrightarrow> d dvd f"
   33.25    from assms obtain f where "f \<in> A - {0}" by auto
   33.26    with d[of f] have [simp]: "d \<noteq> 0" by auto
   33.27 -  from d assms have "subdegree d \<le> (INF f:A-{0}. subdegree f)"
   33.28 +  from d assms have "subdegree d \<le> (INF f\<in>A-{0}. subdegree f)"
   33.29      by (intro cINF_greatest) (auto simp: fps_dvd_iff[symmetric])
   33.30 -  with d assms show "d dvd fps_X ^ (INF f:A-{0}. subdegree f)" by (simp add: fps_dvd_iff)
   33.31 +  with d assms show "d dvd fps_X ^ (INF f\<in>A-{0}. subdegree f)" by (simp add: fps_dvd_iff)
   33.32  qed simp_all
   33.33  
   33.34  lemma fps_Gcd_altdef: "Gcd (A :: 'a :: field fps set) =
   33.35 -  (if A \<subseteq> {0} then 0 else fps_X ^ (INF f:A-{0}. subdegree f))"
   33.36 +  (if A \<subseteq> {0} then 0 else fps_X ^ (INF f\<in>A-{0}. subdegree f))"
   33.37    using fps_Gcd by auto
   33.38  
   33.39  lemma fps_Lcm:
   33.40    assumes "A \<noteq> {}" "0 \<notin> A" "bdd_above (subdegree`A)"
   33.41 -  shows   "Lcm A = fps_X ^ (SUP f:A. subdegree f)"
   33.42 +  shows   "Lcm A = fps_X ^ (SUP f\<in>A. subdegree f)"
   33.43  proof (rule sym, rule LcmI)
   33.44    fix f assume "f \<in> A"
   33.45    moreover from assms(3) have "bdd_above (subdegree ` A)" by auto
   33.46 -  ultimately show "f dvd fps_X ^ (SUP f:A. subdegree f)" using assms(2)
   33.47 +  ultimately show "f dvd fps_X ^ (SUP f\<in>A. subdegree f)" using assms(2)
   33.48      by (cases "f = 0") (auto simp: fps_dvd_iff intro!: cSUP_upper)
   33.49  next
   33.50    fix d assume d: "\<And>f. f \<in> A \<Longrightarrow> f dvd d"
   33.51    from assms obtain f where f: "f \<in> A" "f \<noteq> 0" by auto
   33.52 -  show "fps_X ^ (SUP f:A. subdegree f) dvd d"
   33.53 +  show "fps_X ^ (SUP f\<in>A. subdegree f) dvd d"
   33.54    proof (cases "d = 0")
   33.55      assume "d \<noteq> 0"
   33.56      moreover from d have "\<And>f. f \<in> A \<Longrightarrow> f \<noteq> 0 \<Longrightarrow> f dvd d" by blast
   33.57 -    ultimately have "subdegree d \<ge> (SUP f:A. subdegree f)" using assms
   33.58 +    ultimately have "subdegree d \<ge> (SUP f\<in>A. subdegree f)" using assms
   33.59        by (intro cSUP_least) (auto simp: fps_dvd_iff)
   33.60      with \<open>d \<noteq> 0\<close> show ?thesis by (simp add: fps_dvd_iff)
   33.61    qed simp_all
   33.62 @@ -1512,7 +1512,7 @@
   33.63  lemma fps_Lcm_altdef:
   33.64    "Lcm (A :: 'a :: field fps set) =
   33.65       (if 0 \<in> A \<or> \<not>bdd_above (subdegree`A) then 0 else
   33.66 -      if A = {} then 1 else fps_X ^ (SUP f:A. subdegree f))"
   33.67 +      if A = {} then 1 else fps_X ^ (SUP f\<in>A. subdegree f))"
   33.68  proof (cases "bdd_above (subdegree`A)")
   33.69    assume unbounded: "\<not>bdd_above (subdegree`A)"
   33.70    have "Lcm A = 0"
    34.1 --- a/src/HOL/Filter.thy	Wed Nov 07 23:03:45 2018 +0100
    34.2 +++ b/src/HOL/Filter.thy	Thu Nov 08 09:11:52 2018 +0100
    34.3 @@ -524,14 +524,14 @@
    34.4  
    34.5  lemma eventually_INF_finite:
    34.6    assumes "finite A"
    34.7 -  shows   "eventually P (INF x:A. F x) \<longleftrightarrow>
    34.8 +  shows   "eventually P (\<Sqinter> x\<in>A. F x) \<longleftrightarrow>
    34.9               (\<exists>Q. (\<forall>x\<in>A. eventually (Q x) (F x)) \<and> (\<forall>y. (\<forall>x\<in>A. Q x y) \<longrightarrow> P y))" 
   34.10    using assms
   34.11  proof (induction arbitrary: P rule: finite_induct)
   34.12    case (insert a A P)
   34.13    from insert.hyps have [simp]: "x \<noteq> a" if "x \<in> A" for x
   34.14      using that by auto
   34.15 -  have "eventually P (INF x:insert a A. F x) \<longleftrightarrow>
   34.16 +  have "eventually P (\<Sqinter> x\<in>insert a A. F x) \<longleftrightarrow>
   34.17            (\<exists>Q R S. eventually Q (F a) \<and> (( (\<forall>x\<in>A. eventually (S x) (F x)) \<and>
   34.18              (\<forall>y. (\<forall>x\<in>A. S x y) \<longrightarrow> R y)) \<and> (\<forall>x. Q x \<and> R x \<longrightarrow> P x)))"
   34.19      unfolding ex_simps by (simp add: eventually_inf insert.IH)
   34.20 @@ -915,7 +915,7 @@
   34.21  subsection \<open>Increasing finite subsets\<close>
   34.22  
   34.23  definition finite_subsets_at_top where
   34.24 -  "finite_subsets_at_top A = (INF X:{X. finite X \<and> X \<subseteq> A}. principal {Y. finite Y \<and> X \<subseteq> Y \<and> Y \<subseteq> A})"
   34.25 +  "finite_subsets_at_top A = (\<Sqinter> X\<in>{X. finite X \<and> X \<subseteq> A}. principal {Y. finite Y \<and> X \<subseteq> Y \<and> Y \<subseteq> A})"
   34.26  
   34.27  lemma eventually_finite_subsets_at_top:
   34.28    "eventually P (finite_subsets_at_top A) \<longleftrightarrow>
   34.29 @@ -1345,7 +1345,7 @@
   34.30    "(\<And>m. m \<in> J \<Longrightarrow> \<exists>i\<in>I. filtermap f (F i) \<le> G m) \<Longrightarrow> LIM x (\<Sqinter>i\<in>I. F i). f x :> (\<Sqinter>j\<in>J. G j)"
   34.31    unfolding filterlim_def by (rule order_trans[OF filtermap_INF INF_mono])
   34.32  
   34.33 -lemma filterlim_INF': "x \<in> A \<Longrightarrow> filterlim f F (G x) \<Longrightarrow> filterlim f F (INF x:A. G x)"
   34.34 +lemma filterlim_INF': "x \<in> A \<Longrightarrow> filterlim f F (G x) \<Longrightarrow> filterlim f F (\<Sqinter> x\<in>A. G x)"
   34.35    unfolding filterlim_def by (rule order.trans[OF filtermap_mono[OF INF_lower]])
   34.36  
   34.37  lemma filterlim_filtercomap_iff: "filterlim f (filtercomap g G) F \<longleftrightarrow> filterlim (g \<circ> f) G F"
   34.38 @@ -1859,7 +1859,7 @@
   34.39      if "(F, G) \<in> SS'" for P Q F G by simp_all
   34.40    show "rel_filter A (Sup S) (Sup S')"
   34.41    proof
   34.42 -    let ?Z = "SUP (F, G):SS'. Z F G"
   34.43 +    let ?Z = "\<Squnion>(F, G)\<in>SS'. Z F G"
   34.44      show *: "\<forall>\<^sub>F (x, y) in ?Z. A x y" using Z by(auto simp add: eventually_Sup)
   34.45      show "map_filter_on {(x, y). A x y} fst ?Z = Sup S" "map_filter_on {(x, y). A x y} snd ?Z = Sup S'"
   34.46        unfolding filter_eq_iff
    35.1 --- a/src/HOL/IMP/Collecting.thy	Wed Nov 07 23:03:45 2018 +0100
    35.2 +++ b/src/HOL/IMP/Collecting.thy	Thu Nov 08 09:11:52 2018 +0100
    35.3 @@ -94,7 +94,7 @@
    35.4       dest: size_annos_same)
    35.5  
    35.6  definition Inf_acom :: "com \<Rightarrow> 'a::complete_lattice acom set \<Rightarrow> 'a acom" where
    35.7 -"Inf_acom c M = annotate (\<lambda>p. INF C:M. anno C p) c"
    35.8 +"Inf_acom c M = annotate (\<lambda>p. INF C\<in>M. anno C p) c"
    35.9  
   35.10  global_interpretation
   35.11    Complete_Lattice "{C. strip C = c}" "Inf_acom c" for c
    36.1 --- a/src/HOL/Library/Countable_Complete_Lattices.thy	Wed Nov 07 23:03:45 2018 +0100
    36.2 +++ b/src/HOL/Library/Countable_Complete_Lattices.thy	Thu Nov 08 09:11:52 2018 +0100
    36.3 @@ -27,58 +27,58 @@
    36.4    show "a \<le> top" by (auto intro: ccInf_greatest simp only: ccInf_empty [symmetric])
    36.5  qed
    36.6  
    36.7 -lemma ccINF_lower: "countable A \<Longrightarrow> i \<in> A \<Longrightarrow> (INF i :A. f i) \<le> f i"
    36.8 +lemma ccINF_lower: "countable A \<Longrightarrow> i \<in> A \<Longrightarrow> (INF i \<in> A. f i) \<le> f i"
    36.9    using ccInf_lower [of "f ` A"] by simp
   36.10  
   36.11 -lemma ccINF_greatest: "countable A \<Longrightarrow> (\<And>i. i \<in> A \<Longrightarrow> u \<le> f i) \<Longrightarrow> u \<le> (INF i :A. f i)"
   36.12 +lemma ccINF_greatest: "countable A \<Longrightarrow> (\<And>i. i \<in> A \<Longrightarrow> u \<le> f i) \<Longrightarrow> u \<le> (INF i \<in> A. f i)"
   36.13    using ccInf_greatest [of "f ` A"] by auto
   36.14  
   36.15 -lemma ccSUP_upper: "countable A \<Longrightarrow> i \<in> A \<Longrightarrow> f i \<le> (SUP i :A. f i)"
   36.16 +lemma ccSUP_upper: "countable A \<Longrightarrow> i \<in> A \<Longrightarrow> f i \<le> (SUP i \<in> A. f i)"
   36.17    using ccSup_upper [of "f ` A"] by simp
   36.18  
   36.19 -lemma ccSUP_least: "countable A \<Longrightarrow> (\<And>i. i \<in> A \<Longrightarrow> f i \<le> u) \<Longrightarrow> (SUP i :A. f i) \<le> u"
   36.20 +lemma ccSUP_least: "countable A \<Longrightarrow> (\<And>i. i \<in> A \<Longrightarrow> f i \<le> u) \<Longrightarrow> (SUP i \<in> A. f i) \<le> u"
   36.21    using ccSup_least [of "f ` A"] by auto
   36.22  
   36.23  lemma ccInf_lower2: "countable A \<Longrightarrow> u \<in> A \<Longrightarrow> u \<le> v \<Longrightarrow> Inf A \<le> v"
   36.24    using ccInf_lower [of A u] by auto
   36.25  
   36.26 -lemma ccINF_lower2: "countable A \<Longrightarrow> i \<in> A \<Longrightarrow> f i \<le> u \<Longrightarrow> (INF i :A. f i) \<le> u"
   36.27 +lemma ccINF_lower2: "countable A \<Longrightarrow> i \<in> A \<Longrightarrow> f i \<le> u \<Longrightarrow> (INF i \<in> A. f i) \<le> u"
   36.28    using ccINF_lower [of A i f] by auto
   36.29  
   36.30  lemma ccSup_upper2: "countable A \<Longrightarrow> u \<in> A \<Longrightarrow> v \<le> u \<Longrightarrow> v \<le> Sup A"
   36.31    using ccSup_upper [of A u] by auto
   36.32  
   36.33 -lemma ccSUP_upper2: "countable A \<Longrightarrow> i \<in> A \<Longrightarrow> u \<le> f i \<Longrightarrow> u \<le> (SUP i :A. f i)"
   36.34 +lemma ccSUP_upper2: "countable A \<Longrightarrow> i \<in> A \<Longrightarrow> u \<le> f i \<Longrightarrow> u \<le> (SUP i \<in> A. f i)"
   36.35    using ccSUP_upper [of A i f] by auto
   36.36  
   36.37  lemma le_ccInf_iff: "countable A \<Longrightarrow> b \<le> Inf A \<longleftrightarrow> (\<forall>a\<in>A. b \<le> a)"
   36.38    by (auto intro: ccInf_greatest dest: ccInf_lower)
   36.39  
   36.40 -lemma le_ccINF_iff: "countable A \<Longrightarrow> u \<le> (INF i :A. f i) \<longleftrightarrow> (\<forall>i\<in>A. u \<le> f i)"
   36.41 +lemma le_ccINF_iff: "countable A \<Longrightarrow> u \<le> (INF i \<in> A. f i) \<longleftrightarrow> (\<forall>i\<in>A. u \<le> f i)"
   36.42    using le_ccInf_iff [of "f ` A"] by simp
   36.43  
   36.44  lemma ccSup_le_iff: "countable A \<Longrightarrow> Sup A \<le> b \<longleftrightarrow> (\<forall>a\<in>A. a \<le> b)"
   36.45    by (auto intro: ccSup_least dest: ccSup_upper)
   36.46  
   36.47 -lemma ccSUP_le_iff: "countable A \<Longrightarrow> (SUP i :A. f i) \<le> u \<longleftrightarrow> (\<forall>i\<in>A. f i \<le> u)"
   36.48 +lemma ccSUP_le_iff: "countable A \<Longrightarrow> (SUP i \<in> A. f i) \<le> u \<longleftrightarrow> (\<forall>i\<in>A. f i \<le> u)"
   36.49    using ccSup_le_iff [of "f ` A"] by simp
   36.50  
   36.51  lemma ccInf_insert [simp]: "countable A \<Longrightarrow> Inf (insert a A) = inf a (Inf A)"
   36.52    by (force intro: le_infI le_infI1 le_infI2 antisym ccInf_greatest ccInf_lower)
   36.53  
   36.54 -lemma ccINF_insert [simp]: "countable A \<Longrightarrow> (INF x:insert a A. f x) = inf (f a) (INFIMUM A f)"
   36.55 +lemma ccINF_insert [simp]: "countable A \<Longrightarrow> (INF x\<in>insert a A. f x) = inf (f a) (INFIMUM A f)"
   36.56    unfolding image_insert by simp
   36.57  
   36.58  lemma ccSup_insert [simp]: "countable A \<Longrightarrow> Sup (insert a A) = sup a (Sup A)"
   36.59    by (force intro: le_supI le_supI1 le_supI2 antisym ccSup_least ccSup_upper)
   36.60  
   36.61 -lemma ccSUP_insert [simp]: "countable A \<Longrightarrow> (SUP x:insert a A. f x) = sup (f a) (SUPREMUM A f)"
   36.62 +lemma ccSUP_insert [simp]: "countable A \<Longrightarrow> (SUP x\<in>insert a A. f x) = sup (f a) (SUPREMUM A f)"
   36.63    unfolding image_insert by simp
   36.64  
   36.65 -lemma ccINF_empty [simp]: "(INF x:{}. f x) = top"
   36.66 +lemma ccINF_empty [simp]: "(INF x\<in>{}. f x) = top"
   36.67    unfolding image_empty by simp
   36.68  
   36.69 -lemma ccSUP_empty [simp]: "(SUP x:{}. f x) = bot"
   36.70 +lemma ccSUP_empty [simp]: "(SUP x\<in>{}. f x) = bot"
   36.71    unfolding image_empty by simp
   36.72  
   36.73  lemma ccInf_superset_mono: "countable A \<Longrightarrow> B \<subseteq> A \<Longrightarrow> Inf A \<le> Inf B"
   36.74 @@ -99,7 +99,7 @@
   36.75  qed auto
   36.76  
   36.77  lemma ccINF_mono:
   36.78 -  "countable A \<Longrightarrow> countable B \<Longrightarrow> (\<And>m. m \<in> B \<Longrightarrow> \<exists>n\<in>A. f n \<le> g m) \<Longrightarrow> (INF n:A. f n) \<le> (INF n:B. g n)"
   36.79 +  "countable A \<Longrightarrow> countable B \<Longrightarrow> (\<And>m. m \<in> B \<Longrightarrow> \<exists>n\<in>A. f n \<le> g m) \<Longrightarrow> (INF n\<in>A. f n) \<le> (INF n\<in>B. g n)"
   36.80    using ccInf_mono [of "g ` B" "f ` A"] by auto
   36.81  
   36.82  lemma ccSup_mono:
   36.83 @@ -114,15 +114,15 @@
   36.84  qed auto
   36.85  
   36.86  lemma ccSUP_mono:
   36.87 -  "countable A \<Longrightarrow> countable B \<Longrightarrow> (\<And>n. n \<in> A \<Longrightarrow> \<exists>m\<in>B. f n \<le> g m) \<Longrightarrow> (SUP n:A. f n) \<le> (SUP n:B. g n)"
   36.88 +  "countable A \<Longrightarrow> countable B \<Longrightarrow> (\<And>n. n \<in> A \<Longrightarrow> \<exists>m\<in>B. f n \<le> g m) \<Longrightarrow> (SUP n\<in>A. f n) \<le> (SUP n\<in>B. g n)"
   36.89    using ccSup_mono [of "g ` B" "f ` A"] by auto
   36.90  
   36.91  lemma ccINF_superset_mono:
   36.92 -  "countable A \<Longrightarrow> B \<subseteq> A \<Longrightarrow> (\<And>x. x \<in> B \<Longrightarrow> f x \<le> g x) \<Longrightarrow> (INF x:A. f x) \<le> (INF x:B. g x)"
   36.93 +  "countable A \<Longrightarrow> B \<subseteq> A \<Longrightarrow> (\<And>x. x \<in> B \<Longrightarrow> f x \<le> g x) \<Longrightarrow> (INF x\<in>A. f x) \<le> (INF x\<in>B. g x)"
   36.94    by (blast intro: ccINF_mono countable_subset dest: subsetD)
   36.95  
   36.96  lemma ccSUP_subset_mono:
   36.97 -  "countable B \<Longrightarrow> A \<subseteq> B \<Longrightarrow> (\<And>x. x \<in> A \<Longrightarrow> f x \<le> g x) \<Longrightarrow> (SUP x:A. f x) \<le> (SUP x:B. g x)"
   36.98 +  "countable B \<Longrightarrow> A \<subseteq> B \<Longrightarrow> (\<And>x. x \<in> A \<Longrightarrow> f x \<le> g x) \<Longrightarrow> (SUP x\<in>A. f x) \<le> (SUP x\<in>B. g x)"
   36.99    by (blast intro: ccSUP_mono countable_subset dest: subsetD)
  36.100  
  36.101  
  36.102 @@ -136,38 +136,38 @@
  36.103    by (rule antisym) (auto intro: ccInf_greatest ccInf_lower le_infI1 le_infI2)
  36.104  
  36.105  lemma ccINF_union:
  36.106 -  "countable A \<Longrightarrow> countable B \<Longrightarrow> (INF i:A \<union> B. M i) = inf (INF i:A. M i) (INF i:B. M i)"
  36.107 +  "countable A \<Longrightarrow> countable B \<Longrightarrow> (INF i\<in>A \<union> B. M i) = inf (INF i\<in>A. M i) (INF i\<in>B. M i)"
  36.108    by (auto intro!: antisym ccINF_mono intro: le_infI1 le_infI2 ccINF_greatest ccINF_lower)
  36.109  
  36.110  lemma ccSup_union_distrib: "countable A \<Longrightarrow> countable B \<Longrightarrow> Sup (A \<union> B) = sup (Sup A) (Sup B)"
  36.111    by (rule antisym) (auto intro: ccSup_least ccSup_upper le_supI1 le_supI2)
  36.112  
  36.113  lemma ccSUP_union:
  36.114 -  "countable A \<Longrightarrow> countable B \<Longrightarrow> (SUP i:A \<union> B. M i) = sup (SUP i:A. M i) (SUP i:B. M i)"
  36.115 +  "countable A \<Longrightarrow> countable B \<Longrightarrow> (SUP i\<in>A \<union> B. M i) = sup (SUP i\<in>A. M i) (SUP i\<in>B. M i)"
  36.116    by (auto intro!: antisym ccSUP_mono intro: le_supI1 le_supI2 ccSUP_least ccSUP_upper)
  36.117  
  36.118 -lemma ccINF_inf_distrib: "countable A \<Longrightarrow> inf (INF a:A. f a) (INF a:A. g a) = (INF a:A. inf (f a) (g a))"
  36.119 +lemma ccINF_inf_distrib: "countable A \<Longrightarrow> inf (INF a\<in>A. f a) (INF a\<in>A. g a) = (INF a\<in>A. inf (f a) (g a))"
  36.120    by (rule antisym) (rule ccINF_greatest, auto intro: le_infI1 le_infI2 ccINF_lower ccINF_mono)
  36.121  
  36.122 -lemma ccSUP_sup_distrib: "countable A \<Longrightarrow> sup (SUP a:A. f a) (SUP a:A. g a) = (SUP a:A. sup (f a) (g a))"
  36.123 +lemma ccSUP_sup_distrib: "countable A \<Longrightarrow> sup (SUP a\<in>A. f a) (SUP a\<in>A. g a) = (SUP a\<in>A. sup (f a) (g a))"
  36.124    by (rule antisym[rotated]) (rule ccSUP_least, auto intro: le_supI1 le_supI2 ccSUP_upper ccSUP_mono)
  36.125  
  36.126 -lemma ccINF_const [simp]: "A \<noteq> {} \<Longrightarrow> (INF i :A. f) = f"
  36.127 +lemma ccINF_const [simp]: "A \<noteq> {} \<Longrightarrow> (INF i \<in> A. f) = f"
  36.128    unfolding image_constant_conv by auto
  36.129  
  36.130 -lemma ccSUP_const [simp]: "A \<noteq> {} \<Longrightarrow> (SUP i :A. f) = f"
  36.131 +lemma ccSUP_const [simp]: "A \<noteq> {} \<Longrightarrow> (SUP i \<in> A. f) = f"
  36.132    unfolding image_constant_conv by auto
  36.133  
  36.134 -lemma ccINF_top [simp]: "(INF x:A. top) = top"
  36.135 +lemma ccINF_top [simp]: "(INF x\<in>A. top) = top"
  36.136    by (cases "A = {}") simp_all
  36.137  
  36.138 -lemma ccSUP_bot [simp]: "(SUP x:A. bot) = bot"
  36.139 +lemma ccSUP_bot [simp]: "(SUP x\<in>A. bot) = bot"
  36.140    by (cases "A = {}") simp_all
  36.141  
  36.142 -lemma ccINF_commute: "countable A \<Longrightarrow> countable B \<Longrightarrow> (INF i:A. INF j:B. f i j) = (INF j:B. INF i:A. f i j)"
  36.143 +lemma ccINF_commute: "countable A \<Longrightarrow> countable B \<Longrightarrow> (INF i\<in>A. INF j\<in>B. f i j) = (INF j\<in>B. INF i\<in>A. f i j)"
  36.144    by (iprover intro: ccINF_lower ccINF_greatest order_trans antisym)
  36.145  
  36.146 -lemma ccSUP_commute: "countable A \<Longrightarrow> countable B \<Longrightarrow> (SUP i:A. SUP j:B. f i j) = (SUP j:B. SUP i:A. f i j)"
  36.147 +lemma ccSUP_commute: "countable A \<Longrightarrow> countable B \<Longrightarrow> (SUP i\<in>A. SUP j\<in>B. f i j) = (SUP j\<in>B. SUP i\<in>A. f i j)"
  36.148    by (iprover intro: ccSUP_upper ccSUP_least order_trans antisym)
  36.149  
  36.150  end
  36.151 @@ -179,61 +179,61 @@
  36.152  lemma less_ccSup_iff: "countable S \<Longrightarrow> a < Sup S \<longleftrightarrow> (\<exists>x\<in>S. a < x)"
  36.153    unfolding not_le [symmetric] by (subst ccSup_le_iff) auto
  36.154  
  36.155 -lemma less_ccSUP_iff: "countable A \<Longrightarrow> a < (SUP i:A. f i) \<longleftrightarrow> (\<exists>x\<in>A. a < f x)"
  36.156 +lemma less_ccSUP_iff: "countable A \<Longrightarrow> a < (SUP i\<in>A. f i) \<longleftrightarrow> (\<exists>x\<in>A. a < f x)"
  36.157    using less_ccSup_iff [of "f ` A"] by simp
  36.158  
  36.159  lemma ccInf_less_iff: "countable S \<Longrightarrow> Inf S < a \<longleftrightarrow> (\<exists>x\<in>S. x < a)"
  36.160    unfolding not_le [symmetric] by (subst le_ccInf_iff) auto
  36.161  
  36.162 -lemma ccINF_less_iff: "countable A \<Longrightarrow> (INF i:A. f i) < a \<longleftrightarrow> (\<exists>x\<in>A. f x < a)"
  36.163 +lemma ccINF_less_iff: "countable A \<Longrightarrow> (INF i\<in>A. f i) < a \<longleftrightarrow> (\<exists>x\<in>A. f x < a)"
  36.164    using ccInf_less_iff [of "f ` A"] by simp
  36.165  
  36.166  end
  36.167  
  36.168  class countable_complete_distrib_lattice = countable_complete_lattice +
  36.169 -  assumes sup_ccInf: "countable B \<Longrightarrow> sup a (Inf B) = (INF b:B. sup a b)"
  36.170 -  assumes inf_ccSup: "countable B \<Longrightarrow> inf a (Sup B) = (SUP b:B. inf a b)"
  36.171 +  assumes sup_ccInf: "countable B \<Longrightarrow> sup a (Inf B) = (INF b\<in>B. sup a b)"
  36.172 +  assumes inf_ccSup: "countable B \<Longrightarrow> inf a (Sup B) = (SUP b\<in>B. inf a b)"
  36.173  begin
  36.174  
  36.175  lemma sup_ccINF:
  36.176 -  "countable B \<Longrightarrow> sup a (INF b:B. f b) = (INF b:B. sup a (f b))"
  36.177 +  "countable B \<Longrightarrow> sup a (INF b\<in>B. f b) = (INF b\<in>B. sup a (f b))"
  36.178    by (simp only: sup_ccInf image_image countable_image)
  36.179  
  36.180  lemma inf_ccSUP:
  36.181 -  "countable B \<Longrightarrow> inf a (SUP b:B. f b) = (SUP b:B. inf a (f b))"
  36.182 +  "countable B \<Longrightarrow> inf a (SUP b\<in>B. f b) = (SUP b\<in>B. inf a (f b))"
  36.183    by (simp only: inf_ccSup image_image countable_image)
  36.184  
  36.185  subclass distrib_lattice
  36.186  proof
  36.187    fix a b c
  36.188 -  from sup_ccInf[of "{b, c}" a] have "sup a (Inf {b, c}) = (INF d:{b, c}. sup a d)"
  36.189 +  from sup_ccInf[of "{b, c}" a] have "sup a (Inf {b, c}) = (INF d\<in>{b, c}. sup a d)"
  36.190      by simp
  36.191    then show "sup a (inf b c) = inf (sup a b) (sup a c)"
  36.192      by simp
  36.193  qed
  36.194  
  36.195  lemma ccInf_sup:
  36.196 -  "countable B \<Longrightarrow> sup (Inf B) a = (INF b:B. sup b a)"
  36.197 +  "countable B \<Longrightarrow> sup (Inf B) a = (INF b\<in>B. sup b a)"
  36.198    by (simp add: sup_ccInf sup_commute)
  36.199  
  36.200  lemma ccSup_inf:
  36.201 -  "countable B \<Longrightarrow> inf (Sup B) a = (SUP b:B. inf b a)"
  36.202 +  "countable B \<Longrightarrow> inf (Sup B) a = (SUP b\<in>B. inf b a)"
  36.203    by (simp add: inf_ccSup inf_commute)
  36.204  
  36.205  lemma ccINF_sup:
  36.206 -  "countable B \<Longrightarrow> sup (INF b:B. f b) a = (INF b:B. sup (f b) a)"
  36.207 +  "countable B \<Longrightarrow> sup (INF b\<in>B. f b) a = (INF b\<in>B. sup (f b) a)"
  36.208    by (simp add: sup_ccINF sup_commute)
  36.209  
  36.210  lemma ccSUP_inf:
  36.211 -  "countable B \<Longrightarrow> inf (SUP b:B. f b) a = (SUP b:B. inf (f b) a)"
  36.212 +  "countable B \<Longrightarrow> inf (SUP b\<in>B. f b) a = (SUP b\<in>B. inf (f b) a)"
  36.213    by (simp add: inf_ccSUP inf_commute)
  36.214  
  36.215  lemma ccINF_sup_distrib2:
  36.216 -  "countable A \<Longrightarrow> countable B \<Longrightarrow> sup (INF a:A. f a) (INF b:B. g b) = (INF a:A. INF b:B. sup (f a) (g b))"
  36.217 +  "countable A \<Longrightarrow> countable B \<Longrightarrow> sup (INF a\<in>A. f a) (INF b\<in>B. g b) = (INF a\<in>A. INF b\<in>B. sup (f a) (g b))"
  36.218    by (subst ccINF_commute) (simp_all add: sup_ccINF ccINF_sup)
  36.219  
  36.220  lemma ccSUP_inf_distrib2:
  36.221 -  "countable A \<Longrightarrow> countable B \<Longrightarrow> inf (SUP a:A. f a) (SUP b:B. g b) = (SUP a:A. SUP b:B. inf (f a) (g b))"
  36.222 +  "countable A \<Longrightarrow> countable B \<Longrightarrow> inf (SUP a\<in>A. f a) (SUP b\<in>B. g b) = (SUP a\<in>A. SUP b\<in>B. inf (f a) (g b))"
  36.223    by (subst ccSUP_commute) (simp_all add: inf_ccSUP ccSUP_inf)
  36.224  
  36.225  context
  36.226 @@ -242,20 +242,20 @@
  36.227  begin
  36.228  
  36.229  lemma mono_ccInf:
  36.230 -  "countable A \<Longrightarrow> f (Inf A) \<le> (INF x:A. f x)"
  36.231 +  "countable A \<Longrightarrow> f (Inf A) \<le> (INF x\<in>A. f x)"
  36.232    using \<open>mono f\<close>
  36.233    by (auto intro!: countable_complete_lattice_class.ccINF_greatest intro: ccInf_lower dest: monoD)
  36.234  
  36.235  lemma mono_ccSup:
  36.236 -  "countable A \<Longrightarrow> (SUP x:A. f x) \<le> f (Sup A)"
  36.237 +  "countable A \<Longrightarrow> (SUP x\<in>A. f x) \<le> f (Sup A)"
  36.238    using \<open>mono f\<close> by (auto intro: countable_complete_lattice_class.ccSUP_least ccSup_upper dest: monoD)
  36.239  
  36.240  lemma mono_ccINF:
  36.241 -  "countable I \<Longrightarrow> f (INF i : I. A i) \<le> (INF x : I. f (A x))"
  36.242 +  "countable I \<Longrightarrow> f (INF i \<in> I. A i) \<le> (INF x \<in> I. f (A x))"
  36.243    by (intro countable_complete_lattice_class.ccINF_greatest monoD[OF \<open>mono f\<close>] ccINF_lower)
  36.244  
  36.245  lemma mono_ccSUP:
  36.246 -  "countable I \<Longrightarrow> (SUP x : I. f (A x)) \<le> f (SUP i : I. A i)"
  36.247 +  "countable I \<Longrightarrow> (SUP x \<in> I. f (A x)) \<le> f (SUP i \<in> I. A i)"
  36.248    by (intro countable_complete_lattice_class.ccSUP_least monoD[OF \<open>mono f\<close>] ccSUP_upper)
  36.249  
  36.250  end
    37.1 --- a/src/HOL/Library/Extended_Nonnegative_Real.thy	Wed Nov 07 23:03:45 2018 +0100
    37.2 +++ b/src/HOL/Library/Extended_Nonnegative_Real.thy	Thu Nov 08 09:11:52 2018 +0100
    37.3 @@ -108,12 +108,12 @@
    37.4  lemma sup_continuous_SUP[order_continuous_intros]:
    37.5    fixes M :: "_ \<Rightarrow> _ \<Rightarrow> 'a::complete_lattice"
    37.6    assumes M: "\<And>i. i \<in> I \<Longrightarrow> sup_continuous (M i)"
    37.7 -  shows  "sup_continuous (SUP i:I. M i)"
    37.8 +  shows  "sup_continuous (SUP i\<in>I. M i)"
    37.9    unfolding sup_continuous_def by (auto simp add: sup_continuousD[OF M] intro: SUP_commute)
   37.10  
   37.11  lemma sup_continuous_apply_SUP[order_continuous_intros]:
   37.12    fixes M :: "_ \<Rightarrow> _ \<Rightarrow> 'a::complete_lattice"
   37.13 -  shows "(\<And>i. i \<in> I \<Longrightarrow> sup_continuous (M i)) \<Longrightarrow> sup_continuous (\<lambda>x. SUP i:I. M i x)"
   37.14 +  shows "(\<And>i. i \<in> I \<Longrightarrow> sup_continuous (M i)) \<Longrightarrow> sup_continuous (\<lambda>x. SUP i\<in>I. M i x)"
   37.15    unfolding SUP_apply[symmetric] by (rule sup_continuous_SUP)
   37.16  
   37.17  lemma sup_continuous_lfp'[order_continuous_intros]:
   37.18 @@ -145,7 +145,7 @@
   37.19  qed
   37.20  
   37.21  lemma mono_INF_fun:
   37.22 -    "(\<And>x y. mono (F x y)) \<Longrightarrow> mono (\<lambda>z x. INF y : X x. F x y z :: 'a :: complete_lattice)"
   37.23 +    "(\<And>x y. mono (F x y)) \<Longrightarrow> mono (\<lambda>z x. INF y \<in> X x. F x y z :: 'a :: complete_lattice)"
   37.24    by (auto intro!: INF_mono[OF bexI] simp: le_fun_def mono_def)
   37.25  
   37.26  lemma continuous_on_max:
   37.27 @@ -160,22 +160,22 @@
   37.28  
   37.29  lemma real_of_nat_Sup:
   37.30    assumes "A \<noteq> {}" "bdd_above A"
   37.31 -  shows "of_nat (Sup A) = (SUP a:A. of_nat a :: real)"
   37.32 +  shows "of_nat (Sup A) = (SUP a\<in>A. of_nat a :: real)"
   37.33  proof (intro antisym)
   37.34 -  show "(SUP a:A. of_nat a::real) \<le> of_nat (Sup A)"
   37.35 +  show "(SUP a\<in>A. of_nat a::real) \<le> of_nat (Sup A)"
   37.36      using assms by (intro cSUP_least of_nat_mono) (auto intro: cSup_upper)
   37.37    have "Sup A \<in> A"
   37.38      unfolding Sup_nat_def using assms by (intro Max_in) (auto simp: bdd_above_nat)
   37.39 -  then show "of_nat (Sup A) \<le> (SUP a:A. of_nat a::real)"
   37.40 +  then show "of_nat (Sup A) \<le> (SUP a\<in>A. of_nat a::real)"
   37.41      by (intro cSUP_upper bdd_above_image_mono assms) (auto simp: mono_def)
   37.42  qed
   37.43  
   37.44  lemma (in complete_lattice) SUP_sup_const1:
   37.45 -  "I \<noteq> {} \<Longrightarrow> (SUP i:I. sup c (f i)) = sup c (SUP i:I. f i)"
   37.46 +  "I \<noteq> {} \<Longrightarrow> (SUP i\<in>I. sup c (f i)) = sup c (SUP i\<in>I. f i)"
   37.47    using SUP_sup_distrib[of "\<lambda>_. c" I f] by simp
   37.48  
   37.49  lemma (in complete_lattice) SUP_sup_const2:
   37.50 -  "I \<noteq> {} \<Longrightarrow> (SUP i:I. sup (f i) c) = sup (SUP i:I. f i) c"
   37.51 +  "I \<noteq> {} \<Longrightarrow> (SUP i\<in>I. sup (f i) c) = sup (SUP i\<in>I. f i) c"
   37.52    using SUP_sup_distrib[of f I "\<lambda>_. c"] by simp
   37.53  
   37.54  lemma one_less_of_natD:
   37.55 @@ -350,7 +350,7 @@
   37.56  
   37.57  lemma rel_fun_limsup[transfer_rule]: "rel_fun (rel_fun (=) pcr_ennreal) pcr_ennreal limsup limsup"
   37.58  proof -
   37.59 -  have "rel_fun (rel_fun (=) pcr_ennreal) pcr_ennreal (\<lambda>x. INF n. sup 0 (SUP i:{n..}. x i)) limsup"
   37.60 +  have "rel_fun (rel_fun (=) pcr_ennreal) pcr_ennreal (\<lambda>x. INF n. sup 0 (SUP i\<in>{n..}. x i)) limsup"
   37.61      unfolding limsup_INF_SUP[abs_def] by (transfer_prover_start, transfer_step+; simp)
   37.62    then show ?thesis
   37.63      unfolding limsup_INF_SUP[abs_def]
   37.64 @@ -1140,13 +1140,13 @@
   37.65  lemma of_nat_less_ennreal_of_nat[simp]: "of_nat n \<le> ennreal_of_enat x \<longleftrightarrow> of_nat n \<le> x"
   37.66    by (cases x) (auto simp: of_nat_eq_enat)
   37.67  
   37.68 -lemma ennreal_of_enat_Sup: "ennreal_of_enat (Sup X) = (SUP x:X. ennreal_of_enat x)"
   37.69 +lemma ennreal_of_enat_Sup: "ennreal_of_enat (Sup X) = (SUP x\<in>X. ennreal_of_enat x)"
   37.70  proof -
   37.71 -  have "ennreal_of_enat (Sup X) \<le> (SUP x : X. ennreal_of_enat x)"
   37.72 +  have "ennreal_of_enat (Sup X) \<le> (SUP x \<in> X. ennreal_of_enat x)"
   37.73      unfolding Sup_enat_def
   37.74    proof (clarsimp, intro conjI impI)
   37.75      fix x assume "finite X" "X \<noteq> {}"
   37.76 -    then show "ennreal_of_enat (Max X) \<le> (SUP x : X. ennreal_of_enat x)"
   37.77 +    then show "ennreal_of_enat (Max X) \<le> (SUP x \<in> X. ennreal_of_enat x)"
   37.78        by (intro SUP_upper Max_in)
   37.79    next
   37.80      assume "infinite X" "X \<noteq> {}"
   37.81 @@ -1162,9 +1162,9 @@
   37.82        with x show ?thesis
   37.83          by (auto intro!: bexI[of _ x] less_le_trans[OF n])
   37.84      qed
   37.85 -    then have "(SUP x : X. ennreal_of_enat x) = top"
   37.86 +    then have "(SUP x \<in> X. ennreal_of_enat x) = top"
   37.87        by simp
   37.88 -    then show "top \<le> (SUP x : X. ennreal_of_enat x)"
   37.89 +    then show "top \<le> (SUP x \<in> X. ennreal_of_enat x)"
   37.90        unfolding top_unique by simp
   37.91    qed
   37.92    then show ?thesis
   37.93 @@ -1395,7 +1395,7 @@
   37.94  lemma ennreal_suminf_SUP_eq_directed:
   37.95    fixes f :: "'a \<Rightarrow> nat \<Rightarrow> ennreal"
   37.96    assumes *: "\<And>N i j. i \<in> I \<Longrightarrow> j \<in> I \<Longrightarrow> finite N \<Longrightarrow> \<exists>k\<in>I. \<forall>n\<in>N. f i n \<le> f k n \<and> f j n \<le> f k n"
   37.97 -  shows "(\<Sum>n. SUP i:I. f i n) = (SUP i:I. \<Sum>n. f i n)"
   37.98 +  shows "(\<Sum>n. SUP i\<in>I. f i n) = (SUP i\<in>I. \<Sum>n. f i n)"
   37.99  proof cases
  37.100    assume "I \<noteq> {}"
  37.101    then obtain i where "i \<in> I" by auto
  37.102 @@ -1417,16 +1417,16 @@
  37.103    shows "(INF i. c + f i) = c + (INF i. f i)"
  37.104    using INF_ennreal_add_const[of f c] by (simp add: ac_simps)
  37.105  
  37.106 -lemma SUP_mult_left_ennreal: "c * (SUP i:I. f i) = (SUP i:I. c * f i ::ennreal)"
  37.107 +lemma SUP_mult_left_ennreal: "c * (SUP i\<in>I. f i) = (SUP i\<in>I. c * f i ::ennreal)"
  37.108  proof cases
  37.109    assume "I \<noteq> {}" then show ?thesis
  37.110      by transfer (auto simp add: SUP_ereal_mult_left max_absorb2 SUP_upper2)
  37.111  qed (simp add: bot_ennreal)
  37.112  
  37.113 -lemma SUP_mult_right_ennreal: "(SUP i:I. f i) * c = (SUP i:I. f i * c ::ennreal)"
  37.114 +lemma SUP_mult_right_ennreal: "(SUP i\<in>I. f i) * c = (SUP i\<in>I. f i * c ::ennreal)"
  37.115    using SUP_mult_left_ennreal by (simp add: mult.commute)
  37.116  
  37.117 -lemma SUP_divide_ennreal: "(SUP i:I. f i) / c = (SUP i:I. f i / c ::ennreal)"
  37.118 +lemma SUP_divide_ennreal: "(SUP i\<in>I. f i) / c = (SUP i\<in>I. f i / c ::ennreal)"
  37.119    using SUP_mult_right_ennreal by (simp add: divide_ennreal_def)
  37.120  
  37.121  lemma ennreal_SUP_of_nat_eq_top: "(SUP x. of_nat x :: ennreal) = top"
  37.122 @@ -1442,9 +1442,9 @@
  37.123  lemma ennreal_SUP_eq_top:
  37.124    fixes f :: "'a \<Rightarrow> ennreal"
  37.125    assumes "\<And>n. \<exists>i\<in>I. of_nat n \<le> f i"
  37.126 -  shows "(SUP i : I. f i) = top"
  37.127 +  shows "(SUP i \<in> I. f i) = top"
  37.128  proof -
  37.129 -  have "(SUP x. of_nat x :: ennreal) \<le> (SUP i : I. f i)"
  37.130 +  have "(SUP x. of_nat x :: ennreal) \<le> (SUP i \<in> I. f i)"
  37.131      using assms by (auto intro!: SUP_least intro: SUP_upper2)
  37.132    then show ?thesis
  37.133      by (auto simp: ennreal_SUP_of_nat_eq_top top_unique)
  37.134 @@ -1452,19 +1452,19 @@
  37.135  
  37.136  lemma ennreal_INF_const_minus:
  37.137    fixes f :: "'a \<Rightarrow> ennreal"
  37.138 -  shows "I \<noteq> {} \<Longrightarrow> (SUP x:I. c - f x) = c - (INF x:I. f x)"
  37.139 +  shows "I \<noteq> {} \<Longrightarrow> (SUP x\<in>I. c - f x) = c - (INF x\<in>I. f x)"
  37.140    by (transfer fixing: I)
  37.141       (simp add: sup_max[symmetric] SUP_sup_const1 SUP_ereal_minus_right del: sup_ereal_def)
  37.142  
  37.143  lemma of_nat_Sup_ennreal:
  37.144    assumes "A \<noteq> {}" "bdd_above A"
  37.145 -  shows "of_nat (Sup A) = (SUP a:A. of_nat a :: ennreal)"
  37.146 +  shows "of_nat (Sup A) = (SUP a\<in>A. of_nat a :: ennreal)"
  37.147  proof (intro antisym)
  37.148 -  show "(SUP a:A. of_nat a::ennreal) \<le> of_nat (Sup A)"
  37.149 +  show "(SUP a\<in>A. of_nat a::ennreal) \<le> of_nat (Sup A)"
  37.150      by (intro SUP_least of_nat_mono) (auto intro: cSup_upper assms)
  37.151    have "Sup A \<in> A"
  37.152      unfolding Sup_nat_def using assms by (intro Max_in) (auto simp: bdd_above_nat)
  37.153 -  then show "of_nat (Sup A) \<le> (SUP a:A. of_nat a::ennreal)"
  37.154 +  then show "of_nat (Sup A) \<le> (SUP a\<in>A. of_nat a::ennreal)"
  37.155      by (intro SUP_upper)
  37.156  qed
  37.157  
  37.158 @@ -1601,18 +1601,18 @@
  37.159  lemma SUP_sup_continuous_ennreal:
  37.160    fixes f :: "ennreal \<Rightarrow> 'a::complete_lattice"
  37.161    assumes f: "sup_continuous f" and "I \<noteq> {}"
  37.162 -  shows "(SUP i:I. f (g i)) = f (SUP i:I. g i)"
  37.163 +  shows "(SUP i\<in>I. f (g i)) = f (SUP i\<in>I. g i)"
  37.164  proof (rule antisym)
  37.165 -  show "(SUP i:I. f (g i)) \<le> f (SUP i:I. g i)"
  37.166 +  show "(SUP i\<in>I. f (g i)) \<le> f (SUP i\<in>I. g i)"
  37.167      by (rule mono_SUP[OF sup_continuous_mono[OF f]])
  37.168    from ennreal_Sup_countable_SUP[of "g`I"] \<open>I \<noteq> {}\<close>
  37.169 -  obtain M :: "nat \<Rightarrow> ennreal" where "incseq M" and M: "range M \<subseteq> g ` I" and eq: "(SUP i : I. g i) = (SUP i. M i)"
  37.170 +  obtain M :: "nat \<Rightarrow> ennreal" where "incseq M" and M: "range M \<subseteq> g ` I" and eq: "(SUP i \<in> I. g i) = (SUP i. M i)"
  37.171      by auto
  37.172 -  have "f (SUP i : I. g i) = (SUP i : range M. f i)"
  37.173 +  have "f (SUP i \<in> I. g i) = (SUP i \<in> range M. f i)"
  37.174      unfolding eq sup_continuousD[OF f \<open>mono M\<close>] by simp
  37.175 -  also have "\<dots> \<le> (SUP i : I. f (g i))"
  37.176 +  also have "\<dots> \<le> (SUP i \<in> I. f (g i))"
  37.177      by (insert M, drule SUP_subset_mono) auto
  37.178 -  finally show "f (SUP i : I. g i) \<le> (SUP i : I. f (g i))" .
  37.179 +  finally show "f (SUP i \<in> I. g i) \<le> (SUP i \<in> I. f (g i))" .
  37.180  qed
  37.181  
  37.182  lemma ennreal_suminf_SUP_eq:
  37.183 @@ -1625,7 +1625,7 @@
  37.184  
  37.185  lemma ennreal_SUP_add_left:
  37.186    fixes c :: ennreal
  37.187 -  shows "I \<noteq> {} \<Longrightarrow> (SUP i:I. f i + c) = (SUP i:I. f i) + c"
  37.188 +  shows "I \<noteq> {} \<Longrightarrow> (SUP i\<in>I. f i + c) = (SUP i\<in>I. f i) + c"
  37.189    apply transfer
  37.190    apply (simp add: SUP_ereal_add_left)
  37.191    apply (subst (1 2) max.absorb2)
  37.192 @@ -1634,7 +1634,7 @@
  37.193  
  37.194  lemma ennreal_SUP_const_minus: (* TODO: rename: ennreal_SUP_const_minus *)
  37.195    fixes f :: "'a \<Rightarrow> ennreal"
  37.196 -  shows "I \<noteq> {} \<Longrightarrow> c < top \<Longrightarrow> (INF x:I. c - f x) = c - (SUP x:I. f x)"
  37.197 +  shows "I \<noteq> {} \<Longrightarrow> c < top \<Longrightarrow> (INF x\<in>I. c - f x) = c - (SUP x\<in>I. f x)"
  37.198    apply (transfer fixing: I)
  37.199    unfolding ex_in_conv[symmetric]
  37.200    apply (auto simp add: sup_max[symmetric] SUP_upper2 sup_absorb2
  37.201 @@ -1648,11 +1648,11 @@
  37.202  lemma INF_approx_ennreal:
  37.203    fixes x::ennreal and e::real
  37.204    assumes "e > 0"
  37.205 -  assumes INF: "x = (INF i : A. f i)"
  37.206 +  assumes INF: "x = (INF i \<in> A. f i)"
  37.207    assumes "x \<noteq> \<infinity>"
  37.208    shows "\<exists>i \<in> A. f i < x + e"
  37.209  proof -
  37.210 -  have "(INF i : A. f i) < x + e"
  37.211 +  have "(INF i \<in> A. f i) < x + e"
  37.212      unfolding INF[symmetric] using \<open>0<e\<close> \<open>x \<noteq> \<infinity>\<close> by (cases x) auto
  37.213    then show ?thesis
  37.214      unfolding INF_less_iff .
  37.215 @@ -1661,13 +1661,13 @@
  37.216  lemma SUP_approx_ennreal:
  37.217    fixes x::ennreal and e::real
  37.218    assumes "e > 0" "A \<noteq> {}"
  37.219 -  assumes SUP: "x = (SUP i : A. f i)"
  37.220 +  assumes SUP: "x = (SUP i \<in> A. f i)"
  37.221    assumes "x \<noteq> \<infinity>"
  37.222    shows "\<exists>i \<in> A. x < f i + e"
  37.223  proof -
  37.224    have "x < x + e"
  37.225      using \<open>0<e\<close> \<open>x \<noteq> \<infinity>\<close> by (cases x) auto
  37.226 -  also have "x + e = (SUP i : A. f i + e)"
  37.227 +  also have "x + e = (SUP i \<in> A. f i + e)"
  37.228      unfolding SUP ennreal_SUP_add_left[OF \<open>A \<noteq> {}\<close>] ..
  37.229    finally show ?thesis
  37.230      unfolding less_SUP_iff .
  37.231 @@ -1677,17 +1677,17 @@
  37.232    fixes x::ennreal
  37.233    assumes f_bound: "\<And>i. i \<in> A \<Longrightarrow> f i \<le> x"
  37.234    assumes approx: "\<And>e. (e::real) > 0 \<Longrightarrow> \<exists>i \<in> A. x \<le> f i + e"
  37.235 -  shows "x = (SUP i : A. f i)"
  37.236 +  shows "x = (SUP i \<in> A. f i)"
  37.237  proof (rule antisym)
  37.238 -  show "x \<le> (SUP i:A. f i)"
  37.239 +  show "x \<le> (SUP i\<in>A. f i)"
  37.240    proof (rule ennreal_le_epsilon)
  37.241      fix e :: real assume "0 < e"
  37.242      from approx[OF this] guess i ..
  37.243      then have "x \<le> f i + e"
  37.244        by simp
  37.245 -    also have "\<dots> \<le> (SUP i:A. f i) + e"
  37.246 +    also have "\<dots> \<le> (SUP i\<in>A. f i) + e"
  37.247        by (intro add_mono \<open>i \<in> A\<close> SUP_upper order_refl)
  37.248 -    finally show "x \<le> (SUP i:A. f i) + e" .
  37.249 +    finally show "x \<le> (SUP i\<in>A. f i) + e" .
  37.250    qed
  37.251  qed (intro SUP_least f_bound)
  37.252  
  37.253 @@ -1695,17 +1695,17 @@
  37.254    fixes x::ennreal
  37.255    assumes f_bound: "\<And>i. i \<in> A \<Longrightarrow> x \<le> f i"
  37.256    assumes approx: "\<And>e. (e::real) > 0 \<Longrightarrow> \<exists>i \<in> A. f i \<le> x + e"
  37.257 -  shows "x = (INF i : A. f i)"
  37.258 +  shows "x = (INF i \<in> A. f i)"
  37.259  proof (rule antisym)
  37.260 -  show "(INF i:A. f i) \<le> x"
  37.261 +  show "(INF i\<in>A. f i) \<le> x"
  37.262    proof (rule ennreal_le_epsilon)
  37.263      fix e :: real assume "0 < e"
  37.264      from approx[OF this] guess i .. note i = this
  37.265 -    then have "(INF i:A. f i) \<le> f i"
  37.266 +    then have "(INF i\<in>A. f i) \<le> f i"
  37.267        by (intro INF_lower)
  37.268      also have "\<dots> \<le> x + e"
  37.269        by fact
  37.270 -    finally show "(INF i:A. f i) \<le> x + e" .
  37.271 +    finally show "(INF i\<in>A. f i) \<le> x + e" .
  37.272    qed
  37.273  qed (intro INF_greatest f_bound)
  37.274  
  37.275 @@ -1786,7 +1786,7 @@
  37.276    by (cases "0 \<le> x") (auto simp: ennreal_neg ennreal_less_iff simp flip: ennreal_1)
  37.277  
  37.278  lemma SUP_const_minus_ennreal:
  37.279 -  fixes f :: "'a \<Rightarrow> ennreal" shows "I \<noteq> {} \<Longrightarrow> (SUP x:I. c - f x) = c - (INF x:I. f x)"
  37.280 +  fixes f :: "'a \<Rightarrow> ennreal" shows "I \<noteq> {} \<Longrightarrow> (SUP x\<in>I. c - f x) = c - (INF x\<in>I. f x)"
  37.281    including ennreal.lifting
  37.282    by (transfer fixing: I)
  37.283       (simp add: SUP_sup_distrib[symmetric] SUP_ereal_minus_right
  37.284 @@ -1929,18 +1929,18 @@
  37.285    done
  37.286  
  37.287  lemma SUP_diff_ennreal:
  37.288 -  "c < top \<Longrightarrow> (SUP i:I. f i - c :: ennreal) = (SUP i:I. f i) - c"
  37.289 +  "c < top \<Longrightarrow> (SUP i\<in>I. f i - c :: ennreal) = (SUP i\<in>I. f i) - c"
  37.290    by (auto intro!: SUP_eqI ennreal_minus_mono SUP_least intro: SUP_upper
  37.291             simp: ennreal_minus_cancel_iff ennreal_minus_le_iff less_top[symmetric])
  37.292  
  37.293  lemma ennreal_SUP_add_right:
  37.294 -  fixes c :: ennreal shows "I \<noteq> {} \<Longrightarrow> c + (SUP i:I. f i) = (SUP i:I. c + f i)"
  37.295 +  fixes c :: ennreal shows "I \<noteq> {} \<Longrightarrow> c + (SUP i\<in>I. f i) = (SUP i\<in>I. c + f i)"
  37.296    using ennreal_SUP_add_left[of I f c] by (simp add: add.commute)
  37.297  
  37.298  lemma SUP_add_directed_ennreal:
  37.299    fixes f g :: "_ \<Rightarrow> ennreal"
  37.300    assumes directed: "\<And>i j. i \<in> I \<Longrightarrow> j \<in> I \<Longrightarrow> \<exists>k\<in>I. f i + g j \<le> f k + g k"
  37.301 -  shows "(SUP i:I. f i + g i) = (SUP i:I. f i) + (SUP i:I. g i)"
  37.302 +  shows "(SUP i\<in>I. f i + g i) = (SUP i\<in>I. f i) + (SUP i\<in>I. g i)"
  37.303  proof cases
  37.304    assume "I = {}" then show ?thesis
  37.305      by (simp add: bot_ereal_def)
  37.306 @@ -1948,16 +1948,16 @@
  37.307    assume "I \<noteq> {}"
  37.308    show ?thesis
  37.309    proof (rule antisym)
  37.310 -    show "(SUP i:I. f i + g i) \<le> (SUP i:I. f i) + (SUP i:I. g i)"
  37.311 +    show "(SUP i\<in>I. f i + g i) \<le> (SUP i\<in>I. f i) + (SUP i\<in>I. g i)"
  37.312        by (rule SUP_least; intro add_mono SUP_upper)
  37.313    next
  37.314 -    have "(SUP i:I. f i) + (SUP i:I. g i) = (SUP i:I. f i + (SUP i:I. g i))"
  37.315 +    have "(SUP i\<in>I. f i) + (SUP i\<in>I. g i) = (SUP i\<in>I. f i + (SUP i\<in>I. g i))"
  37.316        by (intro ennreal_SUP_add_left[symmetric] \<open>I \<noteq> {}\<close>)
  37.317 -    also have "\<dots> = (SUP i:I. (SUP j:I. f i + g j))"
  37.318 +    also have "\<dots> = (SUP i\<in>I. (SUP j\<in>I. f i + g j))"
  37.319        by (intro SUP_cong refl ennreal_SUP_add_right \<open>I \<noteq> {}\<close>)
  37.320 -    also have "\<dots> \<le> (SUP i:I. f i + g i)"
  37.321 +    also have "\<dots> \<le> (SUP i\<in>I. f i + g i)"
  37.322        using directed by (intro SUP_least) (blast intro: SUP_upper2)
  37.323 -    finally show "(SUP i:I. f i) + (SUP i:I. g i) \<le> (SUP i:I. f i + g i)" .
  37.324 +    finally show "(SUP i\<in>I. f i) + (SUP i\<in>I. g i) \<le> (SUP i\<in>I. f i + g i)" .
  37.325    qed
  37.326  qed
  37.327  
    38.1 --- a/src/HOL/Library/Extended_Real.thy	Wed Nov 07 23:03:45 2018 +0100
    38.2 +++ b/src/HOL/Library/Extended_Real.thy	Thu Nov 08 09:11:52 2018 +0100
    38.3 @@ -2149,23 +2149,23 @@
    38.4    unfolding continuous_def by auto
    38.5  
    38.6  lemma ereal_Sup:
    38.7 -  assumes *: "\<bar>SUP a:A. ereal a\<bar> \<noteq> \<infinity>"
    38.8 -  shows "ereal (Sup A) = (SUP a:A. ereal a)"
    38.9 +  assumes *: "\<bar>SUP a\<in>A. ereal a\<bar> \<noteq> \<infinity>"
   38.10 +  shows "ereal (Sup A) = (SUP a\<in>A. ereal a)"
   38.11  proof (rule continuous_at_Sup_mono)
   38.12 -  obtain r where r: "ereal r = (SUP a:A. ereal a)" "A \<noteq> {}"
   38.13 +  obtain r where r: "ereal r = (SUP a\<in>A. ereal a)" "A \<noteq> {}"
   38.14      using * by (force simp: bot_ereal_def)
   38.15    then show "bdd_above A" "A \<noteq> {}"
   38.16      by (auto intro!: SUP_upper bdd_aboveI[of _ r] simp flip: ereal_less_eq)
   38.17  qed (auto simp: mono_def continuous_at_imp_continuous_at_within continuous_at_ereal)
   38.18  
   38.19 -lemma ereal_SUP: "\<bar>SUP a:A. ereal (f a)\<bar> \<noteq> \<infinity> \<Longrightarrow> ereal (SUP a:A. f a) = (SUP a:A. ereal (f a))"
   38.20 +lemma ereal_SUP: "\<bar>SUP a\<in>A. ereal (f a)\<bar> \<noteq> \<infinity> \<Longrightarrow> ereal (SUP a\<in>A. f a) = (SUP a\<in>A. ereal (f a))"
   38.21    using ereal_Sup[of "f`A"] by auto
   38.22  
   38.23  lemma ereal_Inf:
   38.24 -  assumes *: "\<bar>INF a:A. ereal a\<bar> \<noteq> \<infinity>"
   38.25 -  shows "ereal (Inf A) = (INF a:A. ereal a)"
   38.26 +  assumes *: "\<bar>INF a\<in>A. ereal a\<bar> \<noteq> \<infinity>"
   38.27 +  shows "ereal (Inf A) = (INF a\<in>A. ereal a)"
   38.28  proof (rule continuous_at_Inf_mono)
   38.29 -  obtain r where r: "ereal r = (INF a:A. ereal a)" "A \<noteq> {}"
   38.30 +  obtain r where r: "ereal r = (INF a\<in>A. ereal a)" "A \<noteq> {}"
   38.31      using * by (force simp: top_ereal_def)
   38.32    then show "bdd_below A" "A \<noteq> {}"
   38.33      by (auto intro!: INF_lower bdd_belowI[of _ r] simp flip: ereal_less_eq)
   38.34 @@ -2173,17 +2173,17 @@
   38.35  
   38.36  lemma ereal_Inf':
   38.37    assumes *: "bdd_below A" "A \<noteq> {}"
   38.38 -  shows "ereal (Inf A) = (INF a:A. ereal a)"
   38.39 +  shows "ereal (Inf A) = (INF a\<in>A. ereal a)"
   38.40  proof (rule ereal_Inf)
   38.41    from * obtain l u where "x \<in> A \<Longrightarrow> l \<le> x" "u \<in> A" for x
   38.42      by (auto simp: bdd_below_def)
   38.43 -  then have "l \<le> (INF x:A. ereal x)" "(INF x:A. ereal x) \<le> u"
   38.44 +  then have "l \<le> (INF x\<in>A. ereal x)" "(INF x\<in>A. ereal x) \<le> u"
   38.45      by (auto intro!: INF_greatest INF_lower)
   38.46 -  then show "\<bar>INF a:A. ereal a\<bar> \<noteq> \<infinity>"
   38.47 +  then show "\<bar>INF a\<in>A. ereal a\<bar> \<noteq> \<infinity>"
   38.48      by auto
   38.49  qed
   38.50  
   38.51 -lemma ereal_INF: "\<bar>INF a:A. ereal (f a)\<bar> \<noteq> \<infinity> \<Longrightarrow> ereal (INF a:A. f a) = (INF a:A. ereal (f a))"
   38.52 +lemma ereal_INF: "\<bar>INF a\<in>A. ereal (f a)\<bar> \<noteq> \<infinity> \<Longrightarrow> ereal (INF a\<in>A. f a) = (INF a\<in>A. ereal (f a))"
   38.53    using ereal_Inf[of "f`A"] by auto
   38.54  
   38.55  lemma ereal_Sup_uminus_image_eq: "Sup (uminus ` S::ereal set) = - Inf S"
   38.56 @@ -2193,7 +2193,7 @@
   38.57  
   38.58  lemma ereal_SUP_uminus_eq:
   38.59    fixes f :: "'a \<Rightarrow> ereal"
   38.60 -  shows "(SUP x:S. uminus (f x)) = - (INF x:S. f x)"
   38.61 +  shows "(SUP x\<in>S. uminus (f x)) = - (INF x\<in>S. f x)"
   38.62    using ereal_Sup_uminus_image_eq [of "f ` S"] by (simp add: comp_def)
   38.63  
   38.64  lemma ereal_inj_on_uminus[intro, simp]: "inj_on uminus (A :: ereal set)"
   38.65 @@ -2204,12 +2204,12 @@
   38.66  
   38.67  lemma ereal_INF_uminus_eq:
   38.68    fixes f :: "'a \<Rightarrow> ereal"
   38.69 -  shows "(INF x:S. - f x) = - (SUP x:S. f x)"
   38.70 +  shows "(INF x\<in>S. - f x) = - (SUP x\<in>S. f x)"
   38.71    using ereal_Inf_uminus_image_eq [of "f ` S"] by (simp add: comp_def)
   38.72  
   38.73  lemma ereal_SUP_uminus:
   38.74    fixes f :: "'a \<Rightarrow> ereal"
   38.75 -  shows "(SUP i : R. - f i) = - (INF i : R. f i)"
   38.76 +  shows "(SUP i \<in> R. - f i) = - (INF i \<in> R. f i)"
   38.77    using ereal_Sup_uminus_image_eq[of "f`R"]
   38.78    by (simp add: image_image)
   38.79  
   38.80 @@ -2278,17 +2278,17 @@
   38.81  qed
   38.82  
   38.83  lemma SUP_PInfty:
   38.84 -  "(\<And>n::nat. \<exists>i\<in>A. ereal (real n) \<le> f i) \<Longrightarrow> (SUP i:A. f i :: ereal) = \<infinity>"
   38.85 +  "(\<And>n::nat. \<exists>i\<in>A. ereal (real n) \<le> f i) \<Longrightarrow> (SUP i\<in>A. f i :: ereal) = \<infinity>"
   38.86    unfolding top_ereal_def[symmetric] SUP_eq_top_iff
   38.87    by (metis MInfty_neq_PInfty(2) PInfty_neq_ereal(2) less_PInf_Ex_of_nat less_ereal.elims(2) less_le_trans)
   38.88  
   38.89 -lemma SUP_nat_Infty: "(SUP i::nat. ereal (real i)) = \<infinity>"
   38.90 +lemma SUP_nat_Infty: "(SUP i. ereal (real i)) = \<infinity>"
   38.91    by (rule SUP_PInfty) auto
   38.92  
   38.93  lemma SUP_ereal_add_left:
   38.94    assumes "I \<noteq> {}" "c \<noteq> -\<infinity>"
   38.95 -  shows "(SUP i:I. f i + c :: ereal) = (SUP i:I. f i) + c"
   38.96 -proof (cases "(SUP i:I. f i) = - \<infinity>")
   38.97 +  shows "(SUP i\<in>I. f i + c :: ereal) = (SUP i\<in>I. f i) + c"
   38.98 +proof (cases "(SUP i\<in>I. f i) = - \<infinity>")
   38.99    case True
  38.100    then have "\<And>i. i \<in> I \<Longrightarrow> f i = -\<infinity>"
  38.101      unfolding Sup_eq_MInfty by auto
  38.102 @@ -2303,23 +2303,23 @@
  38.103  
  38.104  lemma SUP_ereal_add_right:
  38.105    fixes c :: ereal
  38.106 -  shows "I \<noteq> {} \<Longrightarrow> c \<noteq> -\<infinity> \<Longrightarrow> (SUP i:I. c + f i) = c + (SUP i:I. f i)"
  38.107 +  shows "I \<noteq> {} \<Longrightarrow> c \<noteq> -\<infinity> \<Longrightarrow> (SUP i\<in>I. c + f i) = c + (SUP i\<in>I. f i)"
  38.108    using SUP_ereal_add_left[of I c f] by (simp add: add.commute)
  38.109  
  38.110  lemma SUP_ereal_minus_right:
  38.111    assumes "I \<noteq> {}" "c \<noteq> -\<infinity>"
  38.112 -  shows "(SUP i:I. c - f i :: ereal) = c - (INF i:I. f i)"
  38.113 +  shows "(SUP i\<in>I. c - f i :: ereal) = c - (INF i\<in>I. f i)"
  38.114    using SUP_ereal_add_right[OF assms, of "\<lambda>i. - f i"]
  38.115    by (simp add: ereal_SUP_uminus minus_ereal_def)
  38.116  
  38.117  lemma SUP_ereal_minus_left:
  38.118    assumes "I \<noteq> {}" "c \<noteq> \<infinity>"
  38.119 -  shows "(SUP i:I. f i - c:: ereal) = (SUP i:I. f i) - c"
  38.120 +  shows "(SUP i\<in>I. f i - c:: ereal) = (SUP i\<in>I. f i) - c"
  38.121    using SUP_ereal_add_left[OF \<open>I \<noteq> {}\<close>, of "-c" f] by (simp add: \<open>c \<noteq> \<infinity>\<close> minus_ereal_def)
  38.122  
  38.123  lemma INF_ereal_minus_right:
  38.124    assumes "I \<noteq> {}" and "\<bar>c\<bar> \<noteq> \<infinity>"
  38.125 -  shows "(INF i:I. c - f i) = c - (SUP i:I. f i::ereal)"
  38.126 +  shows "(INF i\<in>I. c - f i) = c - (SUP i\<in>I. f i::ereal)"
  38.127  proof -
  38.128    { fix b have "(-c) + b = - (c - b)"
  38.129        using \<open>\<bar>c\<bar> \<noteq> \<infinity>\<close> by (cases c b rule: ereal2_cases) auto }
  38.130 @@ -2339,7 +2339,7 @@
  38.131  lemma SUP_combine:
  38.132    fixes f :: "'a::semilattice_sup \<Rightarrow> 'a::semilattice_sup \<Rightarrow> 'b::complete_lattice"
  38.133    assumes mono: "\<And>a b c d. a \<le> b \<Longrightarrow> c \<le> d \<Longrightarrow> f a c \<le> f b d"
  38.134 -  shows "(SUP i:UNIV. SUP j:UNIV. f i j) = (SUP i. f i i)"
  38.135 +  shows "(SUP i\<in>UNIV. SUP j\<in>UNIV. f i j) = (SUP i. f i i)"
  38.136  proof (rule antisym)
  38.137    show "(SUP i j. f i j) \<le> (SUP i. f i i)"
  38.138      by (rule SUP_least SUP_upper2[where i="sup i j" for i j] UNIV_I mono sup_ge1 sup_ge2)+
  38.139 @@ -2360,14 +2360,14 @@
  38.140    apply (rule SUP_combine[symmetric] add_mono inc[THEN monoD] | assumption)+
  38.141    done
  38.142  
  38.143 -lemma INF_eq_minf: "(INF i:I. f i::ereal) \<noteq> -\<infinity> \<longleftrightarrow> (\<exists>b>-\<infinity>. \<forall>i\<in>I. b \<le> f i)"
  38.144 +lemma INF_eq_minf: "(INF i\<in>I. f i::ereal) \<noteq> -\<infinity> \<longleftrightarrow> (\<exists>b>-\<infinity>. \<forall>i\<in>I. b \<le> f i)"
  38.145    unfolding bot_ereal_def[symmetric] INF_eq_bot_iff by (auto simp: not_less)
  38.146  
  38.147  lemma INF_ereal_add_left:
  38.148    assumes "I \<noteq> {}" "c \<noteq> -\<infinity>" "\<And>x. x \<in> I \<Longrightarrow> 0 \<le> f x"
  38.149 -  shows "(INF i:I. f i + c :: ereal) = (INF i:I. f i) + c"
  38.150 +  shows "(INF i\<in>I. f i + c :: ereal) = (INF i\<in>I. f i) + c"
  38.151  proof -
  38.152 -  have "(INF i:I. f i) \<noteq> -\<infinity>"
  38.153 +  have "(INF i\<in>I. f i) \<noteq> -\<infinity>"
  38.154      unfolding INF_eq_minf using assms by (intro exI[of _ 0]) auto
  38.155    then show ?thesis
  38.156      by (subst continuous_at_Inf_mono[where f="\<lambda>x. x + c"])
  38.157 @@ -2376,14 +2376,14 @@
  38.158  
  38.159  lemma INF_ereal_add_right:
  38.160    assumes "I \<noteq> {}" "c \<noteq> -\<infinity>" "\<And>x. x \<in> I \<Longrightarrow> 0 \<le> f x"
  38.161 -  shows "(INF i:I. c + f i :: ereal) = c + (INF i:I. f i)"
  38.162 +  shows "(INF i\<in>I. c + f i :: ereal) = c + (INF i\<in>I. f i)"
  38.163    using INF_ereal_add_left[OF assms] by (simp add: ac_simps)
  38.164  
  38.165  lemma INF_ereal_add_directed:
  38.166    fixes f g :: "'a \<Rightarrow> ereal"
  38.167    assumes nonneg: "\<And>i. i \<in> I \<Longrightarrow> 0 \<le> f i" "\<And>i. i \<in> I \<Longrightarrow> 0 \<le> g i"
  38.168    assumes directed: "\<And>i j. i \<in> I \<Longrightarrow> j \<in> I \<Longrightarrow> \<exists>k\<in>I. f i + g j \<ge> f k + g k"
  38.169 -  shows "(INF i:I. f i + g i) = (INF i:I. f i) + (INF i:I. g i)"
  38.170 +  shows "(INF i\<in>I. f i + g i) = (INF i\<in>I. f i) + (INF i\<in>I. g i)"
  38.171  proof cases
  38.172    assume "I = {}" then show ?thesis
  38.173      by (simp add: top_ereal_def)
  38.174 @@ -2391,16 +2391,16 @@
  38.175    assume "I \<noteq> {}"
  38.176    show ?thesis
  38.177    proof (rule antisym)
  38.178 -    show "(INF i:I. f i) + (INF i:I. g i) \<le> (INF i:I. f i + g i)"
  38.179 +    show "(INF i\<in>I. f i) + (INF i\<in>I. g i) \<le> (INF i\<in>I. f i + g i)"
  38.180        by (rule INF_greatest; intro add_mono INF_lower)
  38.181    next
  38.182 -    have "(INF i:I. f i + g i) \<le> (INF i:I. (INF j:I. f i + g j))"
  38.183 +    have "(INF i\<in>I. f i + g i) \<le> (INF i\<in>I. (INF j\<in>I. f i + g j))"
  38.184        using directed by (intro INF_greatest) (blast intro: INF_lower2)
  38.185 -    also have "\<dots> = (INF i:I. f i + (INF i:I. g i))"
  38.186 +    also have "\<dots> = (INF i\<in>I. f i + (INF i\<in>I. g i))"
  38.187        using nonneg by (intro INF_cong refl INF_ereal_add_right \<open>I \<noteq> {}\<close>) (auto simp: INF_eq_minf intro!: exI[of _ 0])
  38.188 -    also have "\<dots> = (INF i:I. f i) + (INF i:I. g i)"
  38.189 +    also have "\<dots> = (INF i\<in>I. f i) + (INF i\<in>I. g i)"
  38.190        using nonneg by (intro INF_ereal_add_left \<open>I \<noteq> {}\<close>) (auto simp: INF_eq_minf intro!: exI[of _ 0])
  38.191 -    finally show "(INF i:I. f i + g i) \<le> (INF i:I. f i) + (INF i:I. g i)" .
  38.192 +    finally show "(INF i\<in>I. f i + g i) \<le> (INF i\<in>I. f i) + (INF i\<in>I. g i)" .
  38.193    qed
  38.194  qed
  38.195  
  38.196 @@ -2454,8 +2454,8 @@
  38.197    fixes f :: "'a \<Rightarrow> ereal"
  38.198    assumes "I \<noteq> {}"
  38.199    assumes f: "\<And>i. i \<in> I \<Longrightarrow> 0 \<le> f i" and c: "0 \<le> c"
  38.200 -  shows "(SUP i:I. c * f i) = c * (SUP i:I. f i)"
  38.201 -proof (cases "(SUP i: I. f i) = 0")
  38.202 +  shows "(SUP i\<in>I. c * f i) = c * (SUP i\<in>I. f i)"
  38.203 +proof (cases "(SUP i \<in> I. f i) = 0")
  38.204    case True
  38.205    then have "\<And>i. i \<in> I \<Longrightarrow> f i = 0"
  38.206      by (metis SUP_upper f antisym)
  38.207 @@ -2595,9 +2595,9 @@
  38.208  by(cases n) simp_all
  38.209  
  38.210  lemma ereal_of_enat_Sup:
  38.211 -  assumes "A \<noteq> {}" shows "ereal_of_enat (Sup A) = (SUP a : A. ereal_of_enat a)"
  38.212 +  assumes "A \<noteq> {}" shows "ereal_of_enat (Sup A) = (SUP a \<in> A. ereal_of_enat a)"
  38.213  proof (intro antisym mono_Sup)
  38.214 -  show "ereal_of_enat (Sup A) \<le> (SUP a : A. ereal_of_enat a)"
  38.215 +  show "ereal_of_enat (Sup A) \<le> (SUP a \<in> A. ereal_of_enat a)"
  38.216    proof cases
  38.217      assume "finite A"
  38.218      with \<open>A \<noteq> {}\<close> obtain a where "a \<in> A" "ereal_of_enat (Sup A) = ereal_of_enat a"
  38.219 @@ -2606,7 +2606,7 @@
  38.220        by (auto intro: SUP_upper)
  38.221    next
  38.222      assume "\<not> finite A"
  38.223 -    have [simp]: "(SUP a : A. ereal_of_enat a) = top"
  38.224 +    have [simp]: "(SUP a \<in> A. ereal_of_enat a) = top"
  38.225        unfolding SUP_eq_top_iff
  38.226      proof safe
  38.227        fix x :: ereal assume "x < top"
  38.228 @@ -2626,7 +2626,7 @@
  38.229  qed (simp add: mono_def)
  38.230  
  38.231  lemma ereal_of_enat_SUP:
  38.232 -  "A \<noteq> {} \<Longrightarrow> ereal_of_enat (SUP a:A. f a) = (SUP a : A. ereal_of_enat (f a))"
  38.233 +  "A \<noteq> {} \<Longrightarrow> ereal_of_enat (SUP a\<in>A. f a) = (SUP a \<in> A. ereal_of_enat (f a))"
  38.234    using ereal_of_enat_Sup[of "f`A"] by auto
  38.235  
  38.236  subsection "Limits on @{typ ereal}"
  38.237 @@ -3225,43 +3225,43 @@
  38.238    let ?INF = "\<lambda>P g. INFIMUM (Collect P) g"
  38.239    show "?F \<noteq> {}"
  38.240      by (auto intro: eventually_True)
  38.241 -  show "(SUP P:?F. ?INF P g) \<noteq> - \<infinity>"
  38.242 +  show "(SUP P\<in>?F. ?INF P g) \<noteq> - \<infinity>"
  38.243      unfolding bot_ereal_def[symmetric] SUP_bot_conv INF_eq_bot_iff
  38.244      by (auto intro!: exI[of _ 0] ev simp: bot_ereal_def)
  38.245 -  have "(SUP P:?F. ?INF P f + (SUP P:?F. ?INF P g)) \<le> (SUP P:?F. (SUP P':?F. ?INF P f + ?INF P' g))"
  38.246 +  have "(SUP P\<in>?F. ?INF P f + (SUP P\<in>?F. ?INF P g)) \<le> (SUP P\<in>?F. (SUP P'\<in>?F. ?INF P f + ?INF P' g))"
  38.247    proof (safe intro!: SUP_mono bexI[of _ "\<lambda>x. P x \<and> 0 \<le> f x" for P])
  38.248      fix P let ?P' = "\<lambda>x. P x \<and> 0 \<le> f x"
  38.249      assume "eventually P F"
  38.250      with ev show "eventually ?P' F"
  38.251        by eventually_elim auto
  38.252 -    have "?INF P f + (SUP P:?F. ?INF P g) \<le> ?INF ?P' f + (SUP P:?F. ?INF P g)"
  38.253 +    have "?INF P f + (SUP P\<in>?F. ?INF P g) \<le> ?INF ?P' f + (SUP P\<in>?F. ?INF P g)"
  38.254        by (intro add_mono INF_mono) auto
  38.255 -    also have "\<dots> = (SUP P':?F. ?INF ?P' f + ?INF P' g)"
  38.256 +    also have "\<dots> = (SUP P'\<in>?F. ?INF ?P' f + ?INF P' g)"
  38.257      proof (rule SUP_ereal_add_right[symmetric])
  38.258        show "INFIMUM {x. P x \<and> 0 \<le> f x} f \<noteq> - \<infinity>"
  38.259          unfolding bot_ereal_def[symmetric] INF_eq_bot_iff
  38.260          by (auto intro!: exI[of _ 0] ev simp: bot_ereal_def)
  38.261      qed fact
  38.262 -    finally show "?INF P f + (SUP P:?F. ?INF P g) \<le> (SUP P':?F. ?INF ?P' f + ?INF P' g)" .
  38.263 +    finally show "?INF P f + (SUP P\<in>?F. ?INF P g) \<le> (SUP P'\<in>?F. ?INF ?P' f + ?INF P' g)" .
  38.264    qed
  38.265 -  also have "\<dots> \<le> (SUP P:?F. INF x:Collect P. f x + g x)"
  38.266 +  also have "\<dots> \<le> (SUP P\<in>?F. INF x\<in>Collect P. f x + g x)"
  38.267    proof (safe intro!: SUP_least)
  38.268      fix P Q assume *: "eventually P F" "eventually Q F"
  38.269 -    show "?INF P f + ?INF Q g \<le> (SUP P:?F. INF x:Collect P. f x + g x)"
  38.270 +    show "?INF P f + ?INF Q g \<le> (SUP P\<in>?F. INF x\<in>Collect P. f x + g x)"
  38.271      proof (rule SUP_upper2)
  38.272        show "(\<lambda>x. P x \<and> Q x) \<in> ?F"
  38.273          using * by (auto simp: eventually_conj)
  38.274 -      show "?INF P f + ?INF Q g \<le> (INF x:{x. P x \<and> Q x}. f x + g x)"
  38.275 +      show "?INF P f + ?INF Q g \<le> (INF x\<in>{x. P x \<and> Q x}. f x + g x)"
  38.276          by (intro INF_greatest add_mono) (auto intro: INF_lower)
  38.277      qed
  38.278    qed
  38.279 -  finally show "(SUP P:?F. ?INF P f + (SUP P:?F. ?INF P g)) \<le> (SUP P:?F. INF x:Collect P. f x + g x)" .
  38.280 +  finally show "(SUP P\<in>?F. ?INF P f + (SUP P\<in>?F. ?INF P g)) \<le> (SUP P\<in>?F. INF x\<in>Collect P. f x + g x)" .
  38.281  qed
  38.282  
  38.283  lemma Sup_ereal_mult_right':
  38.284    assumes nonempty: "Y \<noteq> {}"
  38.285    and x: "x \<ge> 0"
  38.286 -  shows "(SUP i:Y. f i) * ereal x = (SUP i:Y. f i * ereal x)" (is "?lhs = ?rhs")
  38.287 +  shows "(SUP i\<in>Y. f i) * ereal x = (SUP i\<in>Y. f i * ereal x)" (is "?lhs = ?rhs")
  38.288  proof(cases "x = 0")
  38.289    case True thus ?thesis by(auto simp add: nonempty zero_ereal_def[symmetric])
  38.290  next
  38.291 @@ -3271,8 +3271,8 @@
  38.292      show "?rhs \<le> ?lhs"
  38.293        by(rule SUP_least)(simp add: ereal_mult_right_mono SUP_upper x)
  38.294    next
  38.295 -    have "?lhs / ereal x = (SUP i:Y. f i) * (ereal x / ereal x)" by(simp only: ereal_times_divide_eq)
  38.296 -    also have "\<dots> = (SUP i:Y. f i)" using False by simp
  38.297 +    have "?lhs / ereal x = (SUP i\<in>Y. f i) * (ereal x / ereal x)" by(simp only: ereal_times_divide_eq)
  38.298 +    also have "\<dots> = (SUP i\<in>Y. f i)" using False by simp
  38.299      also have "\<dots> \<le> ?rhs / x"
  38.300      proof(rule SUP_least)
  38.301        fix i
  38.302 @@ -3292,7 +3292,7 @@
  38.303  qed
  38.304  
  38.305  lemma Sup_ereal_mult_left':
  38.306 -  "\<lbrakk> Y \<noteq> {}; x \<ge> 0 \<rbrakk> \<Longrightarrow> ereal x * (SUP i:Y. f i) = (SUP i:Y. ereal x * f i)"
  38.307 +  "\<lbrakk> Y \<noteq> {}; x \<ge> 0 \<rbrakk> \<Longrightarrow> ereal x * (SUP i\<in>Y. f i) = (SUP i\<in>Y. ereal x * f i)"
  38.308  by(subst (1 2) mult.commute)(rule Sup_ereal_mult_right')
  38.309  
  38.310  lemma sup_continuous_add[order_continuous_intros]:
  38.311 @@ -3676,7 +3676,7 @@
  38.312    fixes f g :: "'a \<Rightarrow> ereal"
  38.313    assumes nonneg: "\<And>i. i \<in> I \<Longrightarrow> 0 \<le> f i" "\<And>i. i \<in> I \<Longrightarrow> 0 \<le> g i"
  38.314    assumes directed: "\<And>i j. i \<in> I \<Longrightarrow> j \<in> I \<Longrightarrow> \<exists>k\<in>I. f i + g j \<le> f k + g k"
  38.315 -  shows "(SUP i:I. f i + g i) = (SUP i:I. f i) + (SUP i:I. g i)"
  38.316 +  shows "(SUP i\<in>I. f i + g i) = (SUP i\<in>I. f i) + (SUP i\<in>I. g i)"
  38.317  proof cases
  38.318    assume "I = {}" then show ?thesis
  38.319      by (simp add: bot_ereal_def)
  38.320 @@ -3684,18 +3684,18 @@
  38.321    assume "I \<noteq> {}"
  38.322    show ?thesis
  38.323    proof (rule antisym)
  38.324 -    show "(SUP i:I. f i + g i) \<le> (SUP i:I. f i) + (SUP i:I. g i)"
  38.325 +    show "(SUP i\<in>I. f i + g i) \<le> (SUP i\<in>I. f i) + (SUP i\<in>I. g i)"
  38.326        by (rule SUP_least; intro add_mono SUP_upper)
  38.327    next
  38.328 -    have "bot < (SUP i:I. g i)"
  38.329 +    have "bot < (SUP i\<in>I. g i)"
  38.330        using \<open>I \<noteq> {}\<close> nonneg(2) by (auto simp: bot_ereal_def less_SUP_iff)
  38.331 -    then have "(SUP i:I. f i) + (SUP i:I. g i) = (SUP i:I. f i + (SUP i:I. g i))"
  38.332 +    then have "(SUP i\<in>I. f i) + (SUP i\<in>I. g i) = (SUP i\<in>I. f i + (SUP i\<in>I. g i))"
  38.333        by (intro SUP_ereal_add_left[symmetric] \<open>I \<noteq> {}\<close>) auto
  38.334 -    also have "\<dots> = (SUP i:I. (SUP j:I. f i + g j))"
  38.335 +    also have "\<dots> = (SUP i\<in>I. (SUP j\<in>I. f i + g j))"
  38.336        using nonneg(1) by (intro SUP_cong refl SUP_ereal_add_right[symmetric] \<open>I \<noteq> {}\<close>) auto
  38.337 -    also have "\<dots> \<le> (SUP i:I. f i + g i)"
  38.338 +    also have "\<dots> \<le> (SUP i\<in>I. f i + g i)"
  38.339        using directed by (intro SUP_least) (blast intro: SUP_upper2)
  38.340 -    finally show "(SUP i:I. f i) + (SUP i:I. g i) \<le> (SUP i:I. f i + g i)" .
  38.341 +    finally show "(SUP i\<in>I. f i) + (SUP i\<in>I. g i) \<le> (SUP i\<in>I. f i + g i)" .
  38.342    qed
  38.343  qed
  38.344  
  38.345 @@ -3704,12 +3704,12 @@
  38.346    assumes "I \<noteq> {}"
  38.347    assumes directed: "\<And>N i j. N \<subseteq> A \<Longrightarrow> i \<in> I \<Longrightarrow> j \<in> I \<Longrightarrow> \<exists>k\<in>I. \<forall>n\<in>N. f n i \<le> f n k \<and> f n j \<le> f n k"
  38.348    assumes nonneg: "\<And>n i. i \<in> I \<Longrightarrow> n \<in> A \<Longrightarrow> 0 \<le> f n i"
  38.349 -  shows "(SUP i:I. \<Sum>n\<in>A. f n i) = (\<Sum>n\<in>A. SUP i:I. f n i)"
  38.350 +  shows "(SUP i\<in>I. \<Sum>n\<in>A. f n i) = (\<Sum>n\<in>A. SUP i\<in>I. f n i)"
  38.351  proof -
  38.352 -  have "N \<subseteq> A \<Longrightarrow> (SUP i:I. \<Sum>n\<in>N. f n i) = (\<Sum>n\<in>N. SUP i:I. f n i)" for N
  38.353 +  have "N \<subseteq> A \<Longrightarrow> (SUP i\<in>I. \<Sum>n\<in>N. f n i) = (\<Sum>n\<in>N. SUP i\<in>I. f n i)" for N
  38.354    proof (induction N rule: infinite_finite_induct)
  38.355      case (insert n N)
  38.356 -    moreover have "(SUP i:I. f n i + (\<Sum>l\<in>N. f l i)) = (SUP i:I. f n i) + (SUP i:I. \<Sum>l\<in>N. f l i)"
  38.357 +    moreover have "(SUP i\<in>I. f n i + (\<Sum>l\<in>N. f l i)) = (SUP i\<in>I. f n i) + (SUP i\<in>I. \<Sum>l\<in>N. f l i)"
  38.358      proof (rule SUP_ereal_add_directed)
  38.359        fix i assume "i \<in> I" then show "0 \<le> f n i" "0 \<le> (\<Sum>l\<in>N. f l i)"
  38.360          using insert by (auto intro!: sum_nonneg nonneg)
  38.361 @@ -3730,11 +3730,11 @@
  38.362    assumes "I \<noteq> {}"
  38.363    assumes directed: "\<And>N i j. i \<in> I \<Longrightarrow> j \<in> I \<Longrightarrow> finite N \<Longrightarrow> \<exists>k\<in>I. \<forall>n\<in>N. f i n \<le> f k n \<and> f j n \<le> f k n"
  38.364    assumes nonneg: "\<And>n i. 0 \<le> f n i"
  38.365 -  shows "(\<Sum>i. SUP n:I. f n i) = (SUP n:I. \<Sum>i. f n i)"
  38.366 +  shows "(\<Sum>i. SUP n\<in>I. f n i) = (SUP n\<in>I. \<Sum>i. f n i)"
  38.367  proof (subst (1 2) suminf_ereal_eq_SUP)
  38.368 -  show "\<And>n i. 0 \<le> f n i" "\<And>i. 0 \<le> (SUP n:I. f n i)"
  38.369 +  show "\<And>n i. 0 \<le> f n i" "\<And>i. 0 \<le> (SUP n\<in>I. f n i)"
  38.370      using \<open>I \<noteq> {}\<close> nonneg by (auto intro: SUP_upper2)
  38.371 -  show "(SUP n. \<Sum>i<n. SUP n:I. f n i) = (SUP n:I. SUP j. \<Sum>i<j. f n i)"
  38.372 +  show "(SUP n. \<Sum>i<n. SUP n\<in>I. f n i) = (SUP n\<in>I. SUP j. \<Sum>i<j. f n i)"
  38.373      apply (subst SUP_commute)
  38.374      apply (subst SUP_ereal_sum_directed)
  38.375      apply (auto intro!: assms simp: finite_subset)
  38.376 @@ -4223,11 +4223,11 @@
  38.377    fixes f :: "_ \<Rightarrow> ereal" and A
  38.378    assumes nonneg: "\<forall>x\<in>A. f x \<ge> 0"
  38.379    and A:"A \<noteq> {}"
  38.380 -  shows "(SUP x:A. f x) = 0 \<longleftrightarrow> (\<forall>x\<in>A. f x = 0)" (is "?lhs \<longleftrightarrow> ?rhs")
  38.381 +  shows "(SUP x\<in>A. f x) = 0 \<longleftrightarrow> (\<forall>x\<in>A. f x = 0)" (is "?lhs \<longleftrightarrow> ?rhs")
  38.382  proof(intro iffI ballI)
  38.383    fix x
  38.384    assume "?lhs" "x \<in> A"
  38.385 -  from \<open>x \<in> A\<close> have "f x \<le> (SUP x:A. f x)" by(rule SUP_upper)
  38.386 +  from \<open>x \<in> A\<close> have "f x \<le> (SUP x\<in>A. f x)" by(rule SUP_upper)
  38.387    with \<open>?lhs\<close> show "f x = 0" using nonneg \<open>x \<in> A\<close> by auto
  38.388  qed(simp cong: SUP_cong add: A)
  38.389  
    39.1 --- a/src/HOL/Library/Finite_Lattice.thy	Wed Nov 07 23:03:45 2018 +0100
    39.2 +++ b/src/HOL/Library/Finite_Lattice.thy	Thu Nov 08 09:11:52 2018 +0100
    39.3 @@ -159,12 +159,12 @@
    39.4    distrib_lattice + finite_lattice_complete
    39.5  
    39.6  lemma finite_distrib_lattice_complete_sup_Inf:
    39.7 -  "sup (x::'a::finite_distrib_lattice_complete) (Inf A) = (INF y:A. sup x y)"
    39.8 +  "sup (x::'a::finite_distrib_lattice_complete) (Inf A) = (INF y\<in>A. sup x y)"
    39.9    using finite
   39.10    by (induct A rule: finite_induct) (simp_all add: sup_inf_distrib1)
   39.11  
   39.12  lemma finite_distrib_lattice_complete_inf_Sup:
   39.13 -  "inf (x::'a::finite_distrib_lattice_complete) (Sup A) = (SUP y:A. inf x y)"
   39.14 +  "inf (x::'a::finite_distrib_lattice_complete) (Sup A) = (SUP y\<in>A. inf x y)"
   39.15    using finite [of A] by induct (simp_all add: inf_sup_distrib1)
   39.16  
   39.17  context finite_distrib_lattice_complete
    40.1 --- a/src/HOL/Library/Liminf_Limsup.thy	Wed Nov 07 23:03:45 2018 +0100
    40.2 +++ b/src/HOL/Library/Liminf_Limsup.thy	Thu Nov 08 09:11:52 2018 +0100
    40.3 @@ -25,13 +25,13 @@
    40.4  
    40.5  lemma le_cSup_iff_less:
    40.6    fixes x :: "'a :: {conditionally_complete_linorder, dense_linorder}"
    40.7 -  shows "A \<noteq> {} \<Longrightarrow> bdd_above (f`A) \<Longrightarrow> x \<le> (SUP i:A. f i) \<longleftrightarrow> (\<forall>y<x. \<exists>i\<in>A. y \<le> f i)"
    40.8 +  shows "A \<noteq> {} \<Longrightarrow> bdd_above (f`A) \<Longrightarrow> x \<le> (SUP i\<in>A. f i) \<longleftrightarrow> (\<forall>y<x. \<exists>i\<in>A. y \<le> f i)"
    40.9    by (simp add: le_cSUP_iff)
   40.10       (blast intro: less_imp_le less_trans less_le_trans dest: dense)
   40.11  
   40.12  lemma le_Sup_iff_less:
   40.13    fixes x :: "'a :: {complete_linorder, dense_linorder}"
   40.14 -  shows "x \<le> (SUP i:A. f i) \<longleftrightarrow> (\<forall>y<x. \<exists>i\<in>A. y \<le> f i)" (is "?lhs = ?rhs")
   40.15 +  shows "x \<le> (SUP i\<in>A. f i) \<longleftrightarrow> (\<forall>y<x. \<exists>i\<in>A. y \<le> f i)" (is "?lhs = ?rhs")
   40.16    unfolding le_SUP_iff
   40.17    by (blast intro: less_imp_le less_trans less_le_trans dest: dense)
   40.18  
   40.19 @@ -51,38 +51,38 @@
   40.20  
   40.21  lemma cInf_le_iff_less:
   40.22    fixes x :: "'a :: {conditionally_complete_linorder, dense_linorder}"
   40.23 -  shows "A \<noteq> {} \<Longrightarrow> bdd_below (f`A) \<Longrightarrow> (INF i:A. f i) \<le> x \<longleftrightarrow> (\<forall>y>x. \<exists>i\<in>A. f i \<le> y)"
   40.24 +  shows "A \<noteq> {} \<Longrightarrow> bdd_below (f`A) \<Longrightarrow> (INF i\<in>A. f i) \<le> x \<longleftrightarrow> (\<forall>y>x. \<exists>i\<in>A. f i \<le> y)"
   40.25    by (simp add: cINF_le_iff)
   40.26       (blast intro: less_imp_le less_trans le_less_trans dest: dense)
   40.27  
   40.28  lemma Inf_le_iff_less:
   40.29    fixes x :: "'a :: {complete_linorder, dense_linorder}"
   40.30 -  shows "(INF i:A. f i) \<le> x \<longleftrightarrow> (\<forall>y>x. \<exists>i\<in>A. f i \<le> y)"
   40.31 +  shows "(INF i\<in>A. f i) \<le> x \<longleftrightarrow> (\<forall>y>x. \<exists>i\<in>A. f i \<le> y)"
   40.32    unfolding INF_le_iff
   40.33    by (blast intro: less_imp_le less_trans le_less_trans dest: dense)
   40.34  
   40.35  lemma SUP_pair:
   40.36    fixes f :: "_ \<Rightarrow> _ \<Rightarrow> _ :: complete_lattice"
   40.37 -  shows "(SUP i : A. SUP j : B. f i j) = (SUP p : A \<times> B. f (fst p) (snd p))"
   40.38 +  shows "(SUP i \<in> A. SUP j \<in> B. f i j) = (SUP p \<in> A \<times> B. f (fst p) (snd p))"
   40.39    by (rule antisym) (auto intro!: SUP_least SUP_upper2)
   40.40  
   40.41  lemma INF_pair:
   40.42    fixes f :: "_ \<Rightarrow> _ \<Rightarrow> _ :: complete_lattice"
   40.43 -  shows "(INF i : A. INF j : B. f i j) = (INF p : A \<times> B. f (fst p) (snd p))"
   40.44 +  shows "(INF i \<in> A. INF j \<in> B. f i j) = (INF p \<in> A \<times> B. f (fst p) (snd p))"
   40.45    by (rule antisym) (auto intro!: INF_greatest INF_lower2)
   40.46  
   40.47  lemma INF_Sigma:
   40.48    fixes f :: "_ \<Rightarrow> _ \<Rightarrow> _ :: complete_lattice"
   40.49 -  shows "(INF i : A. INF j : B i. f i j) = (INF p : Sigma A B. f (fst p) (snd p))"
   40.50 +  shows "(INF i \<in> A. INF j \<in> B i. f i j) = (INF p \<in> Sigma A B. f (fst p) (snd p))"
   40.51    by (rule antisym) (auto intro!: INF_greatest INF_lower2)
   40.52  
   40.53  subsubsection \<open>\<open>Liminf\<close> and \<open>Limsup\<close>\<close>
   40.54  
   40.55  definition Liminf :: "'a filter \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b :: complete_lattice" where
   40.56 -  "Liminf F f = (SUP P:{P. eventually P F}. INF x:{x. P x}. f x)"
   40.57 +  "Liminf F f = (SUP P\<in>{P. eventually P F}. INF x\<in>{x. P x}. f x)"
   40.58  
   40.59  definition Limsup :: "'a filter \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b :: complete_lattice" where
   40.60 -  "Limsup F f = (INF P:{P. eventually P F}. SUP x:{x. P x}. f x)"
   40.61 +  "Limsup F f = (INF P\<in>{P. eventually P F}. SUP x\<in>{x. P x}. f x)"
   40.62  
   40.63  abbreviation "liminf \<equiv> Liminf sequentially"
   40.64  
   40.65 @@ -98,11 +98,11 @@
   40.66      (\<And>y. (\<And>P. eventually P F \<Longrightarrow> y \<le> SUPREMUM (Collect P) f) \<Longrightarrow> y \<le> x) \<Longrightarrow> Limsup F f = x"
   40.67    unfolding Limsup_def by (auto intro!: INF_eqI)
   40.68  
   40.69 -lemma liminf_SUP_INF: "liminf f = (SUP n. INF m:{n..}. f m)"
   40.70 +lemma liminf_SUP_INF: "liminf f = (SUP n. INF m\<in>{n..}. f m)"
   40.71    unfolding Liminf_def eventually_sequentially
   40.72    by (rule SUP_eq) (auto simp: atLeast_def intro!: INF_mono)
   40.73  
   40.74 -lemma limsup_INF_SUP: "limsup f = (INF n. SUP m:{n..}. f m)"
   40.75 +lemma limsup_INF_SUP: "limsup f = (INF n. SUP m\<in>{n..}. f m)"
   40.76    unfolding Limsup_def eventually_sequentially
   40.77    by (rule INF_eq) (auto simp: atLeast_def intro!: SUP_mono)
   40.78  
   40.79 @@ -111,7 +111,7 @@
   40.80    shows "Limsup F (\<lambda>x. c) = c"
   40.81  proof -
   40.82    have *: "\<And>P. Ex P \<longleftrightarrow> P \<noteq> (\<lambda>x. False)" by auto
   40.83 -  have "\<And>P. eventually P F \<Longrightarrow> (SUP x : {x. P x}. c) = c"
   40.84 +  have "\<And>P. eventually P F \<Longrightarrow> (SUP x \<in> {x. P x}. c) = c"
   40.85      using ntriv by (intro SUP_const) (auto simp: eventually_False *)
   40.86    then show ?thesis
   40.87      unfolding Limsup_def using eventually_True
   40.88 @@ -124,7 +124,7 @@
   40.89    shows "Liminf F (\<lambda>x. c) = c"
   40.90  proof -
   40.91    have *: "\<And>P. Ex P \<longleftrightarrow> P \<noteq> (\<lambda>x. False)" by auto
   40.92 -  have "\<And>P. eventually P F \<Longrightarrow> (INF x : {x. P x}. c) = c"
   40.93 +  have "\<And>P. eventually P F \<Longrightarrow> (INF x \<in> {x. P x}. c) = c"
   40.94      using ntriv by (intro INF_const) (auto simp: eventually_False *)
   40.95    then show ?thesis
   40.96      unfolding Liminf_def using eventually_True
   40.97 @@ -387,7 +387,7 @@
   40.98    assumes "strict_mono r"
   40.99    shows "liminf X \<le> liminf (X \<circ> r) "
  40.100  proof-
  40.101 -  have "\<And>n. (INF m:{n..}. X m) \<le> (INF m:{n..}. (X \<circ> r) m)"
  40.102 +  have "\<And>n. (INF m\<in>{n..}. X m) \<le> (INF m\<in>{n..}. (X \<circ> r) m)"
  40.103    proof (safe intro!: INF_mono)
  40.104      fix n m :: nat assume "n \<le> m" then show "\<exists>ma\<in>{n..}. X ma \<le> (X \<circ> r) m"
  40.105        using seq_suble[OF \<open>strict_mono r\<close>, of m] by (intro bexI[of _ "r m"]) auto
  40.106 @@ -400,7 +400,7 @@
  40.107    assumes "strict_mono r"
  40.108    shows "limsup (X \<circ> r) \<le> limsup X"
  40.109  proof-
  40.110 -  have "(SUP m:{n..}. (X \<circ> r) m) \<le> (SUP m:{n..}. X m)" for n
  40.111 +  have "(SUP m\<in>{n..}. (X \<circ> r) m) \<le> (SUP m\<in>{n..}. X m)" for n
  40.112    proof (safe intro!: SUP_mono)
  40.113      fix m :: nat
  40.114      assume "n \<le> m"
  40.115 @@ -431,11 +431,11 @@
  40.116      qed }
  40.117    note * = this
  40.118  
  40.119 -  have "f (Liminf F g) = (SUP P : {P. eventually P F}. f (Inf (g ` Collect P)))"
  40.120 +  have "f (Liminf F g) = (SUP P \<in> {P. eventually P F}. f (Inf (g ` Collect P)))"
  40.121      unfolding Liminf_def
  40.122      by (subst continuous_at_Sup_mono[OF am continuous_on_imp_continuous_within[OF c]])
  40.123         (auto intro: eventually_True)
  40.124 -  also have "\<dots> = (SUP P : {P. eventually P F}. INFIMUM (g ` Collect P) f)"
  40.125 +  also have "\<dots> = (SUP P \<in> {P. eventually P F}. INFIMUM (g ` Collect P) f)"
  40.126      by (intro SUP_cong refl continuous_at_Inf_mono[OF am continuous_on_imp_continuous_within[OF c]])
  40.127         (auto dest!: eventually_happens simp: F)
  40.128    finally show ?thesis by (auto simp: Liminf_def)
  40.129 @@ -456,11 +456,11 @@
  40.130      qed }
  40.131    note * = this
  40.132  
  40.133 -  have "f (Limsup F g) = (INF P : {P. eventually P F}. f (Sup (g ` Collect P)))"
  40.134 +  have "f (Limsup F g) = (INF P \<in> {P. eventually P F}. f (Sup (g ` Collect P)))"
  40.135      unfolding Limsup_def
  40.136      by (subst continuous_at_Inf_mono[OF am continuous_on_imp_continuous_within[OF c]])
  40.137         (auto intro: eventually_True)
  40.138 -  also have "\<dots> = (INF P : {P. eventually P F}. SUPREMUM (g ` Collect P) f)"
  40.139 +  also have "\<dots> = (INF P \<in> {P. eventually P F}. SUPREMUM (g ` Collect P) f)"
  40.140      by (intro INF_cong refl continuous_at_Sup_mono[OF am continuous_on_imp_continuous_within[OF c]])
  40.141         (auto dest!: eventually_happens simp: F)
  40.142    finally show ?thesis by (auto simp: Limsup_def)
  40.143 @@ -480,11 +480,11 @@
  40.144      with \<open>eventually P F\<close> F show False
  40.145        by auto
  40.146    qed
  40.147 -  have "f (Limsup F g) = (SUP P : {P. eventually P F}. f (Sup (g ` Collect P)))"
  40.148 +  have "f (Limsup F g) = (SUP P \<in> {P. eventually P F}. f (Sup (g ` Collect P)))"
  40.149      unfolding Limsup_def
  40.150      by (subst continuous_at_Inf_antimono[OF am continuous_on_imp_continuous_within[OF c]])
  40.151         (auto intro: eventually_True)
  40.152 -  also have "\<dots> = (SUP P : {P. eventually P F}. INFIMUM (g ` Collect P) f)"
  40.153 +  also have "\<dots> = (SUP P \<in> {P. eventually P F}. INFIMUM (g ` Collect P) f)"
  40.154      by (intro SUP_cong refl continuous_at_Sup_antimono[OF am continuous_on_imp_continuous_within[OF c]])
  40.155         (auto dest!: eventually_happens simp: F)
  40.156    finally show ?thesis
  40.157 @@ -506,11 +506,11 @@
  40.158      qed }
  40.159    note * = this
  40.160  
  40.161 -  have "f (Liminf F g) = (INF P : {P. eventually P F}. f (Inf (g ` Collect P)))"
  40.162 +  have "f (Liminf F g) = (INF P \<in> {P. eventually P F}. f (Inf (g ` Collect P)))"
  40.163      unfolding Liminf_def
  40.164      by (subst continuous_at_Sup_antimono[OF am continuous_on_imp_continuous_within[OF c]])
  40.165         (auto intro: eventually_True)
  40.166 -  also have "\<dots> = (INF P : {P. eventually P F}. SUPREMUM (g ` Collect P) f)"
  40.167 +  also have "\<dots> = (INF P \<in> {P. eventually P F}. SUPREMUM (g ` Collect P) f)"
  40.168      by (intro INF_cong refl continuous_at_Inf_antimono[OF am continuous_on_imp_continuous_within[OF c]])
  40.169         (auto dest!: eventually_happens simp: F)
  40.170    finally show ?thesis
  40.171 @@ -527,10 +527,10 @@
  40.172    by (subst Limsup_def)
  40.173      (auto simp add: SUP_upper Limsup_bounded eventually_filtermap eventually_mono intro!: INF_greatest)
  40.174  
  40.175 -lemma Liminf_least: "(\<And>P. eventually P F \<Longrightarrow> (INF x:Collect P. f x) \<le> x) \<Longrightarrow> Liminf F f \<le> x"
  40.176 +lemma Liminf_least: "(\<And>P. eventually P F \<Longrightarrow> (INF x\<in>Collect P. f x) \<le> x) \<Longrightarrow> Liminf F f \<le> x"
  40.177    by (auto intro!: SUP_least simp: Liminf_def)
  40.178  
  40.179 -lemma Limsup_greatest: "(\<And>P. eventually P F \<Longrightarrow> x \<le> (SUP x:Collect P. f x)) \<Longrightarrow> Limsup F f \<ge> x"
  40.180 +lemma Limsup_greatest: "(\<And>P. eventually P F \<Longrightarrow> x \<le> (SUP x\<in>Collect P. f x)) \<Longrightarrow> Limsup F f \<ge> x"
  40.181    by (auto intro!: INF_greatest simp: Limsup_def)
  40.182  
  40.183  lemma Liminf_filtermap_ge: "inj f \<Longrightarrow> Liminf (filtermap f F) g \<ge> Liminf F (\<lambda>x. g (f x))"
    41.1 --- a/src/HOL/Library/Multiset.thy	Wed Nov 07 23:03:45 2018 +0100
    41.2 +++ b/src/HOL/Library/Multiset.thy	Thu Nov 08 09:11:52 2018 +0100
    41.3 @@ -1035,7 +1035,7 @@
    41.4      ultimately have "finite {i. Inf ((\<lambda>f. f i) ` A) > 0}" by (rule finite_subset)
    41.5      with False show ?thesis by simp
    41.6    qed simp_all
    41.7 -  thus "(\<lambda>i. if A = {} then 0 else INF f:A. f i) \<in> multiset" by (simp add: multiset_def)
    41.8 +  thus "(\<lambda>i. if A = {} then 0 else INF f\<in>A. f i) \<in> multiset" by (simp add: multiset_def)
    41.9  qed
   41.10  
   41.11  instance ..
   41.12 @@ -1094,17 +1094,17 @@
   41.13  
   41.14  lemma Sup_multiset_in_multiset:
   41.15    assumes "A \<noteq> {}" "subset_mset.bdd_above A"
   41.16 -  shows   "(\<lambda>i. SUP X:A. count X i) \<in> multiset"
   41.17 +  shows   "(\<lambda>i. SUP X\<in>A. count X i) \<in> multiset"
   41.18    unfolding multiset_def
   41.19  proof
   41.20    have "{i. Sup ((\<lambda>X. count X i) ` A) > 0} \<subseteq> (\<Union>X\<in>A. {i. 0 < count X i})"
   41.21    proof safe
   41.22 -    fix i assume pos: "(SUP X:A. count X i) > 0"
   41.23 +    fix i assume pos: "(SUP X\<in>A. count X i) > 0"
   41.24      show "i \<in> (\<Union>X\<in>A. {i. 0 < count X i})"
   41.25      proof (rule ccontr)
   41.26        assume "i \<notin> (\<Union>X\<in>A. {i. 0 < count X i})"
   41.27        hence "\<forall>X\<in>A. count X i \<le> 0" by (auto simp: count_eq_zero_iff)
   41.28 -      with assms have "(SUP X:A. count X i) \<le> 0"
   41.29 +      with assms have "(SUP X\<in>A. count X i) \<le> 0"
   41.30          by (intro cSup_least bdd_above_multiset_imp_bdd_above_count) auto
   41.31        with pos show False by simp
   41.32      qed
   41.33 @@ -1115,7 +1115,7 @@
   41.34  
   41.35  lemma count_Sup_multiset_nonempty:
   41.36    assumes "A \<noteq> {}" "subset_mset.bdd_above A"
   41.37 -  shows   "count (Sup A) x = (SUP X:A. count X x)"
   41.38 +  shows   "count (Sup A) x = (SUP X\<in>A. count X x)"
   41.39    using assms by (simp add: Sup_multiset_def Abs_multiset_inverse Sup_multiset_in_multiset)
   41.40  
   41.41  
   41.42 @@ -1127,7 +1127,7 @@
   41.43    proof (rule mset_subset_eqI)
   41.44      fix x
   41.45      from \<open>X \<in> A\<close> have "A \<noteq> {}" by auto
   41.46 -    hence "count (Inf A) x = (INF X:A. count X x)"
   41.47 +    hence "count (Inf A) x = (INF X\<in>A. count X x)"
   41.48        by (simp add: count_Inf_multiset_nonempty)
   41.49      also from \<open>X \<in> A\<close> have "\<dots> \<le> count X x"
   41.50        by (intro cInf_lower) simp_all
   41.51 @@ -1139,7 +1139,7 @@
   41.52    show "X \<subseteq># Inf A"
   41.53    proof (rule mset_subset_eqI)
   41.54      fix x
   41.55 -    from nonempty have "count X x \<le> (INF X:A. count X x)"
   41.56 +    from nonempty have "count X x \<le> (INF X\<in>A. count X x)"
   41.57        by (intro cInf_greatest) (auto intro: mset_subset_eq_count le)
   41.58      also from nonempty have "\<dots> = count (Inf A) x" by (simp add: count_Inf_multiset_nonempty)
   41.59      finally show "count X x \<le> count (Inf A) x" .
   41.60 @@ -1151,10 +1151,10 @@
   41.61    proof (rule mset_subset_eqI)
   41.62      fix x
   41.63      from X have "A \<noteq> {}" by auto
   41.64 -    have "count X x \<le> (SUP X:A. count X x)"
   41.65 +    have "count X x \<le> (SUP X\<in>A. count X x)"
   41.66        by (intro cSUP_upper X bdd_above_multiset_imp_bdd_above_count bdd)
   41.67      also from count_Sup_multiset_nonempty[OF \<open>A \<noteq> {}\<close> bdd]
   41.68 -      have "(SUP X:A. count X x) = count (Sup A) x" by simp
   41.69 +      have "(SUP X\<in>A. count X x) = count (Sup A) x" by simp
   41.70      finally show "count X x \<le> count (Sup A) x" .
   41.71    qed
   41.72  next
   41.73 @@ -1165,7 +1165,7 @@
   41.74    proof (rule mset_subset_eqI)
   41.75      fix x
   41.76      from count_Sup_multiset_nonempty[OF \<open>A \<noteq> {}\<close> bdd]
   41.77 -      have "count (Sup A) x = (SUP X:A. count X x)" .
   41.78 +      have "count (Sup A) x = (SUP X\<in>A. count X x)" .
   41.79      also from nonempty have "\<dots> \<le> count X x"
   41.80        by (intro cSup_least) (auto intro: mset_subset_eq_count ge)
   41.81      finally show "count (Sup A) x \<le> count X x" .
    42.1 --- a/src/HOL/Library/Product_Order.thy	Wed Nov 07 23:03:45 2018 +0100
    42.2 +++ b/src/HOL/Library/Product_Order.thy	Thu Nov 08 09:11:52 2018 +0100
    42.3 @@ -161,7 +161,7 @@
    42.4  instantiation prod :: (Inf, Inf) Inf
    42.5  begin
    42.6  
    42.7 -definition "Inf A = (INF x:A. fst x, INF x:A. snd x)"
    42.8 +definition "Inf A = (INF x\<in>A. fst x, INF x\<in>A. snd x)"
    42.9  
   42.10  instance ..
   42.11  
   42.12 @@ -170,7 +170,7 @@
   42.13  instantiation prod :: (Sup, Sup) Sup
   42.14  begin
   42.15  
   42.16 -definition "Sup A = (SUP x:A. fst x, SUP x:A. snd x)"
   42.17 +definition "Sup A = (SUP x\<in>A. fst x, SUP x\<in>A. snd x)"
   42.18  
   42.19  instance ..
   42.20  
   42.21 @@ -185,34 +185,34 @@
   42.22    by standard (simp_all add: less_eq_prod_def Inf_prod_def Sup_prod_def
   42.23      INF_lower SUP_upper le_INF_iff SUP_le_iff bot_prod_def top_prod_def)
   42.24  
   42.25 -lemma fst_Sup: "fst (Sup A) = (SUP x:A. fst x)"
   42.26 +lemma fst_Sup: "fst (Sup A) = (SUP x\<in>A. fst x)"
   42.27    unfolding Sup_prod_def by simp
   42.28  
   42.29 -lemma snd_Sup: "snd (Sup A) = (SUP x:A. snd x)"
   42.30 +lemma snd_Sup: "snd (Sup A) = (SUP x\<in>A. snd x)"
   42.31    unfolding Sup_prod_def by simp
   42.32  
   42.33 -lemma fst_Inf: "fst (Inf A) = (INF x:A. fst x)"
   42.34 +lemma fst_Inf: "fst (Inf A) = (INF x\<in>A. fst x)"
   42.35    unfolding Inf_prod_def by simp
   42.36  
   42.37 -lemma snd_Inf: "snd (Inf A) = (INF x:A. snd x)"
   42.38 +lemma snd_Inf: "snd (Inf A) = (INF x\<in>A. snd x)"
   42.39    unfolding Inf_prod_def by simp
   42.40  
   42.41 -lemma fst_SUP: "fst (SUP x:A. f x) = (SUP x:A. fst (f x))"
   42.42 +lemma fst_SUP: "fst (SUP x\<in>A. f x) = (SUP x\<in>A. fst (f x))"
   42.43    using fst_Sup [of "f ` A", symmetric] by (simp add: comp_def)
   42.44  
   42.45 -lemma snd_SUP: "snd (SUP x:A. f x) = (SUP x:A. snd (f x))"
   42.46 +lemma snd_SUP: "snd (SUP x\<in>A. f x) = (SUP x\<in>A. snd (f x))"
   42.47    using snd_Sup [of "f ` A", symmetric] by (simp add: comp_def)
   42.48  
   42.49 -lemma fst_INF: "fst (INF x:A. f x) = (INF x:A. fst (f x))"
   42.50 +lemma fst_INF: "fst (INF x\<in>A. f x) = (INF x\<in>A. fst (f x))"
   42.51    using fst_Inf [of "f ` A", symmetric] by (simp add: comp_def)
   42.52  
   42.53 -lemma snd_INF: "snd (INF x:A. f x) = (INF x:A. snd (f x))"
   42.54 +lemma snd_INF: "snd (INF x\<in>A. f x) = (INF x\<in>A. snd (f x))"
   42.55    using snd_Inf [of "f ` A", symmetric] by (simp add: comp_def)
   42.56  
   42.57 -lemma SUP_Pair: "(SUP x:A. (f x, g x)) = (SUP x:A. f x, SUP x:A. g x)"
   42.58 +lemma SUP_Pair: "(SUP x\<in>A. (f x, g x)) = (SUP x\<in>A. f x, SUP x\<in>A. g x)"
   42.59    unfolding Sup_prod_def by (simp add: comp_def)
   42.60  
   42.61 -lemma INF_Pair: "(INF x:A. (f x, g x)) = (INF x:A. f x, INF x:A. g x)"
   42.62 +lemma INF_Pair: "(INF x\<in>A. (f x, g x)) = (INF x\<in>A. f x, INF x\<in>A. g x)"
   42.63    unfolding Inf_prod_def by (simp add: comp_def)
   42.64  
   42.65  
    43.1 --- a/src/HOL/Probability/Discrete_Topology.thy	Wed Nov 07 23:03:45 2018 +0100
    43.2 +++ b/src/HOL/Probability/Discrete_Topology.thy	Thu Nov 08 09:11:52 2018 +0100
    43.3 @@ -19,7 +19,7 @@
    43.4    where "dist_discrete n m = (if n = m then 0 else 1)"
    43.5  
    43.6  definition uniformity_discrete :: "('a discrete \<times> 'a discrete) filter" where
    43.7 -  "(uniformity::('a discrete \<times> 'a discrete) filter) = (INF e:{0 <..}. principal {(x, y). dist x y < e})"
    43.8 +  "(uniformity::('a discrete \<times> 'a discrete) filter) = (INF e\<in>{0 <..}. principal {(x, y). dist x y < e})"
    43.9  
   43.10  definition "open_discrete" :: "'a discrete set \<Rightarrow> bool" where
   43.11    "(open::'a discrete set \<Rightarrow> bool) U \<longleftrightarrow> (\<forall>x\<in>U. eventually (\<lambda>(x', y). x' = x \<longrightarrow> y \<in> U) uniformity)"
    44.1 --- a/src/HOL/Probability/Distribution_Functions.thy	Wed Nov 07 23:03:45 2018 +0100
    44.2 +++ b/src/HOL/Probability/Distribution_Functions.thy	Thu Nov 08 09:11:52 2018 +0100
    44.3 @@ -220,13 +220,13 @@
    44.4      and finite_borel_measure_interval_measure: "finite_borel_measure (interval_measure F)"
    44.5  proof -
    44.6    let ?F = "interval_measure F"
    44.7 -  { have "ennreal (m - 0) = (SUP i::nat. ennreal (F (real i) - F (- real i)))"
    44.8 +  { have "ennreal (m - 0) = (SUP i. ennreal (F (real i) - F (- real i)))"
    44.9        by (intro LIMSEQ_unique[OF _ LIMSEQ_SUP] tendsto_ennrealI tendsto_intros
   44.10                  lim_F_at_bot[THEN filterlim_compose] lim_F_at_top[THEN filterlim_compose]
   44.11                  lim_F_at_bot[THEN filterlim_compose] filterlim_real_sequentially
   44.12                  filterlim_uminus_at_top[THEN iffD1])
   44.13           (auto simp: incseq_def nondecF intro!: diff_mono)
   44.14 -    also have "\<dots> = (SUP i::nat. emeasure ?F {- real i<..real i})"
   44.15 +    also have "\<dots> = (SUP i. emeasure ?F {- real i<..real i})"
   44.16        by (subst emeasure_interval_measure_Ioc) (simp_all add: nondecF right_cont_F)
   44.17      also have "\<dots> = emeasure ?F (\<Union>i::nat. {- real i<..real i})"
   44.18        by (rule SUP_emeasure_incseq) (auto simp: incseq_def)
    45.1 --- a/src/HOL/Probability/Essential_Supremum.thy	Wed Nov 07 23:03:45 2018 +0100
    45.2 +++ b/src/HOL/Probability/Essential_Supremum.thy	Thu Nov 08 09:11:52 2018 +0100
    45.3 @@ -30,13 +30,13 @@
    45.4    fix y assume "AE x in M. f x \<le> y"
    45.5    then have "(\<lambda>x. f x \<le> y) \<in> {P. AE x in M. P x}"
    45.6      by simp
    45.7 -  then show "(INF P:{P. AE x in M. P x}. SUP x:Collect P. f x) \<le> y"
    45.8 +  then show "(INF P\<in>{P. AE x in M. P x}. SUP x\<in>Collect P. f x) \<le> y"
    45.9      by (rule INF_lower2) (auto intro: SUP_least)
   45.10  next
   45.11    fix P assume P: "AE x in M. P x"
   45.12 -  show "Inf {z. AE x in M. f x \<le> z} \<le> (SUP x:Collect P. f x)"
   45.13 +  show "Inf {z. AE x in M. f x \<le> z} \<le> (SUP x\<in>Collect P. f x)"
   45.14    proof (rule Inf_lower; clarsimp)
   45.15 -    show "AE x in M. f x \<le> (SUP x:Collect P. f x)"
   45.16 +    show "AE x in M. f x \<le> (SUP x\<in>Collect P. f x)"
   45.17        using P by (auto elim: eventually_mono simp: SUP_upper)
   45.18    qed
   45.19  qed
    46.1 --- a/src/HOL/Probability/Fin_Map.thy	Wed Nov 07 23:03:45 2018 +0100
    46.2 +++ b/src/HOL/Probability/Fin_Map.thy	Thu Nov 08 09:11:52 2018 +0100
    46.3 @@ -258,7 +258,7 @@
    46.4  
    46.5  definition [code del]:
    46.6    "(uniformity :: (('a, 'b) fmap \<times> ('a \<Rightarrow>\<^sub>F 'b)) filter) =
    46.7 -    (INF e:{0 <..}. principal {(x, y). dist x y < e})"
    46.8 +    (INF e\<in>{0 <..}. principal {(x, y). dist x y < e})"
    46.9  
   46.10  instance
   46.11    by standard (rule uniformity_fmap_def)
    47.1 --- a/src/HOL/Probability/Giry_Monad.thy	Wed Nov 07 23:03:45 2018 +0100
    47.2 +++ b/src/HOL/Probability/Giry_Monad.thy	Thu Nov 08 09:11:52 2018 +0100
    47.3 @@ -165,7 +165,7 @@
    47.4  
    47.5  definition subprob_algebra :: "'a measure \<Rightarrow> 'a measure measure" where
    47.6    "subprob_algebra K =
    47.7 -    (SUP A : sets K. vimage_algebra {M. subprob_space M \<and> sets M = sets K} (\<lambda>M. emeasure M A) borel)"
    47.8 +    (SUP A \<in> sets K. vimage_algebra {M. subprob_space M \<and> sets M = sets K} (\<lambda>M. emeasure M A) borel)"
    47.9  
   47.10  lemma space_subprob_algebra: "space (subprob_algebra A) = {M. subprob_space M \<and> sets M = sets A}"
   47.11    by (auto simp add: subprob_algebra_def space_Sup_eq_UN)
    48.1 --- a/src/HOL/Probability/Helly_Selection.thy	Wed Nov 07 23:03:45 2018 +0100
    48.2 +++ b/src/HOL/Probability/Helly_Selection.thy	Thu Nov 08 09:11:52 2018 +0100
    48.3 @@ -87,7 +87,7 @@
    48.4      by auto
    48.5  
    48.6    define F where "F x = Inf {lim (?f n) |n. x < r n}" for x
    48.7 -  have F_eq: "ereal (F x) = (INF n:{n. x < r n}. ereal (lim (?f n)))" for x
    48.8 +  have F_eq: "ereal (F x) = (INF n\<in>{n. x < r n}. ereal (lim (?f n)))" for x
    48.9      unfolding F_def by (subst ereal_Inf'[OF bdd_below nonempty]) (simp add: setcompr_eq_image)
   48.10    have mono_F: "mono F"
   48.11      using nonempty by (auto intro!: cInf_superset_mono simp: F_def bdd_below mono_def)
    49.1 --- a/src/HOL/Probability/Projective_Family.thy	Wed Nov 07 23:03:45 2018 +0100
    49.2 +++ b/src/HOL/Probability/Projective_Family.thy	Thu Nov 08 09:11:52 2018 +0100
    49.3 @@ -470,7 +470,7 @@
    49.4      next
    49.5        assume *: "{i. J i \<subseteq> {0..< n}} \<noteq> {}"
    49.6        have "(INF i. CI (J i) (X' i)) \<le>
    49.7 -          (INF i:{i. J i \<subseteq> {0..<n}}. C 0 n (\<lambda>_. undefined) (PF.emb {0..<n} (J i) (X' i)))"
    49.8 +          (INF i\<in>{i. J i \<subseteq> {0..<n}}. C 0 n (\<lambda>_. undefined) (PF.emb {0..<n} (J i) (X' i)))"
    49.9          by (intro INF_superset_mono) (auto simp: emeasure_CI)
   49.10        also have "\<dots> = C 0 n (\<lambda>_. undefined) (\<Inter>i\<in>{i. J i \<subseteq> {0..<n}}. (PF.emb {0..<n} (J i) (X' i)))"
   49.11          using * by (intro emeasure_INT_decseq_subset[symmetric]) (auto intro!: dec_X' del: subsetI simp: sets_C)
    50.1 --- a/src/HOL/Probability/Projective_Limit.thy	Wed Nov 07 23:03:45 2018 +0100
    50.2 +++ b/src/HOL/Probability/Projective_Limit.thy	Thu Nov 08 09:11:52 2018 +0100
    50.3 @@ -141,7 +141,7 @@
    50.4      unfolding P'_def mapmeasure_def using J
    50.5      by (auto intro!: prob_space_distr fm_measurable simp: measurable_cong_sets[OF sets_P])
    50.6  
    50.7 -  let ?SUP = "\<lambda>n. SUP K : {K. K \<subseteq> fm n ` (B n) \<and> compact K}. emeasure (P' n) K"
    50.8 +  let ?SUP = "\<lambda>n. SUP K \<in> {K. K \<subseteq> fm n ` (B n) \<and> compact K}. emeasure (P' n) K"
    50.9    { fix n
   50.10      have "emeasure (P (J n)) (B n) = emeasure (P' n) (fm n ` (B n))"
   50.11        using J by (auto simp: P'_def mapmeasure_PiM space_P sets_P)
   50.12 @@ -169,7 +169,7 @@
   50.13        have "?SUP n + 0 < ?SUP n + 2 powr (-n) * ?a"
   50.14          using R[of n] unfolding ennreal_add_left_cancel_less ennreal_zero_less_mult_iff
   50.15          by (auto intro: \<open>0 < ?a\<close>)
   50.16 -      also have "\<dots> = (SUP K:{K. K \<subseteq> fm n ` B n \<and> compact K}. emeasure (P' n) K + 2 powr (-n) * ?a)"
   50.17 +      also have "\<dots> = (SUP K\<in>{K. K \<subseteq> fm n ` B n \<and> compact K}. emeasure (P' n) K + 2 powr (-n) * ?a)"
   50.18          by (rule ennreal_SUP_add_left[symmetric]) auto
   50.19        also have "\<dots> \<le> ?SUP n"
   50.20        proof (intro SUP_least)
    51.1 --- a/src/HOL/Probability/SPMF.thy	Wed Nov 07 23:03:45 2018 +0100
    51.2 +++ b/src/HOL/Probability/SPMF.thy	Thu Nov 08 09:11:52 2018 +0100
    51.3 @@ -10,7 +10,7 @@
    51.4  
    51.5  subsection \<open>Auxiliary material\<close>
    51.6  
    51.7 -lemma cSUP_singleton [simp]: "(SUP x:{x}. f x :: _ :: conditionally_complete_lattice) = f x"
    51.8 +lemma cSUP_singleton [simp]: "(SUP x\<in>{x}. f x :: _ :: conditionally_complete_lattice) = f x"
    51.9  by (metis cSup_singleton image_empty image_insert)
   51.10  
   51.11  subsubsection \<open>More about extended reals\<close>
   51.12 @@ -33,18 +33,18 @@
   51.13    unfolding continuous_def by auto
   51.14  
   51.15  lemma ennreal_Sup:
   51.16 -  assumes *: "(SUP a:A. ennreal a) \<noteq> \<top>"
   51.17 +  assumes *: "(SUP a\<in>A. ennreal a) \<noteq> \<top>"
   51.18    and "A \<noteq> {}"
   51.19 -  shows "ennreal (Sup A) = (SUP a:A. ennreal a)"
   51.20 +  shows "ennreal (Sup A) = (SUP a\<in>A. ennreal a)"
   51.21  proof (rule continuous_at_Sup_mono)
   51.22 -  obtain r where r: "ennreal r = (SUP a:A. ennreal a)" "r \<ge> 0"
   51.23 -    using * by(cases "(SUP a:A. ennreal a)") simp_all
   51.24 +  obtain r where r: "ennreal r = (SUP a\<in>A. ennreal a)" "r \<ge> 0"
   51.25 +    using * by(cases "(SUP a\<in>A. ennreal a)") simp_all
   51.26    then show "bdd_above A"
   51.27      by(auto intro!: SUP_upper bdd_aboveI[of _ r] simp add: ennreal_le_iff[symmetric])
   51.28  qed (auto simp: mono_def continuous_at_imp_continuous_at_within continuous_at_ennreal ennreal_leI assms)
   51.29  
   51.30  lemma ennreal_SUP:
   51.31 -  "\<lbrakk> (SUP a:A. ennreal (f a)) \<noteq> \<top>; A \<noteq> {} \<rbrakk> \<Longrightarrow> ennreal (SUP a:A. f a) = (SUP a:A. ennreal (f a))"
   51.32 +  "\<lbrakk> (SUP a\<in>A. ennreal (f a)) \<noteq> \<top>; A \<noteq> {} \<rbrakk> \<Longrightarrow> ennreal (SUP a\<in>A. f a) = (SUP a\<in>A. ennreal (f a))"
   51.33  using ennreal_Sup[of "f ` A"] by auto
   51.34  
   51.35  lemma ennreal_lt_0: "x < 0 \<Longrightarrow> ennreal x = 0"
   51.36 @@ -333,9 +333,9 @@
   51.37  lemma nn_integral_spmf_neq_top: "(\<integral>\<^sup>+ x. spmf p x \<partial>count_space UNIV) \<noteq> \<top>"
   51.38  using nn_integral_measure_spmf[where f="\<lambda>_. 1", of p, symmetric] by simp
   51.39  
   51.40 -lemma SUP_spmf_neq_top': "(SUP p:Y. ennreal (spmf p x)) \<noteq> \<top>"
   51.41 +lemma SUP_spmf_neq_top': "(SUP p\<in>Y. ennreal (spmf p x)) \<noteq> \<top>"
   51.42  proof(rule neq_top_trans)
   51.43 -  show "(SUP p:Y. ennreal (spmf p x)) \<le> 1" by(rule SUP_least)(simp add: pmf_le_1)
   51.44 +  show "(SUP p\<in>Y. ennreal (spmf p x)) \<le> 1" by(rule SUP_least)(simp add: pmf_le_1)
   51.45  qed simp
   51.46  
   51.47  lemma SUP_spmf_neq_top: "(SUP i. ennreal (spmf (Y i) x)) \<noteq> \<top>"
   51.48 @@ -343,9 +343,9 @@
   51.49    show "(SUP i. ennreal (spmf (Y i) x)) \<le> 1" by(rule SUP_least)(simp add: pmf_le_1)
   51.50  qed simp
   51.51  
   51.52 -lemma SUP_emeasure_spmf_neq_top: "(SUP p:Y. emeasure (measure_spmf p) A) \<noteq> \<top>"
   51.53 +lemma SUP_emeasure_spmf_neq_top: "(SUP p\<in>Y. emeasure (measure_spmf p) A) \<noteq> \<top>"
   51.54  proof(rule neq_top_trans)
   51.55 -  show "(SUP p:Y. emeasure (measure_spmf p) A) \<le> 1"
   51.56 +  show "(SUP p\<in>Y. emeasure (measure_spmf p) A) \<le> 1"
   51.57      by(rule SUP_least)(simp add: measure_spmf.subprob_emeasure_le_1)
   51.58  qed simp
   51.59  
   51.60 @@ -1228,7 +1228,7 @@
   51.61  context fixes Y :: "'a spmf set" begin
   51.62  
   51.63  definition lub_spmf :: "'a spmf"
   51.64 -where "lub_spmf = embed_spmf (\<lambda>x. enn2real (SUP p : Y. ennreal (spmf p x)))"
   51.65 +where "lub_spmf = embed_spmf (\<lambda>x. enn2real (SUP p \<in> Y. ennreal (spmf p x)))"
   51.66    \<comment> \<open>We go through @{typ ennreal} to have a sensible definition even if @{term Y} is empty.\<close>
   51.67  
   51.68  lemma lub_spmf_empty [simp]: "SPMF.lub_spmf {} = return_pmf None"
   51.69 @@ -1339,7 +1339,7 @@
   51.70    qed
   51.71  qed simp
   51.72  
   51.73 -lemma lub_spmf_subprob: "(\<integral>\<^sup>+ x. (SUP p : Y. ennreal (spmf p x)) \<partial>count_space UNIV) \<le> 1"
   51.74 +lemma lub_spmf_subprob: "(\<integral>\<^sup>+ x. (SUP p \<in> Y. ennreal (spmf p x)) \<partial>count_space UNIV) \<le> 1"
   51.75  proof(cases "Y = {}")
   51.76    case True
   51.77    thus ?thesis by(simp add: bot_ennreal)
   51.78 @@ -1348,13 +1348,13 @@
   51.79    let ?B = "\<Union>p\<in>Y. set_spmf p"
   51.80    have countable: "countable ?B" by(rule spmf_chain_countable)
   51.81  
   51.82 -  have "(\<integral>\<^sup>+ x. (SUP p:Y. ennreal (spmf p x)) \<partial>count_space UNIV) =
   51.83 -        (\<integral>\<^sup>+ x. (SUP p:Y. ennreal (spmf p x) * indicator ?B x) \<partial>count_space UNIV)"
   51.84 +  have "(\<integral>\<^sup>+ x. (SUP p\<in>Y. ennreal (spmf p x)) \<partial>count_space UNIV) =
   51.85 +        (\<integral>\<^sup>+ x. (SUP p\<in>Y. ennreal (spmf p x) * indicator ?B x) \<partial>count_space UNIV)"
   51.86      by(intro nn_integral_cong SUP_cong)(auto split: split_indicator simp add: spmf_eq_0_set_spmf)
   51.87 -  also have "\<dots> = (\<integral>\<^sup>+ x. (SUP p:Y. ennreal (spmf p x)) \<partial>count_space ?B)"
   51.88 +  also have "\<dots> = (\<integral>\<^sup>+ x. (SUP p\<in>Y. ennreal (spmf p x)) \<partial>count_space ?B)"
   51.89      unfolding ennreal_indicator[symmetric] using False
   51.90      by(subst SUP_mult_right_ennreal[symmetric])(simp add: ennreal_indicator nn_integral_count_space_indicator)
   51.91 -  also have "\<dots> = (SUP p:Y. \<integral>\<^sup>+ x. spmf p x \<partial>count_space ?B)" using False _ countable
   51.92 +  also have "\<dots> = (SUP p\<in>Y. \<integral>\<^sup>+ x. spmf p x \<partial>count_space ?B)" using False _ countable
   51.93      by(rule nn_integral_monotone_convergence_SUP_countable)(rule chain_ord_spmf_eqD)
   51.94    also have "\<dots> \<le> 1"
   51.95    proof(rule SUP_least)
   51.96 @@ -1373,23 +1373,23 @@
   51.97  
   51.98  lemma spmf_lub_spmf:
   51.99    assumes "Y \<noteq> {}"
  51.100 -  shows "spmf lub_spmf x = (SUP p : Y. spmf p x)"
  51.101 +  shows "spmf lub_spmf x = (SUP p \<in> Y. spmf p x)"
  51.102  proof -
  51.103    from assms obtain p where "p \<in> Y" by auto
  51.104 -  have "spmf lub_spmf x = max 0 (enn2real (SUP p:Y. ennreal (spmf p x)))" unfolding lub_spmf_def
  51.105 +  have "spmf lub_spmf x = max 0 (enn2real (SUP p\<in>Y. ennreal (spmf p x)))" unfolding lub_spmf_def
  51.106      by(rule spmf_embed_spmf)(simp del: SUP_eq_top_iff Sup_eq_top_iff add: ennreal_enn2real_if SUP_spmf_neq_top' lub_spmf_subprob)
  51.107 -  also have "\<dots> = enn2real (SUP p:Y. ennreal (spmf p x))"
  51.108 +  also have "\<dots> = enn2real (SUP p\<in>Y. ennreal (spmf p x))"
  51.109      by(rule max_absorb2)(simp)
  51.110 -  also have "\<dots> = enn2real (ennreal (SUP p : Y. spmf p x))" using assms
  51.111 +  also have "\<dots> = enn2real (ennreal (SUP p \<in> Y. spmf p x))" using assms
  51.112      by(subst ennreal_SUP[symmetric])(simp_all add: SUP_spmf_neq_top' del: SUP_eq_top_iff Sup_eq_top_iff)
  51.113    also have "0 \<le> (\<Squnion>p\<in>Y. spmf p x)" using assms
  51.114      by(auto intro!: cSUP_upper2 bdd_aboveI[where M=1] simp add: pmf_le_1)
  51.115 -  then have "enn2real (ennreal (SUP p : Y. spmf p x)) = (SUP p : Y. spmf p x)"
  51.116 +  then have "enn2real (ennreal (SUP p \<in> Y. spmf p x)) = (SUP p \<in> Y. spmf p x)"
  51.117      by(rule enn2real_ennreal)
  51.118    finally show ?thesis .
  51.119  qed
  51.120  
  51.121 -lemma ennreal_spmf_lub_spmf: "Y \<noteq> {} \<Longrightarrow> ennreal (spmf lub_spmf x) = (SUP p:Y. ennreal (spmf p x))"
  51.122 +lemma ennreal_spmf_lub_spmf: "Y \<noteq> {} \<Longrightarrow> ennreal (spmf lub_spmf x) = (SUP p\<in>Y. ennreal (spmf p x))"
  51.123  unfolding spmf_lub_spmf by(subst ennreal_SUP)(simp_all add: SUP_spmf_neq_top' del: SUP_eq_top_iff Sup_eq_top_iff)
  51.124  
  51.125  lemma lub_spmf_upper:
  51.126 @@ -1398,7 +1398,7 @@
  51.127  proof(rule ord_pmf_increaseI)
  51.128    fix x
  51.129    from p have [simp]: "Y \<noteq> {}" by auto
  51.130 -  from p have "ennreal (spmf p x) \<le> (SUP p:Y. ennreal (spmf p x))" by(rule SUP_upper)
  51.131 +  from p have "ennreal (spmf p x) \<le> (SUP p\<in>Y. ennreal (spmf p x))" by(rule SUP_upper)
  51.132    also have "\<dots> = ennreal (spmf lub_spmf x)" using p
  51.133      by(subst spmf_lub_spmf)(auto simp add: ennreal_SUP SUP_spmf_neq_top' simp del: SUP_eq_top_iff Sup_eq_top_iff)
  51.134    finally show "spmf p x \<le> spmf lub_spmf x" by simp
  51.135 @@ -1413,7 +1413,7 @@
  51.136    proof(rule ord_pmf_increaseI)
  51.137      fix x
  51.138      from nonempty obtain p where p: "p \<in> Y" by auto
  51.139 -    have "ennreal (spmf lub_spmf x) = (SUP p:Y. ennreal (spmf p x))"
  51.140 +    have "ennreal (spmf lub_spmf x) = (SUP p\<in>Y. ennreal (spmf p x))"
  51.141        by(subst spmf_lub_spmf)(auto simp add: ennreal_SUP SUP_spmf_neq_top' nonempty simp del: SUP_eq_top_iff Sup_eq_top_iff)
  51.142      also have "\<dots> \<le> ennreal (spmf z x)" by(rule SUP_least)(simp add: ord_spmf_eq_leD z)
  51.143      finally show "spmf lub_spmf x \<le> spmf z x" by simp
  51.144 @@ -1438,16 +1438,16 @@
  51.145  
  51.146  lemma emeasure_lub_spmf:
  51.147    assumes Y: "Y \<noteq> {}"
  51.148 -  shows "emeasure (measure_spmf lub_spmf) A = (SUP y:Y. emeasure (measure_spmf y) A)"
  51.149 +  shows "emeasure (measure_spmf lub_spmf) A = (SUP y\<in>Y. emeasure (measure_spmf y) A)"
  51.150    (is "?lhs = ?rhs")
  51.151  proof -
  51.152    let ?M = "count_space (set_spmf lub_spmf)"
  51.153    have "?lhs = \<integral>\<^sup>+ x. ennreal (spmf lub_spmf x) * indicator A x \<partial>?M"
  51.154      by(auto simp add: nn_integral_indicator[symmetric] nn_integral_measure_spmf')
  51.155 -  also have "\<dots> = \<integral>\<^sup>+ x. (SUP y:Y. ennreal (spmf y x) * indicator A x) \<partial>?M"
  51.156 +  also have "\<dots> = \<integral>\<^sup>+ x. (SUP y\<in>Y. ennreal (spmf y x) * indicator A x) \<partial>?M"
  51.157      unfolding ennreal_indicator[symmetric]
  51.158      by(simp add: spmf_lub_spmf assms ennreal_SUP[OF SUP_spmf_neq_top'] SUP_mult_right_ennreal)
  51.159 -  also from assms have "\<dots> = (SUP y:Y. \<integral>\<^sup>+ x. ennreal (spmf y x) * indicator A x \<partial>?M)"
  51.160 +  also from assms have "\<dots> = (SUP y\<in>Y. \<integral>\<^sup>+ x. ennreal (spmf y x) * indicator A x \<partial>?M)"
  51.161    proof(rule nn_integral_monotone_convergence_SUP_countable)
  51.162      have "(\<lambda>i x. ennreal (spmf i x) * indicator A x) ` Y = (\<lambda>f x. f x * indicator A x) ` (\<lambda>p x. ennreal (spmf p x)) ` Y"
  51.163        by(simp add: image_image)
  51.164 @@ -1455,7 +1455,7 @@
  51.165        by(rule chain_imageI)(auto simp add: le_fun_def split: split_indicator)
  51.166      finally show "Complete_Partial_Order.chain (\<le>) ((\<lambda>i x. ennreal (spmf i x) * indicator A x) ` Y)" .
  51.167    qed simp
  51.168 -  also have "\<dots> = (SUP y:Y. \<integral>\<^sup>+ x. ennreal (spmf y x) * indicator A x \<partial>count_space UNIV)"
  51.169 +  also have "\<dots> = (SUP y\<in>Y. \<integral>\<^sup>+ x. ennreal (spmf y x) * indicator A x \<partial>count_space UNIV)"
  51.170      by(auto simp add: nn_integral_count_space_indicator set_lub_spmf spmf_eq_0_set_spmf split: split_indicator intro!: SUP_cong nn_integral_cong)
  51.171    also have "\<dots> = ?rhs"
  51.172      by(auto simp add: nn_integral_indicator[symmetric] nn_integral_measure_spmf)
  51.173 @@ -1464,7 +1464,7 @@
  51.174  
  51.175  lemma measure_lub_spmf:
  51.176    assumes Y: "Y \<noteq> {}"
  51.177 -  shows "measure (measure_spmf lub_spmf) A = (SUP y:Y. measure (measure_spmf y) A)" (is "?lhs = ?rhs")
  51.178 +  shows "measure (measure_spmf lub_spmf) A = (SUP y\<in>Y. measure (measure_spmf y) A)" (is "?lhs = ?rhs")
  51.179  proof -
  51.180    have "ennreal ?lhs = ennreal ?rhs"
  51.181      using emeasure_lub_spmf[OF assms] SUP_emeasure_spmf_neq_top[of A Y] Y
  51.182 @@ -1476,12 +1476,12 @@
  51.183  
  51.184  lemma weight_lub_spmf:
  51.185    assumes Y: "Y \<noteq> {}"
  51.186 -  shows "weight_spmf lub_spmf = (SUP y:Y. weight_spmf y)"
  51.187 +  shows "weight_spmf lub_spmf = (SUP y\<in>Y. weight_spmf y)"
  51.188  unfolding weight_spmf_def by(rule measure_lub_spmf) fact
  51.189  
  51.190  lemma measure_spmf_lub_spmf:
  51.191    assumes Y: "Y \<noteq> {}"
  51.192 -  shows "measure_spmf lub_spmf = (SUP p:Y. measure_spmf p)" (is "?lhs = ?rhs")
  51.193 +  shows "measure_spmf lub_spmf = (SUP p\<in>Y. measure_spmf p)" (is "?lhs = ?rhs")
  51.194  proof(rule measure_eqI)
  51.195    from assms obtain p where p: "p \<in> Y" by auto
  51.196    from chain have chain': "Complete_Partial_Order.chain (\<le>) (measure_spmf ` Y)"
  51.197 @@ -1583,11 +1583,11 @@
  51.198      let ?M = "count_space (set_spmf (lub_spmf Y))"
  51.199      have "ennreal (spmf ?lhs i) = \<integral>\<^sup>+ x. ennreal (spmf (lub_spmf Y) x) * ennreal (spmf (f x) i) \<partial>?M"
  51.200        by(auto simp add: ennreal_spmf_lub_spmf ennreal_spmf_bind nn_integral_measure_spmf')
  51.201 -    also have "\<dots> = \<integral>\<^sup>+ x. (SUP p:Y. ennreal (spmf p x * spmf (f x) i)) \<partial>?M"
  51.202 +    also have "\<dots> = \<integral>\<^sup>+ x. (SUP p\<in>Y. ennreal (spmf p x * spmf (f x) i)) \<partial>?M"
  51.203        by(subst ennreal_spmf_lub_spmf[OF chain Y])(subst SUP_mult_right_ennreal, simp_all add: ennreal_mult Y)
  51.204 -    also have "\<dots> = (SUP p:Y. \<integral>\<^sup>+ x. ennreal (spmf p x * spmf (f x) i) \<partial>?M)"
  51.205 +    also have "\<dots> = (SUP p\<in>Y. \<integral>\<^sup>+ x. ennreal (spmf p x * spmf (f x) i) \<partial>?M)"
  51.206        using Y chain' by(rule nn_integral_monotone_convergence_SUP_countable) simp
  51.207 -    also have "\<dots> = (SUP p:Y. ennreal (spmf (bind_spmf p f) i))"
  51.208 +    also have "\<dots> = (SUP p\<in>Y. ennreal (spmf (bind_spmf p f) i))"
  51.209        by(auto simp add: ennreal_spmf_bind nn_integral_measure_spmf nn_integral_count_space_indicator set_lub_spmf[OF chain] in_set_spmf_iff_spmf ennreal_mult intro!: SUP_cong nn_integral_cong split: split_indicator)
  51.210      also have "\<dots> = ennreal (spmf ?rhs i)" using chain'' by(simp add: ennreal_spmf_lub_spmf Y)
  51.211      finally show "spmf ?lhs i = spmf ?rhs i" by simp
  51.212 @@ -1619,12 +1619,12 @@
  51.213      have chain''': "Complete_Partial_Order.chain (ord_spmf (=)) ((\<lambda>p. bind_spmf x (\<lambda>y. g y p)) ` Y)"
  51.214        using chain by(rule chain_imageI)(rule monotone_bind_spmf2[OF g, THEN monotoneD])
  51.215  
  51.216 -    have "ennreal (spmf ?lhs i) = \<integral>\<^sup>+ y. (SUP p:Y. ennreal (spmf x y * spmf (g y p) i)) \<partial>count_space (set_spmf x)"
  51.217 +    have "ennreal (spmf ?lhs i) = \<integral>\<^sup>+ y. (SUP p\<in>Y. ennreal (spmf x y * spmf (g y p) i)) \<partial>count_space (set_spmf x)"
  51.218        by(simp add: ennreal_spmf_bind ennreal_spmf_lub_spmf[OF chain'] Y nn_integral_measure_spmf' SUP_mult_left_ennreal ennreal_mult)
  51.219 -    also have "\<dots> = (SUP p:Y. \<integral>\<^sup>+ y. ennreal (spmf x y * spmf (g y p) i) \<partial>count_space (set_spmf x))"
  51.220 +    also have "\<dots> = (SUP p\<in>Y. \<integral>\<^sup>+ y. ennreal (spmf x y * spmf (g y p) i) \<partial>count_space (set_spmf x))"
  51.221        unfolding nn_integral_measure_spmf' using Y chain''
  51.222        by(rule nn_integral_monotone_convergence_SUP_countable) simp
  51.223 -    also have "\<dots> = (SUP p:Y. ennreal (spmf (bind_spmf x (\<lambda>y. g y p)) i))"
  51.224 +    also have "\<dots> = (SUP p\<in>Y. ennreal (spmf (bind_spmf x (\<lambda>y. g y p)) i))"
  51.225        by(simp add: ennreal_spmf_bind nn_integral_measure_spmf' ennreal_mult)
  51.226      also have "\<dots> = ennreal (spmf ?rhs i)" using chain'''
  51.227        by(auto simp add: ennreal_spmf_lub_spmf Y)
  51.228 @@ -1775,9 +1775,9 @@
  51.229        by(auto simp add: weight_lub_spmf chain1 chain2 Y rel_spmf_weightD[OF R, symmetric] intro!: cSUP_least intro: cSUP_upper2[OF bdd_aboveI2[OF weight_spmf_le_1]])
  51.230  
  51.231      fix A
  51.232 -    have "measure (measure_spmf (lub_spmf (fst ` Y))) A = (SUP y:fst ` Y. measure (measure_spmf y) A)"
  51.233 +    have "measure (measure_spmf (lub_spmf (fst ` Y))) A = (SUP y\<in>fst ` Y. measure (measure_spmf y) A)"
  51.234        using chain1 Y1 by(rule measure_lub_spmf)
  51.235 -    also have "\<dots> \<le> (SUP y:snd ` Y. measure (measure_spmf y) {y. \<exists>x\<in>A. R x y})" using Y1
  51.236 +    also have "\<dots> \<le> (SUP y\<in>snd ` Y. measure (measure_spmf y) {y. \<exists>x\<in>A. R x y})" using Y1
  51.237        by(rule cSUP_least)(auto intro!: cSUP_upper2[OF bdd_aboveI2[OF measure_spmf.subprob_measure_le_1]] rel_spmf_measureD R)
  51.238      also have "\<dots> = measure (measure_spmf (lub_spmf (snd ` Y))) {y. \<exists>x\<in>A. R x y}"
  51.239        using chain2 Y2 by(rule measure_lub_spmf[symmetric])
    52.1 --- a/src/HOL/Probability/Stream_Space.thy	Wed Nov 07 23:03:45 2018 +0100
    52.2 +++ b/src/HOL/Probability/Stream_Space.thy	Thu Nov 08 09:11:52 2018 +0100
    52.3 @@ -279,7 +279,7 @@
    52.4             simp add: sets_PiM_eq_proj snth_in space sets cong: measurable_cong_sets)
    52.5  
    52.6  lemma sets_stream_space_eq: "sets (stream_space M) =
    52.7 -    sets (SUP i:UNIV. vimage_algebra (streams (space M)) (\<lambda>s. s !! i) M)"
    52.8 +    sets (SUP i\<in>UNIV. vimage_algebra (streams (space M)) (\<lambda>s. s !! i) M)"
    52.9    by (auto intro!: sets_stream_space_in_sets sets_Sup_in_sets sets_image_in_sets
   52.10                     measurable_Sup1 snth_in measurable_vimage_algebra1 del: subsetI
   52.11             simp: space_Sup_eq_UN space_stream_space)
    53.1 --- a/src/HOL/Probability/Weak_Convergence.thy	Wed Nov 07 23:03:45 2018 +0100
    53.2 +++ b/src/HOL/Probability/Weak_Convergence.thy	Thu Nov 08 09:11:52 2018 +0100
    53.3 @@ -53,7 +53,7 @@
    53.4      by (auto intro!: cInf_lower bdd)
    53.5  
    53.6    { assume *: "I \<omega> \<le> x"
    53.7 -    have "\<omega> \<le> (INF s:{x. \<omega> \<le> f x}. f s)"
    53.8 +    have "\<omega> \<le> (INF s\<in>{x. \<omega> \<le> f x}. f s)"
    53.9        by (rule cINF_greatest[OF ne]) auto
   53.10      also have "\<dots> = f (I \<omega>)"
   53.11        using continuous_at_Inf_mono[OF mono cont ne bdd] ..
    54.1 --- a/src/HOL/Real_Vector_Spaces.thy	Wed Nov 07 23:03:45 2018 +0100
    54.2 +++ b/src/HOL/Real_Vector_Spaces.thy	Thu Nov 08 09:11:52 2018 +0100
    54.3 @@ -597,7 +597,7 @@
    54.4    assumes dist_norm: "dist x y = norm (x - y)"
    54.5  
    54.6  class uniformity_dist = dist + uniformity +
    54.7 -  assumes uniformity_dist: "uniformity = (INF e:{0 <..}. principal {(x, y). dist x y < e})"
    54.8 +  assumes uniformity_dist: "uniformity = (INF e\<in>{0 <..}. principal {(x, y). dist x y < e})"
    54.9  begin
   54.10  
   54.11  lemma eventually_uniformity_metric:
   54.12 @@ -1133,7 +1133,7 @@
   54.13  definition dist_real_def: "dist x y = \<bar>x - y\<bar>"
   54.14  
   54.15  definition uniformity_real_def [code del]:
   54.16 -  "(uniformity :: (real \<times> real) filter) = (INF e:{0 <..}. principal {(x, y). dist x y < e})"
   54.17 +  "(uniformity :: (real \<times> real) filter) = (INF e\<in>{0 <..}. principal {(x, y). dist x y < e})"
   54.18  
   54.19  definition open_real_def [code del]:
   54.20    "open (U :: real set) \<longleftrightarrow> (\<forall>x\<in>U. eventually (\<lambda>(x', y). x' = x \<longrightarrow> y \<in> U) uniformity)"
   54.21 @@ -1611,7 +1611,7 @@
   54.22  
   54.23  subsection \<open>Filters and Limits on Metric Space\<close>
   54.24  
   54.25 -lemma (in metric_space) nhds_metric: "nhds x = (INF e:{0 <..}. principal {y. dist y x < e})"
   54.26 +lemma (in metric_space) nhds_metric: "nhds x = (INF e\<in>{0 <..}. principal {y. dist y x < e})"
   54.27    unfolding nhds_def
   54.28  proof (safe intro!: INF_eq)
   54.29    fix S
    55.1 --- a/src/HOL/Topological_Spaces.thy	Wed Nov 07 23:03:45 2018 +0100
    55.2 +++ b/src/HOL/Topological_Spaces.thy	Thu Nov 08 09:11:52 2018 +0100
    55.3 @@ -517,7 +517,7 @@
    55.4    by (auto simp: nhds_discrete filterlim_principal)
    55.5  
    55.6  lemma (in topological_space) at_within_eq:
    55.7 -  "at x within s = (INF S:{S. open S \<and> x \<in> S}. principal (S \<inter> s - {x}))"
    55.8 +  "at x within s = (INF S\<in>{S. open S \<and> x \<in> S}. principal (S \<inter> s - {x}))"
    55.9    unfolding nhds_def at_within_def
   55.10    by (subst INF_inf_const2[symmetric]) (auto simp: Diff_Int_distrib)
   55.11  
   55.12 @@ -575,7 +575,7 @@
   55.13    by (simp add: at_eq_bot_iff not_open_singleton)
   55.14  
   55.15  lemma (in order_topology) nhds_order:
   55.16 -  "nhds x = inf (INF a:{x <..}. principal {..< a}) (INF a:{..< x}. principal {a <..})"
   55.17 +  "nhds x = inf (INF a\<in>{x <..}. principal {..< a}) (INF a\<in>{..< x}. principal {a <..})"
   55.18  proof -
   55.19    have 1: "{S \<in> range lessThan \<union> range greaterThan. x \<in> S} =
   55.20        (\<lambda>a. {..< a}) ` {x <..} \<union> (\<lambda>a. {a <..}) ` {..< x}"
   55.21 @@ -616,8 +616,8 @@
   55.22  lemma (in linorder_topology) at_within_order:
   55.23    assumes "UNIV \<noteq> {x}"
   55.24    shows "at x within s =
   55.25 -    inf (INF a:{x <..}. principal ({..< a} \<inter> s - {x}))
   55.26 -        (INF a:{..< x}. principal ({a <..} \<inter> s - {x}))"
   55.27 +    inf (INF a\<in>{x <..}. principal ({..< a} \<inter> s - {x}))
   55.28 +        (INF a\<in>{..< x}. principal ({a <..} \<inter> s - {x}))"
   55.29  proof (cases "{x <..} = {}" "{..< x} = {}" rule: case_split [case_product case_split])
   55.30    case True_True
   55.31    have "UNIV = {..< x} \<union> {x} \<union> {x <..}"
   55.32 @@ -628,7 +628,7 @@
   55.33        inf_principal[symmetric] INF_inf_const2 inf_sup_aci[where 'a="'a filter"])
   55.34  
   55.35  lemma (in linorder_topology) at_left_eq:
   55.36 -  "y < x \<Longrightarrow> at_left x = (INF a:{..< x}. principal {a <..< x})"
   55.37 +  "y < x \<Longrightarrow> at_left x = (INF a\<in>{..< x}. principal {a <..< x})"
   55.38    by (subst at_within_order)
   55.39       (auto simp: greaterThan_Int_greaterThan greaterThanLessThan_eq[symmetric] min.absorb2 INF_constant
   55.40             intro!: INF_lower2 inf_absorb2)
   55.41 @@ -639,7 +639,7 @@
   55.42    by (subst eventually_INF_base) (auto simp: eventually_principal Ball_def)
   55.43  
   55.44  lemma (in linorder_topology) at_right_eq:
   55.45 -  "x < y \<Longrightarrow> at_right x = (INF a:{x <..}. principal {x <..< a})"
   55.46 +  "x < y \<Longrightarrow> at_right x = (INF a\<in>{x <..}. principal {x <..< a})"
   55.47    by (subst at_within_order)
   55.48       (auto simp: lessThan_Int_lessThan greaterThanLessThan_eq[symmetric] max.absorb2 INF_constant Int_commute
   55.49             intro!: INF_lower2 inf_absorb1)
   55.50 @@ -3039,11 +3039,11 @@
   55.51    assumes "mono f"
   55.52      and cont: "continuous (at_left (Sup S)) f"
   55.53      and S: "S \<noteq> {}" "bdd_above S"
   55.54 -  shows "f (Sup S) = (SUP s:S. f s)"
   55.55 +  shows "f (Sup S) = (SUP s\<in>S. f s)"
   55.56  proof (rule antisym)
   55.57    have f: "(f \<longlongrightarrow> f (Sup S)) (at_left (Sup S))"
   55.58      using cont unfolding continuous_within .
   55.59 -  show "f (Sup S) \<le> (SUP s:S. f s)"
   55.60 +  show "f (Sup S) \<le> (SUP s\<in>S. f s)"
   55.61    proof cases
   55.62      assume "Sup S \<in> S"
   55.63      then show ?thesis
   55.64 @@ -3057,8 +3057,8 @@
   55.65      show ?thesis
   55.66      proof (rule ccontr)
   55.67        assume "\<not> ?thesis"
   55.68 -      with order_tendstoD(1)[OF f, of "SUP s:S. f s"] obtain b where "b < Sup S"
   55.69 -        and *: "\<And>y. b < y \<Longrightarrow> y < Sup S \<Longrightarrow> (SUP s:S. f s) < f y"
   55.70 +      with order_tendstoD(1)[OF f, of "SUP s\<in>S. f s"] obtain b where "b < Sup S"
   55.71 +        and *: "\<And>y. b < y \<Longrightarrow> y < Sup S \<Longrightarrow> (SUP s\<in>S. f s) < f y"
   55.72          by (auto simp: not_le eventually_at_left[OF \<open>s < Sup S\<close>])
   55.73        with \<open>S \<noteq> {}\<close> obtain c where "c \<in> S" "b < c"
   55.74          using less_cSupD[of S b] by auto
   55.75 @@ -3077,11 +3077,11 @@
   55.76    assumes "antimono f"
   55.77      and cont: "continuous (at_left (Sup S)) f"
   55.78      and S: "S \<noteq> {}" "bdd_above S"
   55.79 -  shows "f (Sup S) = (INF s:S. f s)"
   55.80 +  shows "f (Sup S) = (INF s\<in>S. f s)"
   55.81  proof (rule antisym)
   55.82    have f: "(f \<longlongrightarrow> f (Sup S)) (at_left (Sup S))"
   55.83      using cont unfolding continuous_within .
   55.84 -  show "(INF s:S. f s) \<le> f (Sup S)"
   55.85 +  show "(INF s\<in>S. f s) \<le> f (Sup S)"
   55.86    proof cases
   55.87      assume "Sup S \<in> S"
   55.88      then show ?thesis
   55.89 @@ -3095,8 +3095,8 @@
   55.90      show ?thesis
   55.91      proof (rule ccontr)
   55.92        assume "\<not> ?thesis"
   55.93 -      with order_tendstoD(2)[OF f, of "INF s:S. f s"] obtain b where "b < Sup S"
   55.94 -        and *: "\<And>y. b < y \<Longrightarrow> y < Sup S \<Longrightarrow> f y < (INF s:S. f s)"
   55.95 +      with order_tendstoD(2)[OF f, of "INF s\<in>S. f s"] obtain b where "b < Sup S"
   55.96 +        and *: "\<And>y. b < y \<Longrightarrow> y < Sup S \<Longrightarrow> f y < (INF s\<in>S. f s)"
   55.97          by (auto simp: not_le eventually_at_left[OF \<open>s < Sup S\<close>])
   55.98        with \<open>S \<noteq> {}\<close> obtain c where "c \<in> S" "b < c"
   55.99          using less_cSupD[of S b] by auto
  55.100 @@ -3115,11 +3115,11 @@
  55.101    assumes "mono f"
  55.102      and cont: "continuous (at_right (Inf S)) f"
  55.103      and S: "S \<noteq> {}" "bdd_below S"
  55.104 -  shows "f (Inf S) = (INF s:S. f s)"
  55.105 +  shows "f (Inf S) = (INF s\<in>S. f s)"
  55.106  proof (rule antisym)
  55.107    have f: "(f \<longlongrightarrow> f (Inf S)) (at_right (Inf S))"
  55.108      using cont unfolding continuous_within .
  55.109 -  show "(INF s:S. f s) \<le> f (Inf S)"
  55.110 +  show "(INF s\<in>S. f s) \<le> f (Inf S)"
  55.111    proof cases
  55.112      assume "Inf S \<in> S"
  55.113      then show ?thesis
  55.114 @@ -3133,8 +3133,8 @@
  55.115      show ?thesis
  55.116      proof (rule ccontr)
  55.117        assume "\<not> ?thesis"
  55.118 -      with order_tendstoD(2)[OF f, of "INF s:S. f s"] obtain b where "Inf S < b"
  55.119 -        and *: "\<And>y. Inf S < y \<Longrightarrow> y < b \<Longrightarrow> f y < (INF s:S. f s)"
  55.120 +      with order_tendstoD(2)[OF f, of "INF s\<in>S. f s"] obtain b where "Inf S < b"
  55.121 +        and *: "\<And>y. Inf S < y \<Longrightarrow> y < b \<Longrightarrow> f y < (INF s\<in>S. f s)"
  55.122          by (auto simp: not_le eventually_at_right[OF \<open>Inf S < s\<close>])
  55.123        with \<open>S \<noteq> {}\<close> obtain c where "c \<in> S" "c < b"
  55.124          using cInf_lessD[of S b] by auto
  55.125 @@ -3153,11 +3153,11 @@
  55.126    assumes "antimono f"
  55.127      and cont: "continuous (at_right (Inf S)) f"
  55.128      and S: "S \<noteq> {}" "bdd_below S"
  55.129 -  shows "f (Inf S) = (SUP s:S. f s)"
  55.130 +  shows "f (Inf S) = (SUP s\<in>S. f s)"
  55.131  proof (rule antisym)
  55.132    have f: "(f \<longlongrightarrow> f (Inf S)) (at_right (Inf S))"
  55.133      using cont unfolding continuous_within .
  55.134 -  show "f (Inf S) \<le> (SUP s:S. f s)"
  55.135 +  show "f (Inf S) \<le> (SUP s\<in>S. f s)"
  55.136    proof cases
  55.137      assume "Inf S \<in> S"
  55.138      then show ?thesis
  55.139 @@ -3171,8 +3171,8 @@
  55.140      show ?thesis
  55.141      proof (rule ccontr)
  55.142        assume "\<not> ?thesis"
  55.143 -      with order_tendstoD(1)[OF f, of "SUP s:S. f s"] obtain b where "Inf S < b"
  55.144 -        and *: "\<And>y. Inf S < y \<Longrightarrow> y < b \<Longrightarrow> (SUP s:S. f s) < f y"
  55.145 +      with order_tendstoD(1)[OF f, of "SUP s\<in>S. f s"] obtain b where "Inf S < b"
  55.146 +        and *: "\<And>y. Inf S < y \<Longrightarrow> y < b \<Longrightarrow> (SUP s\<in>S. f s) < f y"
  55.147          by (auto simp: not_le eventually_at_right[OF \<open>Inf S < s\<close>])
  55.148        with \<open>S \<noteq> {}\<close> obtain c where "c \<in> S" "c < b"
  55.149          using cInf_lessD[of S b] by auto
  55.150 @@ -3529,14 +3529,14 @@
  55.151  proof (subst prod_filter_INF, auto intro!: antisym INF_greatest simp: principal_prod_principal)
  55.152    fix S T
  55.153    assume "open S" "a \<in> S" "open T" "b \<in> T"
  55.154 -  then show "(INF x : {S. open S \<and> (a, b) \<in> S}. principal x) \<le> principal (S \<times> T)"
  55.155 +  then show "(INF x \<in> {S. open S \<and> (a, b) \<in> S}. principal x) \<le> principal (S \<times> T)"
  55.156      by (intro INF_lower) (auto intro!: open_Times)
  55.157  next
  55.158    fix S'
  55.159    assume "open S'" "(a, b) \<in> S'"
  55.160    then obtain S T where "open S" "a \<in> S" "open T" "b \<in> T" "S \<times> T \<subseteq> S'"
  55.161      by (auto elim: open_prod_elim)
  55.162 -  then show "(INF x : {S. open S \<and> a \<in> S}. INF y : {S. open S \<and> b \<in> S}.
  55.163 +  then show "(INF x \<in> {S. open S \<and> a \<in> S}. INF y \<in> {S. open S \<and> b \<in> S}.
  55.164        principal (x \<times> y)) \<le> principal S'"
  55.165      by (auto intro!: INF_lower2)
  55.166  qed