tagged 21 theories in the Analysis library for the manual
authorAngeliki KoutsoukouArgyraki <ak2110@cam.ac.uk>
Tue Aug 28 13:28:39 2018 +0100 (12 months ago)
changeset 68833fde093888c16
parent 68824 7414ce0256e1
child 68834 43334463428a
tagged 21 theories in the Analysis library for the manual
src/HOL/Analysis/Arcwise_Connected.thy
src/HOL/Analysis/Binary_Product_Measure.thy
src/HOL/Analysis/Bochner_Integration.thy
src/HOL/Analysis/Borel_Space.thy
src/HOL/Analysis/Caratheodory.thy
src/HOL/Analysis/Cartesian_Euclidean_Space.thy
src/HOL/Analysis/Cartesian_Space.thy
src/HOL/Analysis/Change_Of_Vars.thy
src/HOL/Analysis/Cross3.thy
src/HOL/Analysis/Determinants.thy
src/HOL/Analysis/Finite_Cartesian_Product.thy
src/HOL/Analysis/Finite_Product_Measure.thy
src/HOL/Analysis/Function_Topology.thy
src/HOL/Analysis/Further_Topology.thy
src/HOL/Analysis/Homeomorphism.thy
src/HOL/Analysis/Operator_Norm.thy
src/HOL/Analysis/Ordered_Euclidean_Space.thy
src/HOL/Analysis/Poly_Roots.thy
src/HOL/Analysis/Polytope.thy
src/HOL/Analysis/Vitali_Covering_Theorem.thy
src/HOL/Analysis/Weierstrass_Theorems.thy
     1.1 --- a/src/HOL/Analysis/Arcwise_Connected.thy	Mon Aug 27 22:58:36 2018 +0200
     1.2 +++ b/src/HOL/Analysis/Arcwise_Connected.thy	Tue Aug 28 13:28:39 2018 +0100
     1.3 @@ -9,14 +9,14 @@
     1.4  
     1.5  begin
     1.6  
     1.7 -subsection\<open>The Brouwer reduction theorem\<close>
     1.8 +subsection%important \<open>The Brouwer reduction theorem\<close>
     1.9  
    1.10 -theorem Brouwer_reduction_theorem_gen:
    1.11 +theorem%important Brouwer_reduction_theorem_gen:
    1.12    fixes S :: "'a::euclidean_space set"
    1.13    assumes "closed S" "\<phi> S"
    1.14        and \<phi>: "\<And>F. \<lbrakk>\<And>n. closed(F n); \<And>n. \<phi>(F n); \<And>n. F(Suc n) \<subseteq> F n\<rbrakk> \<Longrightarrow> \<phi>(\<Inter>range F)"
    1.15    obtains T where "T \<subseteq> S" "closed T" "\<phi> T" "\<And>U. \<lbrakk>U \<subseteq> S; closed U; \<phi> U\<rbrakk> \<Longrightarrow> \<not> (U \<subset> T)"
    1.16 -proof -
    1.17 +proof%unimportant -
    1.18    obtain B :: "nat \<Rightarrow> 'a set"
    1.19      where "inj B" "\<And>n. open(B n)" and open_cov: "\<And>S. open S \<Longrightarrow> \<exists>K. S = \<Union>(B ` K)"
    1.20        by (metis Setcompr_eq_image that univ_second_countable_sequence)
    1.21 @@ -79,13 +79,13 @@
    1.22    qed
    1.23  qed
    1.24  
    1.25 -corollary Brouwer_reduction_theorem:
    1.26 +corollary%important Brouwer_reduction_theorem:
    1.27    fixes S :: "'a::euclidean_space set"
    1.28    assumes "compact S" "\<phi> S" "S \<noteq> {}"
    1.29        and \<phi>: "\<And>F. \<lbrakk>\<And>n. compact(F n); \<And>n. F n \<noteq> {}; \<And>n. \<phi>(F n); \<And>n. F(Suc n) \<subseteq> F n\<rbrakk> \<Longrightarrow> \<phi>(\<Inter>range F)"
    1.30    obtains T where "T \<subseteq> S" "compact T" "T \<noteq> {}" "\<phi> T"
    1.31                    "\<And>U. \<lbrakk>U \<subseteq> S; closed U; U \<noteq> {}; \<phi> U\<rbrakk> \<Longrightarrow> \<not> (U \<subset> T)"
    1.32 -proof (rule Brouwer_reduction_theorem_gen [of S "\<lambda>T. T \<noteq> {} \<and> T \<subseteq> S \<and> \<phi> T"])
    1.33 +proof%unimportant (rule Brouwer_reduction_theorem_gen [of S "\<lambda>T. T \<noteq> {} \<and> T \<subseteq> S \<and> \<phi> T"])
    1.34    fix F
    1.35    assume cloF: "\<And>n. closed (F n)"
    1.36       and F: "\<And>n. F n \<noteq> {} \<and> F n \<subseteq> S \<and> \<phi> (F n)" and Fsub: "\<And>n. F (Suc n) \<subseteq> F n"
    1.37 @@ -107,14 +107,14 @@
    1.38  qed (meson assms compact_imp_closed seq_compact_closed_subset seq_compact_eq_compact)+
    1.39  
    1.40  
    1.41 -subsection\<open>Arcwise Connections\<close>
    1.42 +subsection%important\<open>Arcwise Connections\<close>(*FIX ME this subsection is empty(?) *)
    1.43  
    1.44 -subsection\<open>Density of points with dyadic rational coordinates\<close>
    1.45 +subsection%important\<open>Density of points with dyadic rational coordinates\<close>
    1.46  
    1.47 -proposition closure_dyadic_rationals:
    1.48 +proposition%important closure_dyadic_rationals:
    1.49      "closure (\<Union>k. \<Union>f \<in> Basis \<rightarrow> \<int>.
    1.50                     { \<Sum>i :: 'a :: euclidean_space \<in> Basis. (f i / 2^k) *\<^sub>R i }) = UNIV"
    1.51 -proof -
    1.52 +proof%unimportant -
    1.53    have "x \<in> closure (\<Union>k. \<Union>f \<in> Basis \<rightarrow> \<int>. {\<Sum>i \<in> Basis. (f i / 2^k) *\<^sub>R i})" for x::'a
    1.54    proof (clarsimp simp: closure_approachable)
    1.55      fix e::real
    1.56 @@ -152,9 +152,9 @@
    1.57    then show ?thesis by auto
    1.58  qed
    1.59  
    1.60 -corollary closure_rational_coordinates:
    1.61 +corollary%important closure_rational_coordinates:
    1.62      "closure (\<Union>f \<in> Basis \<rightarrow> \<rat>. { \<Sum>i :: 'a :: euclidean_space \<in> Basis. f i *\<^sub>R i }) = UNIV"
    1.63 -proof -
    1.64 +proof%unimportant -
    1.65    have *: "(\<Union>k. \<Union>f \<in> Basis \<rightarrow> \<int>. { \<Sum>i::'a \<in> Basis. (f i / 2^k) *\<^sub>R i })
    1.66             \<subseteq> (\<Union>f \<in> Basis \<rightarrow> \<rat>. { \<Sum>i \<in> Basis. f i *\<^sub>R i })"
    1.67    proof clarsimp
    1.68 @@ -168,7 +168,7 @@
    1.69      using closure_dyadic_rationals closure_mono [OF *] by blast
    1.70  qed
    1.71  
    1.72 -lemma closure_dyadic_rationals_in_convex_set:
    1.73 +lemma%unimportant closure_dyadic_rationals_in_convex_set:
    1.74     "\<lbrakk>convex S; interior S \<noteq> {}\<rbrakk>
    1.75          \<Longrightarrow> closure(S \<inter>
    1.76                      (\<Union>k. \<Union>f \<in> Basis \<rightarrow> \<int>.
    1.77 @@ -176,7 +176,7 @@
    1.78              closure S"
    1.79    by (simp add: closure_dyadic_rationals closure_convex_Int_superset)
    1.80  
    1.81 -lemma closure_rationals_in_convex_set:
    1.82 +lemma%unimportant closure_rationals_in_convex_set:
    1.83     "\<lbrakk>convex S; interior S \<noteq> {}\<rbrakk>
    1.84      \<Longrightarrow> closure(S \<inter> (\<Union>f \<in> Basis \<rightarrow> \<rat>. { \<Sum>i :: 'a :: euclidean_space \<in> Basis. f i *\<^sub>R i })) =
    1.85          closure S"
    1.86 @@ -187,11 +187,11 @@
    1.87  path connection is equivalent to arcwise connection for distinct points.
    1.88  The proof is based on Whyburn's "Topological Analysis".\<close>
    1.89  
    1.90 -lemma closure_dyadic_rationals_in_convex_set_pos_1:
    1.91 +lemma%important closure_dyadic_rationals_in_convex_set_pos_1:
    1.92    fixes S :: "real set"
    1.93    assumes "convex S" and intnz: "interior S \<noteq> {}" and pos: "\<And>x. x \<in> S \<Longrightarrow> 0 \<le> x"
    1.94      shows "closure(S \<inter> (\<Union>k m. {of_nat m / 2^k})) = closure S"
    1.95 -proof -
    1.96 +proof%unimportant -
    1.97    have "\<exists>m. f 1/2^k = real m / 2^k" if "(f 1) / 2^k \<in> S" "f 1 \<in> \<int>" for k and f :: "real \<Rightarrow> real"
    1.98      using that by (force simp: Ints_def zero_le_divide_iff power_le_zero_eq dest: pos zero_le_imp_eq_int)
    1.99    then have "S \<inter> (\<Union>k m. {real m / 2^k}) = S \<inter>
   1.100 @@ -202,13 +202,13 @@
   1.101  qed
   1.102  
   1.103  
   1.104 -definition dyadics :: "'a::field_char_0 set" where "dyadics \<equiv> \<Union>k m. {of_nat m / 2^k}"
   1.105 +definition%important dyadics :: "'a::field_char_0 set" where "dyadics \<equiv> \<Union>k m. {of_nat m / 2^k}"
   1.106  
   1.107 -lemma real_in_dyadics [simp]: "real m \<in> dyadics"
   1.108 +lemma%unimportant real_in_dyadics [simp]: "real m \<in> dyadics"
   1.109    apply (simp add: dyadics_def)
   1.110    by (metis divide_numeral_1 numeral_One power_0)
   1.111  
   1.112 -lemma nat_neq_4k1: "of_nat m \<noteq> (4 * of_nat k + 1) / (2 * 2^n :: 'a::field_char_0)"
   1.113 +lemma%unimportant nat_neq_4k1: "of_nat m \<noteq> (4 * of_nat k + 1) / (2 * 2^n :: 'a::field_char_0)"
   1.114  proof
   1.115    assume "of_nat m = (4 * of_nat k + 1) / (2 * 2^n :: 'a)"
   1.116    then have "of_nat (m * (2 * 2^n)) = (of_nat (Suc (4 * k)) :: 'a)"
   1.117 @@ -221,8 +221,8 @@
   1.118      by simp
   1.119  qed
   1.120  
   1.121 -lemma nat_neq_4k3: "of_nat m \<noteq> (4 * of_nat k + 3) / (2 * 2^n :: 'a::field_char_0)"
   1.122 -proof
   1.123 +lemma%important nat_neq_4k3: "of_nat m \<noteq> (4 * of_nat k + 3) / (2 * 2^n :: 'a::field_char_0)"
   1.124 +proof%unimportant
   1.125    assume "of_nat m = (4 * of_nat k + 3) / (2 * 2^n :: 'a)"
   1.126    then have "of_nat (m * (2 * 2^n)) = (of_nat (4 * k + 3) :: 'a)"
   1.127      by (simp add: divide_simps)
   1.128 @@ -234,10 +234,10 @@
   1.129      by simp
   1.130  qed
   1.131  
   1.132 -lemma iff_4k:
   1.133 +lemma%important iff_4k:
   1.134    assumes "r = real k" "odd k"
   1.135      shows "(4 * real m + r) / (2 * 2^n) = (4 * real m' + r) / (2 * 2 ^ n') \<longleftrightarrow> m=m' \<and> n=n'"
   1.136 -proof -
   1.137 +proof%unimportant -
   1.138    { assume "(4 * real m + r) / (2 * 2^n) = (4 * real m' + r) / (2 * 2 ^ n')"
   1.139      then have "real ((4 * m + k) * (2 * 2 ^ n')) = real ((4 * m' + k) * (2 * 2^n))"
   1.140        using assms by (auto simp: field_simps)
   1.141 @@ -254,8 +254,8 @@
   1.142    then show ?thesis by blast
   1.143  qed
   1.144  
   1.145 -lemma neq_4k1_k43: "(4 * real m + 1) / (2 * 2^n) \<noteq> (4 * real m' + 3) / (2 * 2 ^ n')"
   1.146 -proof
   1.147 +lemma%important neq_4k1_k43: "(4 * real m + 1) / (2 * 2^n) \<noteq> (4 * real m' + 3) / (2 * 2 ^ n')"
   1.148 +proof%unimportant
   1.149    assume "(4 * real m + 1) / (2 * 2^n) = (4 * real m' + 3) / (2 * 2 ^ n')"
   1.150    then have "real (Suc (4 * m) * (2 * 2 ^ n')) = real ((4 * m' + 3) * (2 * 2^n))"
   1.151      by (auto simp: field_simps)
   1.152 @@ -271,11 +271,11 @@
   1.153      using even_Suc by presburger
   1.154  qed
   1.155  
   1.156 -lemma dyadic_413_cases:
   1.157 +lemma%important dyadic_413_cases:
   1.158    obtains "(of_nat m::'a::field_char_0) / 2^k \<in> Nats"
   1.159    | m' k' where "k' < k" "(of_nat m:: 'a) / 2^k = of_nat (4*m' + 1) / 2^Suc k'"
   1.160    | m' k' where "k' < k" "(of_nat m:: 'a) / 2^k = of_nat (4*m' + 3) / 2^Suc k'"
   1.161 -proof (cases "m>0")
   1.162 +proof%unimportant (cases "m>0")
   1.163    case False
   1.164    then have "m=0" by simp
   1.165    with that show ?thesis by auto
   1.166 @@ -324,11 +324,11 @@
   1.167  qed
   1.168  
   1.169  
   1.170 -lemma dyadics_iff:
   1.171 +lemma%important dyadics_iff:
   1.172     "(dyadics :: 'a::field_char_0 set) =
   1.173      Nats \<union> (\<Union>k m. {of_nat (4*m + 1) / 2^Suc k}) \<union> (\<Union>k m. {of_nat (4*m + 3) / 2^Suc k})"
   1.174             (is "_ = ?rhs")
   1.175 -proof
   1.176 +proof%unimportant
   1.177    show "dyadics \<subseteq> ?rhs"
   1.178      unfolding dyadics_def
   1.179      apply clarify
   1.180 @@ -355,14 +355,14 @@
   1.181       apply (fastforce simp add: dyadics_iff Nats_def field_simps)+
   1.182    done
   1.183  
   1.184 -lemma dyadics_levels: "dyadics = (\<Union>K. \<Union>k<K. \<Union> m. {of_nat m / 2^k})"
   1.185 +lemma%unimportant dyadics_levels: "dyadics = (\<Union>K. \<Union>k<K. \<Union> m. {of_nat m / 2^k})"
   1.186    unfolding dyadics_def by auto
   1.187  
   1.188 -lemma dyad_rec_level_termination:
   1.189 +lemma%important dyad_rec_level_termination:
   1.190    assumes "k < K"
   1.191    shows "dyad_rec_dom(b, l, r, real m / 2^k)"
   1.192    using assms
   1.193 -proof (induction K arbitrary: k m)
   1.194 +proof%unimportant (induction K arbitrary: k m)
   1.195    case 0
   1.196    then show ?case by auto
   1.197  next
   1.198 @@ -427,22 +427,22 @@
   1.199  qed
   1.200  
   1.201  
   1.202 -lemma dyad_rec_termination: "x \<in> dyadics \<Longrightarrow> dyad_rec_dom(b,l,r,x)"
   1.203 +lemma%unimportant dyad_rec_termination: "x \<in> dyadics \<Longrightarrow> dyad_rec_dom(b,l,r,x)"
   1.204    by (auto simp: dyadics_levels intro: dyad_rec_level_termination)
   1.205  
   1.206 -lemma dyad_rec_of_nat [simp]: "dyad_rec b l r (real m) = b m"
   1.207 +lemma%unimportant dyad_rec_of_nat [simp]: "dyad_rec b l r (real m) = b m"
   1.208    by (simp add: dyad_rec.psimps dyad_rec_termination)
   1.209  
   1.210 -lemma dyad_rec_41 [simp]: "dyad_rec b l r ((4 * real m + 1) / 2 ^ (Suc n)) = l (dyad_rec b l r ((2*m + 1) / 2^n))"
   1.211 +lemma%unimportant dyad_rec_41 [simp]: "dyad_rec b l r ((4 * real m + 1) / 2 ^ (Suc n)) = l (dyad_rec b l r ((2*m + 1) / 2^n))"
   1.212    apply (rule dyad_rec.psimps)
   1.213    by (metis dyad_rec_level_termination lessI add.commute of_nat_Suc of_nat_mult of_nat_numeral)
   1.214  
   1.215  
   1.216 -lemma dyad_rec_43 [simp]: "dyad_rec b l r ((4 * real m + 3) / 2 ^ (Suc n)) = r (dyad_rec b l r ((2*m + 1) / 2^n))"
   1.217 +lemma%unimportant dyad_rec_43 [simp]: "dyad_rec b l r ((4 * real m + 3) / 2 ^ (Suc n)) = r (dyad_rec b l r ((2*m + 1) / 2^n))"
   1.218    apply (rule dyad_rec.psimps)
   1.219    by (metis dyad_rec_level_termination lessI of_nat_add of_nat_mult of_nat_numeral)
   1.220  
   1.221 -lemma dyad_rec_41_times2:
   1.222 +lemma%unimportant dyad_rec_41_times2:
   1.223    assumes "n > 0"
   1.224      shows "dyad_rec b l r (2 * ((4 * real m + 1) / 2^Suc n)) = l (dyad_rec b l r (2 * (2 * real m + 1) / 2^n))"
   1.225  proof -
   1.226 @@ -461,10 +461,10 @@
   1.227    finally show ?thesis .
   1.228  qed
   1.229  
   1.230 -lemma dyad_rec_43_times2:
   1.231 +lemma%important dyad_rec_43_times2:
   1.232    assumes "n > 0"
   1.233      shows "dyad_rec b l r (2 * ((4 * real m + 3) / 2^Suc n)) = r (dyad_rec b l r (2 * (2 * real m + 1) / 2^n))"
   1.234 -proof -
   1.235 +proof%unimportant -
   1.236    obtain n' where n': "n = Suc n'"
   1.237      using assms not0_implies_Suc by blast
   1.238    have "dyad_rec b l r (2 * ((4 * real m + 3) / 2^Suc n)) = dyad_rec b l r ((2 * (4 * real m + 3)) / (2 * 2^n))"
   1.239 @@ -480,22 +480,22 @@
   1.240    finally show ?thesis .
   1.241  qed
   1.242  
   1.243 -definition dyad_rec2
   1.244 +definition%important dyad_rec2
   1.245      where "dyad_rec2 u v lc rc x =
   1.246               dyad_rec (\<lambda>z. (u,v)) (\<lambda>(a,b). (a, lc a b (midpoint a b))) (\<lambda>(a,b). (rc a b (midpoint a b), b)) (2*x)"
   1.247  
   1.248  abbreviation leftrec where "leftrec u v lc rc x \<equiv> fst (dyad_rec2 u v lc rc x)"
   1.249  abbreviation rightrec where "rightrec u v lc rc x \<equiv> snd (dyad_rec2 u v lc rc x)"
   1.250  
   1.251 -lemma leftrec_base: "leftrec u v lc rc (real m / 2) = u"
   1.252 +lemma%unimportant leftrec_base: "leftrec u v lc rc (real m / 2) = u"
   1.253    by (simp add: dyad_rec2_def)
   1.254  
   1.255 -lemma leftrec_41: "n > 0 \<Longrightarrow> leftrec u v lc rc ((4 * real m + 1) / 2 ^ (Suc n)) = leftrec u v lc rc ((2 * real m + 1) / 2^n)"
   1.256 +lemma%unimportant leftrec_41: "n > 0 \<Longrightarrow> leftrec u v lc rc ((4 * real m + 1) / 2 ^ (Suc n)) = leftrec u v lc rc ((2 * real m + 1) / 2^n)"
   1.257    apply (simp only: dyad_rec2_def dyad_rec_41_times2)
   1.258    apply (simp add: case_prod_beta)
   1.259    done
   1.260  
   1.261 -lemma leftrec_43: "n > 0 \<Longrightarrow>
   1.262 +lemma%unimportant leftrec_43: "n > 0 \<Longrightarrow>
   1.263               leftrec u v lc rc ((4 * real m + 3) / 2 ^ (Suc n)) =
   1.264                   rc (leftrec u v lc rc ((2 * real m + 1) / 2^n)) (rightrec u v lc rc ((2 * real m + 1) / 2^n))
   1.265                   (midpoint (leftrec u v lc rc ((2 * real m + 1) / 2^n)) (rightrec u v lc rc ((2 * real m + 1) / 2^n)))"
   1.266 @@ -503,10 +503,10 @@
   1.267    apply (simp add: case_prod_beta)
   1.268    done
   1.269  
   1.270 -lemma rightrec_base: "rightrec u v lc rc (real m / 2) = v"
   1.271 +lemma%unimportant rightrec_base: "rightrec u v lc rc (real m / 2) = v"
   1.272    by (simp add: dyad_rec2_def)
   1.273  
   1.274 -lemma rightrec_41: "n > 0 \<Longrightarrow>
   1.275 +lemma%unimportant rightrec_41: "n > 0 \<Longrightarrow>
   1.276               rightrec u v lc rc ((4 * real m + 1) / 2 ^ (Suc n)) =
   1.277                   lc (leftrec u v lc rc ((2 * real m + 1) / 2^n)) (rightrec u v lc rc ((2 * real m + 1) / 2^n))
   1.278                   (midpoint (leftrec u v lc rc ((2 * real m + 1) / 2^n)) (rightrec u v lc rc ((2 * real m + 1) / 2^n)))"
   1.279 @@ -514,24 +514,24 @@
   1.280    apply (simp add: case_prod_beta)
   1.281    done
   1.282  
   1.283 -lemma rightrec_43: "n > 0 \<Longrightarrow> rightrec u v lc rc ((4 * real m + 3) / 2 ^ (Suc n)) = rightrec u v lc rc ((2 * real m + 1) / 2^n)"
   1.284 +lemma%unimportant rightrec_43: "n > 0 \<Longrightarrow> rightrec u v lc rc ((4 * real m + 3) / 2 ^ (Suc n)) = rightrec u v lc rc ((2 * real m + 1) / 2^n)"
   1.285    apply (simp only: dyad_rec2_def dyad_rec_43_times2)
   1.286    apply (simp add: case_prod_beta)
   1.287    done
   1.288  
   1.289 -lemma dyadics_in_open_unit_interval:
   1.290 +lemma%unimportant dyadics_in_open_unit_interval:
   1.291     "{0<..<1} \<inter> (\<Union>k m. {real m / 2^k}) = (\<Union>k. \<Union>m \<in> {0<..<2^k}. {real m / 2^k})"
   1.292    by (auto simp: divide_simps)
   1.293  
   1.294  
   1.295  
   1.296 -theorem homeomorphic_monotone_image_interval:
   1.297 +theorem%important homeomorphic_monotone_image_interval:
   1.298    fixes f :: "real \<Rightarrow> 'a::{real_normed_vector,complete_space}"
   1.299    assumes cont_f: "continuous_on {0..1} f"
   1.300        and conn: "\<And>y. connected ({0..1} \<inter> f -` {y})"
   1.301        and f_1not0: "f 1 \<noteq> f 0"
   1.302      shows "(f ` {0..1}) homeomorphic {0..1::real}"
   1.303 -proof -
   1.304 +proof%unimportant -
   1.305    have "\<exists>c d. a \<le> c \<and> c \<le> m \<and> m \<le> d \<and> d \<le> b \<and>
   1.306                (\<forall>x \<in> {c..d}. f x = f m) \<and>
   1.307                (\<forall>x \<in> {a..<c}. (f x \<noteq> f m)) \<and>
   1.308 @@ -1664,11 +1664,11 @@
   1.309  qed
   1.310  
   1.311  
   1.312 -theorem path_contains_arc:
   1.313 +theorem%important path_contains_arc:
   1.314    fixes p :: "real \<Rightarrow> 'a::{complete_space,real_normed_vector}"
   1.315    assumes "path p" and a: "pathstart p = a" and b: "pathfinish p = b" and "a \<noteq> b"
   1.316    obtains q where "arc q" "path_image q \<subseteq> path_image p" "pathstart q = a" "pathfinish q = b"
   1.317 -proof -
   1.318 +proof%unimportant -
   1.319    have ucont_p: "uniformly_continuous_on {0..1} p"
   1.320      using \<open>path p\<close> unfolding path_def
   1.321      by (metis compact_Icc compact_uniformly_continuous)
   1.322 @@ -1961,12 +1961,12 @@
   1.323  qed
   1.324  
   1.325  
   1.326 -corollary path_connected_arcwise:
   1.327 +corollary%important path_connected_arcwise:
   1.328    fixes S :: "'a::{complete_space,real_normed_vector} set"
   1.329    shows "path_connected S \<longleftrightarrow>
   1.330           (\<forall>x \<in> S. \<forall>y \<in> S. x \<noteq> y \<longrightarrow> (\<exists>g. arc g \<and> path_image g \<subseteq> S \<and> pathstart g = x \<and> pathfinish g = y))"
   1.331          (is "?lhs = ?rhs")
   1.332 -proof (intro iffI impI ballI)
   1.333 +proof%unimportant (intro iffI impI ballI)
   1.334    fix x y
   1.335    assume "path_connected S" "x \<in> S" "y \<in> S" "x \<noteq> y"
   1.336    then obtain p where p: "path p" "path_image p \<subseteq> S" "pathstart p = x" "pathfinish p = y"
   1.337 @@ -1992,23 +1992,23 @@
   1.338  qed
   1.339  
   1.340  
   1.341 -corollary arc_connected_trans:
   1.342 +corollary%important arc_connected_trans:
   1.343    fixes g :: "real \<Rightarrow> 'a::{complete_space,real_normed_vector}"
   1.344    assumes "arc g" "arc h" "pathfinish g = pathstart h" "pathstart g \<noteq> pathfinish h"
   1.345    obtains i where "arc i" "path_image i \<subseteq> path_image g \<union> path_image h"
   1.346                    "pathstart i = pathstart g" "pathfinish i = pathfinish h"
   1.347 -  by (metis (no_types, hide_lams) arc_imp_path assms path_contains_arc path_image_join path_join pathfinish_join pathstart_join)
   1.348 +  by%unimportant (metis (no_types, hide_lams) arc_imp_path assms path_contains_arc path_image_join path_join pathfinish_join pathstart_join)
   1.349  
   1.350  
   1.351  
   1.352  
   1.353 -subsection\<open>Accessibility of frontier points\<close>
   1.354 +subsection%important\<open>Accessibility of frontier points\<close>
   1.355  
   1.356 -lemma dense_accessible_frontier_points:
   1.357 +lemma%important dense_accessible_frontier_points:
   1.358    fixes S :: "'a::{complete_space,real_normed_vector} set"
   1.359    assumes "open S" and opeSV: "openin (subtopology euclidean (frontier S)) V" and "V \<noteq> {}"
   1.360    obtains g where "arc g" "g ` {0..<1} \<subseteq> S" "pathstart g \<in> S" "pathfinish g \<in> V"
   1.361 -proof -
   1.362 +proof%unimportant -
   1.363    obtain z where "z \<in> V"
   1.364      using \<open>V \<noteq> {}\<close> by auto
   1.365    then obtain r where "r > 0" and r: "ball z r \<inter> frontier S \<subseteq> V"
   1.366 @@ -2099,12 +2099,12 @@
   1.367  qed
   1.368  
   1.369  
   1.370 -lemma dense_accessible_frontier_points_connected:
   1.371 +lemma%important dense_accessible_frontier_points_connected:
   1.372    fixes S :: "'a::{complete_space,real_normed_vector} set"
   1.373    assumes "open S" "connected S" "x \<in> S" "V \<noteq> {}"
   1.374        and ope: "openin (subtopology euclidean (frontier S)) V"
   1.375    obtains g where "arc g" "g ` {0..<1} \<subseteq> S" "pathstart g = x" "pathfinish g \<in> V"
   1.376 -proof -
   1.377 +proof%unimportant -
   1.378    have "V \<subseteq> frontier S"
   1.379      using ope openin_imp_subset by blast
   1.380    with \<open>open S\<close> \<open>x \<in> S\<close> have "x \<notin> V"
   1.381 @@ -2134,14 +2134,14 @@
   1.382      using h \<open>pathfinish g \<in> V\<close> by auto
   1.383  qed
   1.384  
   1.385 -lemma dense_access_fp_aux:
   1.386 +lemma%important dense_access_fp_aux:
   1.387    fixes S :: "'a::{complete_space,real_normed_vector} set"
   1.388    assumes S: "open S" "connected S"
   1.389        and opeSU: "openin (subtopology euclidean (frontier S)) U"
   1.390        and opeSV: "openin (subtopology euclidean (frontier S)) V"
   1.391        and "V \<noteq> {}" "\<not> U \<subseteq> V"
   1.392    obtains g where "arc g" "pathstart g \<in> U" "pathfinish g \<in> V" "g ` {0<..<1} \<subseteq> S"
   1.393 -proof -
   1.394 +proof%unimportant -
   1.395    have "S \<noteq> {}"
   1.396      using opeSV \<open>V \<noteq> {}\<close> by (metis frontier_empty openin_subtopology_empty)
   1.397    then obtain x where "x \<in> S" by auto
   1.398 @@ -2181,14 +2181,14 @@
   1.399    qed
   1.400  qed
   1.401  
   1.402 -lemma dense_accessible_frontier_point_pairs:
   1.403 +lemma%important dense_accessible_frontier_point_pairs:
   1.404    fixes S :: "'a::{complete_space,real_normed_vector} set"
   1.405    assumes S: "open S" "connected S"
   1.406        and opeSU: "openin (subtopology euclidean (frontier S)) U"
   1.407        and opeSV: "openin (subtopology euclidean (frontier S)) V"
   1.408        and "U \<noteq> {}" "V \<noteq> {}" "U \<noteq> V"
   1.409      obtains g where "arc g" "pathstart g \<in> U" "pathfinish g \<in> V" "g ` {0<..<1} \<subseteq> S"
   1.410 -proof -
   1.411 +proof%unimportant -
   1.412    consider "\<not> U \<subseteq> V" | "\<not> V \<subseteq> U"
   1.413      using \<open>U \<noteq> V\<close> by blast
   1.414    then show ?thesis
     2.1 --- a/src/HOL/Analysis/Binary_Product_Measure.thy	Mon Aug 27 22:58:36 2018 +0200
     2.2 +++ b/src/HOL/Analysis/Binary_Product_Measure.thy	Tue Aug 28 13:28:39 2018 +0100
     2.3 @@ -2,67 +2,67 @@
     2.4      Author:     Johannes Hölzl, TU München
     2.5  *)
     2.6  
     2.7 -section \<open>Binary product measures\<close>
     2.8 +section%important \<open>Binary product measures\<close>
     2.9  
    2.10  theory Binary_Product_Measure
    2.11  imports Nonnegative_Lebesgue_Integration
    2.12  begin
    2.13  
    2.14 -lemma Pair_vimage_times[simp]: "Pair x -` (A \<times> B) = (if x \<in> A then B else {})"
    2.15 +lemma%unimportant Pair_vimage_times[simp]: "Pair x -` (A \<times> B) = (if x \<in> A then B else {})"
    2.16    by auto
    2.17  
    2.18 -lemma rev_Pair_vimage_times[simp]: "(\<lambda>x. (x, y)) -` (A \<times> B) = (if y \<in> B then A else {})"
    2.19 +lemma%unimportant rev_Pair_vimage_times[simp]: "(\<lambda>x. (x, y)) -` (A \<times> B) = (if y \<in> B then A else {})"
    2.20    by auto
    2.21  
    2.22 -subsection "Binary products"
    2.23 +subsection%important "Binary products"
    2.24  
    2.25 -definition pair_measure (infixr "\<Otimes>\<^sub>M" 80) where
    2.26 +definition%important pair_measure (infixr "\<Otimes>\<^sub>M" 80) where
    2.27    "A \<Otimes>\<^sub>M B = measure_of (space A \<times> space B)
    2.28        {a \<times> b | a b. a \<in> sets A \<and> b \<in> sets B}
    2.29        (\<lambda>X. \<integral>\<^sup>+x. (\<integral>\<^sup>+y. indicator X (x,y) \<partial>B) \<partial>A)"
    2.30  
    2.31 -lemma pair_measure_closed: "{a \<times> b | a b. a \<in> sets A \<and> b \<in> sets B} \<subseteq> Pow (space A \<times> space B)"
    2.32 -  using sets.space_closed[of A] sets.space_closed[of B] by auto
    2.33 +lemma%important pair_measure_closed: "{a \<times> b | a b. a \<in> sets A \<and> b \<in> sets B} \<subseteq> Pow (space A \<times> space B)"
    2.34 +  using%unimportant sets.space_closed[of A] sets.space_closed[of B] by auto
    2.35  
    2.36 -lemma space_pair_measure:
    2.37 +lemma%important space_pair_measure:
    2.38    "space (A \<Otimes>\<^sub>M B) = space A \<times> space B"
    2.39    unfolding pair_measure_def using pair_measure_closed[of A B]
    2.40 -  by (rule space_measure_of)
    2.41 +  by%unimportant (rule space_measure_of)
    2.42  
    2.43 -lemma SIGMA_Collect_eq: "(SIGMA x:space M. {y\<in>space N. P x y}) = {x\<in>space (M \<Otimes>\<^sub>M N). P (fst x) (snd x)}"
    2.44 +lemma%unimportant SIGMA_Collect_eq: "(SIGMA x:space M. {y\<in>space N. P x y}) = {x\<in>space (M \<Otimes>\<^sub>M N). P (fst x) (snd x)}"
    2.45    by (auto simp: space_pair_measure)
    2.46  
    2.47 -lemma sets_pair_measure:
    2.48 +lemma%unimportant sets_pair_measure:
    2.49    "sets (A \<Otimes>\<^sub>M B) = sigma_sets (space A \<times> space B) {a \<times> b | a b. a \<in> sets A \<and> b \<in> sets B}"
    2.50    unfolding pair_measure_def using pair_measure_closed[of A B]
    2.51    by (rule sets_measure_of)
    2.52  
    2.53 -lemma sets_pair_measure_cong[measurable_cong, cong]:
    2.54 +lemma%unimportant sets_pair_measure_cong[measurable_cong, cong]:
    2.55    "sets M1 = sets M1' \<Longrightarrow> sets M2 = sets M2' \<Longrightarrow> sets (M1 \<Otimes>\<^sub>M M2) = sets (M1' \<Otimes>\<^sub>M M2')"
    2.56    unfolding sets_pair_measure by (simp cong: sets_eq_imp_space_eq)
    2.57  
    2.58 -lemma pair_measureI[intro, simp, measurable]:
    2.59 +lemma%unimportant pair_measureI[intro, simp, measurable]:
    2.60    "x \<in> sets A \<Longrightarrow> y \<in> sets B \<Longrightarrow> x \<times> y \<in> sets (A \<Otimes>\<^sub>M B)"
    2.61    by (auto simp: sets_pair_measure)
    2.62  
    2.63 -lemma sets_Pair: "{x} \<in> sets M1 \<Longrightarrow> {y} \<in> sets M2 \<Longrightarrow> {(x, y)} \<in> sets (M1 \<Otimes>\<^sub>M M2)"
    2.64 +lemma%unimportant sets_Pair: "{x} \<in> sets M1 \<Longrightarrow> {y} \<in> sets M2 \<Longrightarrow> {(x, y)} \<in> sets (M1 \<Otimes>\<^sub>M M2)"
    2.65    using pair_measureI[of "{x}" M1 "{y}" M2] by simp
    2.66  
    2.67 -lemma measurable_pair_measureI:
    2.68 +lemma%unimportant measurable_pair_measureI:
    2.69    assumes 1: "f \<in> space M \<rightarrow> space M1 \<times> space M2"
    2.70    assumes 2: "\<And>A B. A \<in> sets M1 \<Longrightarrow> B \<in> sets M2 \<Longrightarrow> f -` (A \<times> B) \<inter> space M \<in> sets M"
    2.71    shows "f \<in> measurable M (M1 \<Otimes>\<^sub>M M2)"
    2.72    unfolding pair_measure_def using 1 2
    2.73    by (intro measurable_measure_of) (auto dest: sets.sets_into_space)
    2.74  
    2.75 -lemma measurable_split_replace[measurable (raw)]:
    2.76 +lemma%unimportant measurable_split_replace[measurable (raw)]:
    2.77    "(\<lambda>x. f x (fst (g x)) (snd (g x))) \<in> measurable M N \<Longrightarrow> (\<lambda>x. case_prod (f x) (g x)) \<in> measurable M N"
    2.78    unfolding split_beta' .
    2.79  
    2.80 -lemma measurable_Pair[measurable (raw)]:
    2.81 +lemma%important measurable_Pair[measurable (raw)]:
    2.82    assumes f: "f \<in> measurable M M1" and g: "g \<in> measurable M M2"
    2.83    shows "(\<lambda>x. (f x, g x)) \<in> measurable M (M1 \<Otimes>\<^sub>M M2)"
    2.84 -proof (rule measurable_pair_measureI)
    2.85 +proof%unimportant (rule measurable_pair_measureI)
    2.86    show "(\<lambda>x. (f x, g x)) \<in> space M \<rightarrow> space M1 \<times> space M2"
    2.87      using f g by (auto simp: measurable_def)
    2.88    fix A B assume *: "A \<in> sets M1" "B \<in> sets M2"
    2.89 @@ -73,59 +73,59 @@
    2.90    finally show "(\<lambda>x. (f x, g x)) -` (A \<times> B) \<inter> space M \<in> sets M" .
    2.91  qed
    2.92  
    2.93 -lemma measurable_fst[intro!, simp, measurable]: "fst \<in> measurable (M1 \<Otimes>\<^sub>M M2) M1"
    2.94 +lemma%unimportant measurable_fst[intro!, simp, measurable]: "fst \<in> measurable (M1 \<Otimes>\<^sub>M M2) M1"
    2.95    by (auto simp: fst_vimage_eq_Times space_pair_measure sets.sets_into_space times_Int_times
    2.96      measurable_def)
    2.97  
    2.98 -lemma measurable_snd[intro!, simp, measurable]: "snd \<in> measurable (M1 \<Otimes>\<^sub>M M2) M2"
    2.99 +lemma%unimportant measurable_snd[intro!, simp, measurable]: "snd \<in> measurable (M1 \<Otimes>\<^sub>M M2) M2"
   2.100    by (auto simp: snd_vimage_eq_Times space_pair_measure sets.sets_into_space times_Int_times
   2.101      measurable_def)
   2.102  
   2.103 -lemma measurable_Pair_compose_split[measurable_dest]:
   2.104 +lemma%unimportant measurable_Pair_compose_split[measurable_dest]:
   2.105    assumes f: "case_prod f \<in> measurable (M1 \<Otimes>\<^sub>M M2) N"
   2.106    assumes g: "g \<in> measurable M M1" and h: "h \<in> measurable M M2"
   2.107    shows "(\<lambda>x. f (g x) (h x)) \<in> measurable M N"
   2.108    using measurable_compose[OF measurable_Pair f, OF g h] by simp
   2.109  
   2.110 -lemma measurable_Pair1_compose[measurable_dest]:
   2.111 +lemma%unimportant measurable_Pair1_compose[measurable_dest]:
   2.112    assumes f: "(\<lambda>x. (f x, g x)) \<in> measurable M (M1 \<Otimes>\<^sub>M M2)"
   2.113    assumes [measurable]: "h \<in> measurable N M"
   2.114    shows "(\<lambda>x. f (h x)) \<in> measurable N M1"
   2.115    using measurable_compose[OF f measurable_fst] by simp
   2.116  
   2.117 -lemma measurable_Pair2_compose[measurable_dest]:
   2.118 +lemma%unimportant measurable_Pair2_compose[measurable_dest]:
   2.119    assumes f: "(\<lambda>x. (f x, g x)) \<in> measurable M (M1 \<Otimes>\<^sub>M M2)"
   2.120    assumes [measurable]: "h \<in> measurable N M"
   2.121    shows "(\<lambda>x. g (h x)) \<in> measurable N M2"
   2.122    using measurable_compose[OF f measurable_snd] by simp
   2.123  
   2.124 -lemma measurable_pair:
   2.125 +lemma%unimportant measurable_pair:
   2.126    assumes "(fst \<circ> f) \<in> measurable M M1" "(snd \<circ> f) \<in> measurable M M2"
   2.127    shows "f \<in> measurable M (M1 \<Otimes>\<^sub>M M2)"
   2.128    using measurable_Pair[OF assms] by simp
   2.129  
   2.130 -lemma
   2.131 +lemma%unimportant (*FIX ME needs a name *)
   2.132    assumes f[measurable]: "f \<in> measurable M (N \<Otimes>\<^sub>M P)"
   2.133    shows measurable_fst': "(\<lambda>x. fst (f x)) \<in> measurable M N"
   2.134      and measurable_snd': "(\<lambda>x. snd (f x)) \<in> measurable M P"
   2.135    by simp_all
   2.136  
   2.137 -lemma
   2.138 +lemma%unimportant (*FIX ME needs a name *)
   2.139    assumes f[measurable]: "f \<in> measurable M N"
   2.140    shows measurable_fst'': "(\<lambda>x. f (fst x)) \<in> measurable (M \<Otimes>\<^sub>M P) N"
   2.141      and measurable_snd'': "(\<lambda>x. f (snd x)) \<in> measurable (P \<Otimes>\<^sub>M M) N"
   2.142    by simp_all
   2.143  
   2.144 -lemma sets_pair_in_sets:
   2.145 +lemma%unimportant sets_pair_in_sets:
   2.146    assumes "\<And>a b. a \<in> sets A \<Longrightarrow> b \<in> sets B \<Longrightarrow> a \<times> b \<in> sets N"
   2.147    shows "sets (A \<Otimes>\<^sub>M B) \<subseteq> sets N"
   2.148    unfolding sets_pair_measure
   2.149    by (intro sets.sigma_sets_subset') (auto intro!: assms)
   2.150  
   2.151 -lemma sets_pair_eq_sets_fst_snd:
   2.152 +lemma%important  sets_pair_eq_sets_fst_snd:
   2.153    "sets (A \<Otimes>\<^sub>M B) = sets (Sup {vimage_algebra (space A \<times> space B) fst A, vimage_algebra (space A \<times> space B) snd B})"
   2.154      (is "?P = sets (Sup {?fst, ?snd})")
   2.155 -proof -
   2.156 +proof%unimportant -
   2.157    { fix a b assume ab: "a \<in> sets A" "b \<in> sets B"
   2.158      then have "a \<times> b = (fst -` a \<inter> (space A \<times> space B)) \<inter> (snd -` b \<inter> (space A \<times> space B))"
   2.159        by (auto dest: sets.sets_into_space)
   2.160 @@ -157,29 +157,29 @@
   2.161      done
   2.162  qed
   2.163  
   2.164 -lemma measurable_pair_iff:
   2.165 +lemma%unimportant measurable_pair_iff:
   2.166    "f \<in> measurable M (M1 \<Otimes>\<^sub>M M2) \<longleftrightarrow> (fst \<circ> f) \<in> measurable M M1 \<and> (snd \<circ> f) \<in> measurable M M2"
   2.167    by (auto intro: measurable_pair[of f M M1 M2])
   2.168  
   2.169 -lemma measurable_split_conv:
   2.170 +lemma%unimportant  measurable_split_conv:
   2.171    "(\<lambda>(x, y). f x y) \<in> measurable A B \<longleftrightarrow> (\<lambda>x. f (fst x) (snd x)) \<in> measurable A B"
   2.172    by (intro arg_cong2[where f="(\<in>)"]) auto
   2.173  
   2.174 -lemma measurable_pair_swap': "(\<lambda>(x,y). (y, x)) \<in> measurable (M1 \<Otimes>\<^sub>M M2) (M2 \<Otimes>\<^sub>M M1)"
   2.175 +lemma%unimportant measurable_pair_swap': "(\<lambda>(x,y). (y, x)) \<in> measurable (M1 \<Otimes>\<^sub>M M2) (M2 \<Otimes>\<^sub>M M1)"
   2.176    by (auto intro!: measurable_Pair simp: measurable_split_conv)
   2.177  
   2.178 -lemma measurable_pair_swap:
   2.179 +lemma%unimportant  measurable_pair_swap:
   2.180    assumes f: "f \<in> measurable (M1 \<Otimes>\<^sub>M M2) M" shows "(\<lambda>(x,y). f (y, x)) \<in> measurable (M2 \<Otimes>\<^sub>M M1) M"
   2.181    using measurable_comp[OF measurable_Pair f] by (auto simp: measurable_split_conv comp_def)
   2.182  
   2.183 -lemma measurable_pair_swap_iff:
   2.184 +lemma%unimportant measurable_pair_swap_iff:
   2.185    "f \<in> measurable (M2 \<Otimes>\<^sub>M M1) M \<longleftrightarrow> (\<lambda>(x,y). f (y,x)) \<in> measurable (M1 \<Otimes>\<^sub>M M2) M"
   2.186    by (auto dest: measurable_pair_swap)
   2.187  
   2.188 -lemma measurable_Pair1': "x \<in> space M1 \<Longrightarrow> Pair x \<in> measurable M2 (M1 \<Otimes>\<^sub>M M2)"
   2.189 +lemma%unimportant measurable_Pair1': "x \<in> space M1 \<Longrightarrow> Pair x \<in> measurable M2 (M1 \<Otimes>\<^sub>M M2)"
   2.190    by simp
   2.191  
   2.192 -lemma sets_Pair1[measurable (raw)]:
   2.193 +lemma%unimportant sets_Pair1[measurable (raw)]:
   2.194    assumes A: "A \<in> sets (M1 \<Otimes>\<^sub>M M2)" shows "Pair x -` A \<in> sets M2"
   2.195  proof -
   2.196    have "Pair x -` A = (if x \<in> space M1 then Pair x -` A \<inter> space M2 else {})"
   2.197 @@ -189,10 +189,10 @@
   2.198    finally show ?thesis .
   2.199  qed
   2.200  
   2.201 -lemma measurable_Pair2': "y \<in> space M2 \<Longrightarrow> (\<lambda>x. (x, y)) \<in> measurable M1 (M1 \<Otimes>\<^sub>M M2)"
   2.202 +lemma%unimportant measurable_Pair2': "y \<in> space M2 \<Longrightarrow> (\<lambda>x. (x, y)) \<in> measurable M1 (M1 \<Otimes>\<^sub>M M2)"
   2.203    by (auto intro!: measurable_Pair)
   2.204  
   2.205 -lemma sets_Pair2: assumes A: "A \<in> sets (M1 \<Otimes>\<^sub>M M2)" shows "(\<lambda>x. (x, y)) -` A \<in> sets M1"
   2.206 +lemma%unimportant sets_Pair2: assumes A: "A \<in> sets (M1 \<Otimes>\<^sub>M M2)" shows "(\<lambda>x. (x, y)) -` A \<in> sets M1"
   2.207  proof -
   2.208    have "(\<lambda>x. (x, y)) -` A = (if y \<in> space M2 then (\<lambda>x. (x, y)) -` A \<inter> space M1 else {})"
   2.209      using A[THEN sets.sets_into_space] by (auto simp: space_pair_measure)
   2.210 @@ -201,23 +201,23 @@
   2.211    finally show ?thesis .
   2.212  qed
   2.213  
   2.214 -lemma measurable_Pair2:
   2.215 +lemma%unimportant measurable_Pair2:
   2.216    assumes f: "f \<in> measurable (M1 \<Otimes>\<^sub>M M2) M" and x: "x \<in> space M1"
   2.217    shows "(\<lambda>y. f (x, y)) \<in> measurable M2 M"
   2.218    using measurable_comp[OF measurable_Pair1' f, OF x]
   2.219    by (simp add: comp_def)
   2.220  
   2.221 -lemma measurable_Pair1:
   2.222 +lemma%unimportant measurable_Pair1:
   2.223    assumes f: "f \<in> measurable (M1 \<Otimes>\<^sub>M M2) M" and y: "y \<in> space M2"
   2.224    shows "(\<lambda>x. f (x, y)) \<in> measurable M1 M"
   2.225    using measurable_comp[OF measurable_Pair2' f, OF y]
   2.226    by (simp add: comp_def)
   2.227  
   2.228 -lemma Int_stable_pair_measure_generator: "Int_stable {a \<times> b | a b. a \<in> sets A \<and> b \<in> sets B}"
   2.229 +lemma%unimportant Int_stable_pair_measure_generator: "Int_stable {a \<times> b | a b. a \<in> sets A \<and> b \<in> sets B}"
   2.230    unfolding Int_stable_def
   2.231    by safe (auto simp add: times_Int_times)
   2.232  
   2.233 -lemma (in finite_measure) finite_measure_cut_measurable:
   2.234 +lemma%unimportant (in finite_measure) finite_measure_cut_measurable:
   2.235    assumes [measurable]: "Q \<in> sets (N \<Otimes>\<^sub>M M)"
   2.236    shows "(\<lambda>x. emeasure M (Pair x -` Q)) \<in> borel_measurable N"
   2.237      (is "?s Q \<in> _")
   2.238 @@ -239,7 +239,7 @@
   2.239      unfolding sets_pair_measure[symmetric] by simp
   2.240  qed (auto simp add: if_distrib Int_def[symmetric] intro!: measurable_If)
   2.241  
   2.242 -lemma (in sigma_finite_measure) measurable_emeasure_Pair:
   2.243 +lemma%unimportant (in sigma_finite_measure) measurable_emeasure_Pair:
   2.244    assumes Q: "Q \<in> sets (N \<Otimes>\<^sub>M M)" shows "(\<lambda>x. emeasure M (Pair x -` Q)) \<in> borel_measurable N" (is "?s Q \<in> _")
   2.245  proof -
   2.246    from sigma_finite_disjoint guess F . note F = this
   2.247 @@ -279,7 +279,7 @@
   2.248      by auto
   2.249  qed
   2.250  
   2.251 -lemma (in sigma_finite_measure) measurable_emeasure[measurable (raw)]:
   2.252 +lemma%unimportant (in sigma_finite_measure) measurable_emeasure[measurable (raw)]:
   2.253    assumes space: "\<And>x. x \<in> space N \<Longrightarrow> A x \<subseteq> space M"
   2.254    assumes A: "{x\<in>space (N \<Otimes>\<^sub>M M). snd x \<in> A (fst x)} \<in> sets (N \<Otimes>\<^sub>M M)"
   2.255    shows "(\<lambda>x. emeasure M (A x)) \<in> borel_measurable N"
   2.256 @@ -290,7 +290,7 @@
   2.257      by (auto cong: measurable_cong)
   2.258  qed
   2.259  
   2.260 -lemma (in sigma_finite_measure) emeasure_pair_measure:
   2.261 +lemma%unimportant (in sigma_finite_measure) emeasure_pair_measure:
   2.262    assumes "X \<in> sets (N \<Otimes>\<^sub>M M)"
   2.263    shows "emeasure (N \<Otimes>\<^sub>M M) X = (\<integral>\<^sup>+ x. \<integral>\<^sup>+ y. indicator X (x, y) \<partial>M \<partial>N)" (is "_ = ?\<mu> X")
   2.264  proof (rule emeasure_measure_of[OF pair_measure_def])
   2.265 @@ -314,7 +314,7 @@
   2.266      using sets.space_closed[of N] sets.space_closed[of M] by auto
   2.267  qed fact
   2.268  
   2.269 -lemma (in sigma_finite_measure) emeasure_pair_measure_alt:
   2.270 +lemma%unimportant (in sigma_finite_measure) emeasure_pair_measure_alt:
   2.271    assumes X: "X \<in> sets (N \<Otimes>\<^sub>M M)"
   2.272    shows "emeasure (N  \<Otimes>\<^sub>M M) X = (\<integral>\<^sup>+x. emeasure M (Pair x -` X) \<partial>N)"
   2.273  proof -
   2.274 @@ -324,10 +324,10 @@
   2.275      using X by (auto intro!: nn_integral_cong simp: emeasure_pair_measure sets_Pair1)
   2.276  qed
   2.277  
   2.278 -lemma (in sigma_finite_measure) emeasure_pair_measure_Times:
   2.279 +lemma%important (in sigma_finite_measure) emeasure_pair_measure_Times:
   2.280    assumes A: "A \<in> sets N" and B: "B \<in> sets M"
   2.281    shows "emeasure (N \<Otimes>\<^sub>M M) (A \<times> B) = emeasure N A * emeasure M B"
   2.282 -proof -
   2.283 +proof%unimportant -
   2.284    have "emeasure (N \<Otimes>\<^sub>M M) (A \<times> B) = (\<integral>\<^sup>+x. emeasure M B * indicator A x \<partial>N)"
   2.285      using A B by (auto intro!: nn_integral_cong simp: emeasure_pair_measure_alt)
   2.286    also have "\<dots> = emeasure M B * emeasure N A"
   2.287 @@ -336,18 +336,18 @@
   2.288      by (simp add: ac_simps)
   2.289  qed
   2.290  
   2.291 -subsection \<open>Binary products of $\sigma$-finite emeasure spaces\<close>
   2.292 +subsection%important \<open>Binary products of $\sigma$-finite emeasure spaces\<close>
   2.293  
   2.294 -locale pair_sigma_finite = M1?: sigma_finite_measure M1 + M2?: sigma_finite_measure M2
   2.295 +locale%important pair_sigma_finite = M1?: sigma_finite_measure M1 + M2?: sigma_finite_measure M2
   2.296    for M1 :: "'a measure" and M2 :: "'b measure"
   2.297  
   2.298 -lemma (in pair_sigma_finite) measurable_emeasure_Pair1:
   2.299 +lemma%unimportant (in pair_sigma_finite) measurable_emeasure_Pair1:
   2.300    "Q \<in> sets (M1 \<Otimes>\<^sub>M M2) \<Longrightarrow> (\<lambda>x. emeasure M2 (Pair x -` Q)) \<in> borel_measurable M1"
   2.301    using M2.measurable_emeasure_Pair .
   2.302  
   2.303 -lemma (in pair_sigma_finite) measurable_emeasure_Pair2:
   2.304 +lemma%important (in pair_sigma_finite) measurable_emeasure_Pair2:
   2.305    assumes Q: "Q \<in> sets (M1 \<Otimes>\<^sub>M M2)" shows "(\<lambda>y. emeasure M1 ((\<lambda>x. (x, y)) -` Q)) \<in> borel_measurable M2"
   2.306 -proof -
   2.307 +proof%unimportant -
   2.308    have "(\<lambda>(x, y). (y, x)) -` Q \<inter> space (M2 \<Otimes>\<^sub>M M1) \<in> sets (M2 \<Otimes>\<^sub>M M1)"
   2.309      using Q measurable_pair_swap' by (auto intro: measurable_sets)
   2.310    note M1.measurable_emeasure_Pair[OF this]
   2.311 @@ -356,11 +356,11 @@
   2.312    ultimately show ?thesis by simp
   2.313  qed
   2.314  
   2.315 -lemma (in pair_sigma_finite) sigma_finite_up_in_pair_measure_generator:
   2.316 +lemma%important (in pair_sigma_finite) sigma_finite_up_in_pair_measure_generator:
   2.317    defines "E \<equiv> {A \<times> B | A B. A \<in> sets M1 \<and> B \<in> sets M2}"
   2.318    shows "\<exists>F::nat \<Rightarrow> ('a \<times> 'b) set. range F \<subseteq> E \<and> incseq F \<and> (\<Union>i. F i) = space M1 \<times> space M2 \<and>
   2.319      (\<forall>i. emeasure (M1 \<Otimes>\<^sub>M M2) (F i) \<noteq> \<infinity>)"
   2.320 -proof -
   2.321 +proof%unimportant -
   2.322    from M1.sigma_finite_incseq guess F1 . note F1 = this
   2.323    from M2.sigma_finite_incseq guess F2 . note F2 = this
   2.324    from F1 F2 have space: "space M1 = (\<Union>i. F1 i)" "space M2 = (\<Union>i. F2 i)" by auto
   2.325 @@ -394,7 +394,7 @@
   2.326    qed
   2.327  qed
   2.328  
   2.329 -sublocale pair_sigma_finite \<subseteq> P?: sigma_finite_measure "M1 \<Otimes>\<^sub>M M2"
   2.330 +sublocale%important pair_sigma_finite \<subseteq> P?: sigma_finite_measure "M1 \<Otimes>\<^sub>M M2"
   2.331  proof
   2.332    from M1.sigma_finite_countable guess F1 ..
   2.333    moreover from M2.sigma_finite_countable guess F2 ..
   2.334 @@ -404,7 +404,7 @@
   2.335         (auto simp: M2.emeasure_pair_measure_Times space_pair_measure set_eq_iff subset_eq ennreal_mult_eq_top_iff)
   2.336  qed
   2.337  
   2.338 -lemma sigma_finite_pair_measure:
   2.339 +lemma%unimportant sigma_finite_pair_measure:
   2.340    assumes A: "sigma_finite_measure A" and B: "sigma_finite_measure B"
   2.341    shows "sigma_finite_measure (A \<Otimes>\<^sub>M B)"
   2.342  proof -
   2.343 @@ -414,14 +414,14 @@
   2.344    show ?thesis ..
   2.345  qed
   2.346  
   2.347 -lemma sets_pair_swap:
   2.348 +lemma%unimportant sets_pair_swap:
   2.349    assumes "A \<in> sets (M1 \<Otimes>\<^sub>M M2)"
   2.350    shows "(\<lambda>(x, y). (y, x)) -` A \<inter> space (M2 \<Otimes>\<^sub>M M1) \<in> sets (M2 \<Otimes>\<^sub>M M1)"
   2.351    using measurable_pair_swap' assms by (rule measurable_sets)
   2.352  
   2.353 -lemma (in pair_sigma_finite) distr_pair_swap:
   2.354 +lemma%important (in pair_sigma_finite) distr_pair_swap:
   2.355    "M1 \<Otimes>\<^sub>M M2 = distr (M2 \<Otimes>\<^sub>M M1) (M1 \<Otimes>\<^sub>M M2) (\<lambda>(x, y). (y, x))" (is "?P = ?D")
   2.356 -proof -
   2.357 +proof%unimportant -
   2.358    from sigma_finite_up_in_pair_measure_generator guess F :: "nat \<Rightarrow> ('a \<times> 'b) set" .. note F = this
   2.359    let ?E = "{a \<times> b |a b. a \<in> sets M1 \<and> b \<in> sets M2}"
   2.360    show ?thesis
   2.361 @@ -446,11 +446,11 @@
   2.362    qed
   2.363  qed
   2.364  
   2.365 -lemma (in pair_sigma_finite) emeasure_pair_measure_alt2:
   2.366 +lemma%unimportant (in pair_sigma_finite) emeasure_pair_measure_alt2:
   2.367    assumes A: "A \<in> sets (M1 \<Otimes>\<^sub>M M2)"
   2.368    shows "emeasure (M1 \<Otimes>\<^sub>M M2) A = (\<integral>\<^sup>+y. emeasure M1 ((\<lambda>x. (x, y)) -` A) \<partial>M2)"
   2.369      (is "_ = ?\<nu> A")
   2.370 -proof -
   2.371 +proof%unimportant -
   2.372    have [simp]: "\<And>y. (Pair y -` ((\<lambda>(x, y). (y, x)) -` A \<inter> space (M2 \<Otimes>\<^sub>M M1))) = (\<lambda>x. (x, y)) -` A"
   2.373      using sets.sets_into_space[OF A] by (auto simp: space_pair_measure)
   2.374    show ?thesis using A
   2.375 @@ -459,7 +459,7 @@
   2.376                   M1.emeasure_pair_measure_alt emeasure_distr[OF measurable_pair_swap' A])
   2.377  qed
   2.378  
   2.379 -lemma (in pair_sigma_finite) AE_pair:
   2.380 +lemma%unimportant (in pair_sigma_finite) AE_pair:
   2.381    assumes "AE x in (M1 \<Otimes>\<^sub>M M2). Q x"
   2.382    shows "AE x in M1. (AE y in M2. Q (x, y))"
   2.383  proof -
   2.384 @@ -485,11 +485,11 @@
   2.385    qed
   2.386  qed
   2.387  
   2.388 -lemma (in pair_sigma_finite) AE_pair_measure:
   2.389 +lemma%important (in pair_sigma_finite) AE_pair_measure:
   2.390    assumes "{x\<in>space (M1 \<Otimes>\<^sub>M M2). P x} \<in> sets (M1 \<Otimes>\<^sub>M M2)"
   2.391    assumes ae: "AE x in M1. AE y in M2. P (x, y)"
   2.392    shows "AE x in M1 \<Otimes>\<^sub>M M2. P x"
   2.393 -proof (subst AE_iff_measurable[OF _ refl])
   2.394 +proof%unimportant (subst AE_iff_measurable[OF _ refl])
   2.395    show "{x\<in>space (M1 \<Otimes>\<^sub>M M2). \<not> P x} \<in> sets (M1 \<Otimes>\<^sub>M M2)"
   2.396      by (rule sets.sets_Collect) fact
   2.397    then have "emeasure (M1 \<Otimes>\<^sub>M M2) {x \<in> space (M1 \<Otimes>\<^sub>M M2). \<not> P x} =
   2.398 @@ -505,12 +505,12 @@
   2.399    finally show "emeasure (M1 \<Otimes>\<^sub>M M2) {x \<in> space (M1 \<Otimes>\<^sub>M M2). \<not> P x} = 0" by simp
   2.400  qed
   2.401  
   2.402 -lemma (in pair_sigma_finite) AE_pair_iff:
   2.403 +lemma%unimportant (in pair_sigma_finite) AE_pair_iff:
   2.404    "{x\<in>space (M1 \<Otimes>\<^sub>M M2). P (fst x) (snd x)} \<in> sets (M1 \<Otimes>\<^sub>M M2) \<Longrightarrow>
   2.405      (AE x in M1. AE y in M2. P x y) \<longleftrightarrow> (AE x in (M1 \<Otimes>\<^sub>M M2). P (fst x) (snd x))"
   2.406    using AE_pair[of "\<lambda>x. P (fst x) (snd x)"] AE_pair_measure[of "\<lambda>x. P (fst x) (snd x)"] by auto
   2.407  
   2.408 -lemma (in pair_sigma_finite) AE_commute:
   2.409 +lemma%unimportant (in pair_sigma_finite) AE_commute:
   2.410    assumes P: "{x\<in>space (M1 \<Otimes>\<^sub>M M2). P (fst x) (snd x)} \<in> sets (M1 \<Otimes>\<^sub>M M2)"
   2.411    shows "(AE x in M1. AE y in M2. P x y) \<longleftrightarrow> (AE y in M2. AE x in M1. P x y)"
   2.412  proof -
   2.413 @@ -531,16 +531,16 @@
   2.414      done
   2.415  qed
   2.416  
   2.417 -subsection "Fubinis theorem"
   2.418 +subsection%important "Fubinis theorem"
   2.419  
   2.420 -lemma measurable_compose_Pair1:
   2.421 +lemma%unimportant measurable_compose_Pair1:
   2.422    "x \<in> space M1 \<Longrightarrow> g \<in> measurable (M1 \<Otimes>\<^sub>M M2) L \<Longrightarrow> (\<lambda>y. g (x, y)) \<in> measurable M2 L"
   2.423    by simp
   2.424  
   2.425 -lemma (in sigma_finite_measure) borel_measurable_nn_integral_fst:
   2.426 +lemma%unimportant (in sigma_finite_measure) borel_measurable_nn_integral_fst:
   2.427    assumes f: "f \<in> borel_measurable (M1 \<Otimes>\<^sub>M M)"
   2.428    shows "(\<lambda>x. \<integral>\<^sup>+ y. f (x, y) \<partial>M) \<in> borel_measurable M1"
   2.429 -using f proof induct
   2.430 +using f proof%unimportant induct
   2.431    case (cong u v)
   2.432    then have "\<And>w x. w \<in> space M1 \<Longrightarrow> x \<in> space M \<Longrightarrow> u (w, x) = v (w, x)"
   2.433      by (auto simp: space_pair_measure)
   2.434 @@ -561,10 +561,10 @@
   2.435                     nn_integral_monotone_convergence_SUP incseq_def le_fun_def
   2.436                cong: measurable_cong)
   2.437  
   2.438 -lemma (in sigma_finite_measure) nn_integral_fst:
   2.439 +lemma%unimportant (in sigma_finite_measure) nn_integral_fst:
   2.440    assumes f: "f \<in> borel_measurable (M1 \<Otimes>\<^sub>M M)"
   2.441    shows "(\<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) \<partial>M \<partial>M1) = integral\<^sup>N (M1 \<Otimes>\<^sub>M M) f" (is "?I f = _")
   2.442 -using f proof induct
   2.443 +  using f proof induct
   2.444    case (cong u v)
   2.445    then have "?I u = ?I v"
   2.446      by (intro nn_integral_cong) (auto simp: space_pair_measure)
   2.447 @@ -575,14 +575,14 @@
   2.448                     borel_measurable_nn_integral_fst nn_integral_mono incseq_def le_fun_def
   2.449                cong: nn_integral_cong)
   2.450  
   2.451 -lemma (in sigma_finite_measure) borel_measurable_nn_integral[measurable (raw)]:
   2.452 +lemma%unimportant (in sigma_finite_measure) borel_measurable_nn_integral[measurable (raw)]:
   2.453    "case_prod f \<in> borel_measurable (N \<Otimes>\<^sub>M M) \<Longrightarrow> (\<lambda>x. \<integral>\<^sup>+ y. f x y \<partial>M) \<in> borel_measurable N"
   2.454    using borel_measurable_nn_integral_fst[of "case_prod f" N] by simp
   2.455  
   2.456 -lemma (in pair_sigma_finite) nn_integral_snd:
   2.457 +lemma%important (in pair_sigma_finite) nn_integral_snd:
   2.458    assumes f[measurable]: "f \<in> borel_measurable (M1 \<Otimes>\<^sub>M M2)"
   2.459    shows "(\<integral>\<^sup>+ y. (\<integral>\<^sup>+ x. f (x, y) \<partial>M1) \<partial>M2) = integral\<^sup>N (M1 \<Otimes>\<^sub>M M2) f"
   2.460 -proof -
   2.461 +proof%unimportant -
   2.462    note measurable_pair_swap[OF f]
   2.463    from M1.nn_integral_fst[OF this]
   2.464    have "(\<integral>\<^sup>+ y. (\<integral>\<^sup>+ x. f (x, y) \<partial>M1) \<partial>M2) = (\<integral>\<^sup>+ (x, y). f (y, x) \<partial>(M2 \<Otimes>\<^sub>M M1))"
   2.465 @@ -592,24 +592,24 @@
   2.466    finally show ?thesis .
   2.467  qed
   2.468  
   2.469 -lemma (in pair_sigma_finite) Fubini:
   2.470 +lemma%important (in pair_sigma_finite) Fubini:
   2.471    assumes f: "f \<in> borel_measurable (M1 \<Otimes>\<^sub>M M2)"
   2.472    shows "(\<integral>\<^sup>+ y. (\<integral>\<^sup>+ x. f (x, y) \<partial>M1) \<partial>M2) = (\<integral>\<^sup>+ x. (\<integral>\<^sup>+ y. f (x, y) \<partial>M2) \<partial>M1)"
   2.473    unfolding nn_integral_snd[OF assms] M2.nn_integral_fst[OF assms] ..
   2.474  
   2.475 -lemma (in pair_sigma_finite) Fubini':
   2.476 +lemma%important (in pair_sigma_finite) Fubini':
   2.477    assumes f: "case_prod f \<in> borel_measurable (M1 \<Otimes>\<^sub>M M2)"
   2.478    shows "(\<integral>\<^sup>+ y. (\<integral>\<^sup>+ x. f x y \<partial>M1) \<partial>M2) = (\<integral>\<^sup>+ x. (\<integral>\<^sup>+ y. f x y \<partial>M2) \<partial>M1)"
   2.479    using Fubini[OF f] by simp
   2.480  
   2.481 -subsection \<open>Products on counting spaces, densities and distributions\<close>
   2.482 +subsection%important \<open>Products on counting spaces, densities and distributions\<close>
   2.483  
   2.484 -lemma sigma_prod:
   2.485 +lemma%important sigma_prod:
   2.486    assumes X_cover: "\<exists>E\<subseteq>A. countable E \<and> X = \<Union>E" and A: "A \<subseteq> Pow X"
   2.487    assumes Y_cover: "\<exists>E\<subseteq>B. countable E \<and> Y = \<Union>E" and B: "B \<subseteq> Pow Y"
   2.488    shows "sigma X A \<Otimes>\<^sub>M sigma Y B = sigma (X \<times> Y) {a \<times> b | a b. a \<in> A \<and> b \<in> B}"
   2.489      (is "?P = ?S")
   2.490 -proof (rule measure_eqI)
   2.491 +proof%unimportant (rule measure_eqI)
   2.492    have [simp]: "snd \<in> X \<times> Y \<rightarrow> Y" "fst \<in> X \<times> Y \<rightarrow> X"
   2.493      by auto
   2.494    let ?XY = "{{fst -` a \<inter> X \<times> Y | a. a \<in> A}, {snd -` b \<inter> X \<times> Y | b. b \<in> B}}"
   2.495 @@ -662,7 +662,7 @@
   2.496      by (simp add: emeasure_pair_measure_alt emeasure_sigma)
   2.497  qed
   2.498  
   2.499 -lemma sigma_sets_pair_measure_generator_finite:
   2.500 +lemma%unimportant sigma_sets_pair_measure_generator_finite:
   2.501    assumes "finite A" and "finite B"
   2.502    shows "sigma_sets (A \<times> B) { a \<times> b | a b. a \<subseteq> A \<and> b \<subseteq> B} = Pow (A \<times> B)"
   2.503    (is "sigma_sets ?prod ?sets = _")
   2.504 @@ -686,14 +686,14 @@
   2.505    show "a \<in> A" and "b \<in> B" by auto
   2.506  qed
   2.507  
   2.508 -lemma sets_pair_eq:
   2.509 +lemma%important sets_pair_eq:
   2.510    assumes Ea: "Ea \<subseteq> Pow (space A)" "sets A = sigma_sets (space A) Ea"
   2.511      and Ca: "countable Ca" "Ca \<subseteq> Ea" "\<Union>Ca = space A"
   2.512      and Eb: "Eb \<subseteq> Pow (space B)" "sets B = sigma_sets (space B) Eb"
   2.513      and Cb: "countable Cb" "Cb \<subseteq> Eb" "\<Union>Cb = space B"
   2.514    shows "sets (A \<Otimes>\<^sub>M B) = sets (sigma (space A \<times> space B) { a \<times> b | a b. a \<in> Ea \<and> b \<in> Eb })"
   2.515      (is "_ = sets (sigma ?\<Omega> ?E)")
   2.516 -proof
   2.517 +proof%unimportant
   2.518    show "sets (sigma ?\<Omega> ?E) \<subseteq> sets (A \<Otimes>\<^sub>M B)"
   2.519      using Ea(1) Eb(1) by (subst sigma_le_sets) (auto simp: Ea(2) Eb(2))
   2.520    have "?E \<subseteq> Pow ?\<Omega>"
   2.521 @@ -733,10 +733,10 @@
   2.522    finally show "sets (A \<Otimes>\<^sub>M B) \<subseteq> sets (sigma ?\<Omega> ?E)" .
   2.523  qed
   2.524  
   2.525 -lemma borel_prod:
   2.526 +lemma%important borel_prod:
   2.527    "(borel \<Otimes>\<^sub>M borel) = (borel :: ('a::second_countable_topology \<times> 'b::second_countable_topology) measure)"
   2.528    (is "?P = ?B")
   2.529 -proof -
   2.530 +proof%unimportant -
   2.531    have "?B = sigma UNIV {A \<times> B | A B. open A \<and> open B}"
   2.532      by (rule second_countable_borel_measurable[OF open_prod_generated])
   2.533    also have "\<dots> = ?P"
   2.534 @@ -745,10 +745,10 @@
   2.535    finally show ?thesis ..
   2.536  qed
   2.537  
   2.538 -lemma pair_measure_count_space:
   2.539 +lemma%important pair_measure_count_space:
   2.540    assumes A: "finite A" and B: "finite B"
   2.541    shows "count_space A \<Otimes>\<^sub>M count_space B = count_space (A \<times> B)" (is "?P = ?C")
   2.542 -proof (rule measure_eqI)
   2.543 +proof%unimportant (rule measure_eqI)
   2.544    interpret A: finite_measure "count_space A" by (rule finite_measure_count_space) fact
   2.545    interpret B: finite_measure "count_space B" by (rule finite_measure_count_space) fact
   2.546    interpret P: pair_sigma_finite "count_space A" "count_space B" ..
   2.547 @@ -776,14 +776,14 @@
   2.548  qed
   2.549  
   2.550  
   2.551 -lemma emeasure_prod_count_space:
   2.552 +lemma%unimportant emeasure_prod_count_space:
   2.553    assumes A: "A \<in> sets (count_space UNIV \<Otimes>\<^sub>M M)" (is "A \<in> sets (?A \<Otimes>\<^sub>M ?B)")
   2.554    shows "emeasure (?A \<Otimes>\<^sub>M ?B) A = (\<integral>\<^sup>+ x. \<integral>\<^sup>+ y. indicator A (x, y) \<partial>?B \<partial>?A)"
   2.555    by (rule emeasure_measure_of[OF pair_measure_def])
   2.556       (auto simp: countably_additive_def positive_def suminf_indicator A
   2.557                   nn_integral_suminf[symmetric] dest: sets.sets_into_space)
   2.558  
   2.559 -lemma emeasure_prod_count_space_single[simp]: "emeasure (count_space UNIV \<Otimes>\<^sub>M count_space UNIV) {x} = 1"
   2.560 +lemma%unimportant emeasure_prod_count_space_single[simp]: "emeasure (count_space UNIV \<Otimes>\<^sub>M count_space UNIV) {x} = 1"
   2.561  proof -
   2.562    have [simp]: "\<And>a b x y. indicator {(a, b)} (x, y) = (indicator {a} x * indicator {b} y::ennreal)"
   2.563      by (auto split: split_indicator)
   2.564 @@ -791,11 +791,11 @@
   2.565      by (cases x) (auto simp: emeasure_prod_count_space nn_integral_cmult sets_Pair)
   2.566  qed
   2.567  
   2.568 -lemma emeasure_count_space_prod_eq:
   2.569 +lemma%important emeasure_count_space_prod_eq:
   2.570    fixes A :: "('a \<times> 'b) set"
   2.571    assumes A: "A \<in> sets (count_space UNIV \<Otimes>\<^sub>M count_space UNIV)" (is "A \<in> sets (?A \<Otimes>\<^sub>M ?B)")
   2.572    shows "emeasure (?A \<Otimes>\<^sub>M ?B) A = emeasure (count_space UNIV) A"
   2.573 -proof -
   2.574 +proof%unimportant -
   2.575    { fix A :: "('a \<times> 'b) set" assume "countable A"
   2.576      then have "emeasure (?A \<Otimes>\<^sub>M ?B) (\<Union>a\<in>A. {a}) = (\<integral>\<^sup>+a. emeasure (?A \<Otimes>\<^sub>M ?B) {a} \<partial>count_space A)"
   2.577        by (intro emeasure_UN_countable) (auto simp: sets_Pair disjoint_family_on_def)
   2.578 @@ -822,7 +822,7 @@
   2.579    qed
   2.580  qed
   2.581  
   2.582 -lemma nn_integral_count_space_prod_eq:
   2.583 +lemma%unimportant nn_integral_count_space_prod_eq:
   2.584    "nn_integral (count_space UNIV \<Otimes>\<^sub>M count_space UNIV) f = nn_integral (count_space UNIV) f"
   2.585      (is "nn_integral ?P f = _")
   2.586  proof cases
   2.587 @@ -874,12 +874,12 @@
   2.588      by (simp add: top_unique)
   2.589  qed
   2.590  
   2.591 -lemma pair_measure_density:
   2.592 +lemma%important pair_measure_density:
   2.593    assumes f: "f \<in> borel_measurable M1"
   2.594    assumes g: "g \<in> borel_measurable M2"
   2.595    assumes "sigma_finite_measure M2" "sigma_finite_measure (density M2 g)"
   2.596    shows "density M1 f \<Otimes>\<^sub>M density M2 g = density (M1 \<Otimes>\<^sub>M M2) (\<lambda>(x,y). f x * g y)" (is "?L = ?R")
   2.597 -proof (rule measure_eqI)
   2.598 +proof%unimportant (rule measure_eqI)
   2.599    interpret M2: sigma_finite_measure M2 by fact
   2.600    interpret D2: sigma_finite_measure "density M2 g" by fact
   2.601  
   2.602 @@ -894,7 +894,7 @@
   2.603               cong: nn_integral_cong)
   2.604  qed simp
   2.605  
   2.606 -lemma sigma_finite_measure_distr:
   2.607 +lemma%unimportant sigma_finite_measure_distr:
   2.608    assumes "sigma_finite_measure (distr M N f)" and f: "f \<in> measurable M N"
   2.609    shows "sigma_finite_measure M"
   2.610  proof -
   2.611 @@ -909,7 +909,7 @@
   2.612    qed
   2.613  qed
   2.614  
   2.615 -lemma pair_measure_distr:
   2.616 +lemma%unimportant pair_measure_distr:
   2.617    assumes f: "f \<in> measurable M S" and g: "g \<in> measurable N T"
   2.618    assumes "sigma_finite_measure (distr N T g)"
   2.619    shows "distr M S f \<Otimes>\<^sub>M distr N T g = distr (M \<Otimes>\<^sub>M N) (S \<Otimes>\<^sub>M T) (\<lambda>(x, y). (f x, g y))" (is "?P = ?D")
   2.620 @@ -924,12 +924,12 @@
   2.621               intro!: nn_integral_cong arg_cong[where f="emeasure N"])
   2.622  qed simp
   2.623  
   2.624 -lemma pair_measure_eqI:
   2.625 +lemma%important pair_measure_eqI:
   2.626    assumes "sigma_finite_measure M1" "sigma_finite_measure M2"
   2.627    assumes sets: "sets (M1 \<Otimes>\<^sub>M M2) = sets M"
   2.628    assumes emeasure: "\<And>A B. A \<in> sets M1 \<Longrightarrow> B \<in> sets M2 \<Longrightarrow> emeasure M1 A * emeasure M2 B = emeasure M (A \<times> B)"
   2.629    shows "M1 \<Otimes>\<^sub>M M2 = M"
   2.630 -proof -
   2.631 +proof%unimportant -
   2.632    interpret M1: sigma_finite_measure M1 by fact
   2.633    interpret M2: sigma_finite_measure M2 by fact
   2.634    interpret pair_sigma_finite M1 M2 ..
   2.635 @@ -959,11 +959,11 @@
   2.636    qed
   2.637  qed
   2.638  
   2.639 -lemma sets_pair_countable:
   2.640 +lemma%important sets_pair_countable:
   2.641    assumes "countable S1" "countable S2"
   2.642    assumes M: "sets M = Pow S1" and N: "sets N = Pow S2"
   2.643    shows "sets (M \<Otimes>\<^sub>M N) = Pow (S1 \<times> S2)"
   2.644 -proof auto
   2.645 +proof%unimportant auto
   2.646    fix x a b assume x: "x \<in> sets (M \<Otimes>\<^sub>M N)" "(a, b) \<in> x"
   2.647    from sets.sets_into_space[OF x(1)] x(2)
   2.648      sets_eq_imp_space_eq[of N "count_space S2"] sets_eq_imp_space_eq[of M "count_space S1"] M N
   2.649 @@ -980,10 +980,10 @@
   2.650    finally show "X \<in> sets (M \<Otimes>\<^sub>M N)" .
   2.651  qed
   2.652  
   2.653 -lemma pair_measure_countable:
   2.654 +lemma%important pair_measure_countable:
   2.655    assumes "countable S1" "countable S2"
   2.656    shows "count_space S1 \<Otimes>\<^sub>M count_space S2 = count_space (S1 \<times> S2)"
   2.657 -proof (rule pair_measure_eqI)
   2.658 +proof%unimportant (rule pair_measure_eqI)
   2.659    show "sigma_finite_measure (count_space S1)" "sigma_finite_measure (count_space S2)"
   2.660      using assms by (auto intro!: sigma_finite_measure_count_space_countable)
   2.661    show "sets (count_space S1 \<Otimes>\<^sub>M count_space S2) = sets (count_space (S1 \<times> S2))"
   2.662 @@ -995,10 +995,10 @@
   2.663      by (subst (1 2 3) emeasure_count_space) (auto simp: finite_cartesian_product_iff ennreal_mult_top ennreal_top_mult)
   2.664  qed
   2.665  
   2.666 -lemma nn_integral_fst_count_space:
   2.667 +lemma%important nn_integral_fst_count_space:
   2.668    "(\<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) \<partial>count_space UNIV \<partial>count_space UNIV) = integral\<^sup>N (count_space UNIV) f"
   2.669    (is "?lhs = ?rhs")
   2.670 -proof(cases)
   2.671 +proof%unimportant(cases)
   2.672    assume *: "countable {xy. f xy \<noteq> 0}"
   2.673    let ?A = "fst ` {xy. f xy \<noteq> 0}"
   2.674    let ?B = "snd ` {xy. f xy \<noteq> 0}"
   2.675 @@ -1088,20 +1088,20 @@
   2.676    finally show ?thesis .
   2.677  qed
   2.678  
   2.679 -lemma measurable_pair_measure_countable1:
   2.680 +lemma%unimportant measurable_pair_measure_countable1:
   2.681    assumes "countable A"
   2.682    and [measurable]: "\<And>x. x \<in> A \<Longrightarrow> (\<lambda>y. f (x, y)) \<in> measurable N K"
   2.683    shows "f \<in> measurable (count_space A \<Otimes>\<^sub>M N) K"
   2.684  using _ _ assms(1)
   2.685  by(rule measurable_compose_countable'[where f="\<lambda>a b. f (a, snd b)" and g=fst and I=A, simplified])simp_all
   2.686  
   2.687 -subsection \<open>Product of Borel spaces\<close>
   2.688 +subsection%important \<open>Product of Borel spaces\<close>
   2.689  
   2.690 -lemma borel_Times:
   2.691 +lemma%important borel_Times:
   2.692    fixes A :: "'a::topological_space set" and B :: "'b::topological_space set"
   2.693    assumes A: "A \<in> sets borel" and B: "B \<in> sets borel"
   2.694    shows "A \<times> B \<in> sets borel"
   2.695 -proof -
   2.696 +proof%unimportant -
   2.697    have "A \<times> B = (A\<times>UNIV) \<inter> (UNIV \<times> B)"
   2.698      by auto
   2.699    moreover
   2.700 @@ -1146,7 +1146,7 @@
   2.701      by auto
   2.702  qed
   2.703  
   2.704 -lemma finite_measure_pair_measure:
   2.705 +lemma%unimportant finite_measure_pair_measure:
   2.706    assumes "finite_measure M" "finite_measure N"
   2.707    shows "finite_measure (N  \<Otimes>\<^sub>M M)"
   2.708  proof (rule finite_measureI)
     3.1 --- a/src/HOL/Analysis/Bochner_Integration.thy	Mon Aug 27 22:58:36 2018 +0200
     3.2 +++ b/src/HOL/Analysis/Bochner_Integration.thy	Tue Aug 28 13:28:39 2018 +0100
     3.3 @@ -2,7 +2,7 @@
     3.4      Author:     Johannes Hölzl, TU München
     3.5  *)
     3.6  
     3.7 -section \<open>Bochner Integration for Vector-Valued Functions\<close>
     3.8 +section%important \<open>Bochner Integration for Vector-Valued Functions\<close>
     3.9  
    3.10  theory Bochner_Integration
    3.11    imports Finite_Product_Measure
    3.12 @@ -15,12 +15,12 @@
    3.13  
    3.14  \<close>
    3.15  
    3.16 -lemma borel_measurable_implies_sequence_metric:
    3.17 +lemma%important borel_measurable_implies_sequence_metric:
    3.18    fixes f :: "'a \<Rightarrow> 'b :: {metric_space, second_countable_topology}"
    3.19    assumes [measurable]: "f \<in> borel_measurable M"
    3.20    shows "\<exists>F. (\<forall>i. simple_function M (F i)) \<and> (\<forall>x\<in>space M. (\<lambda>i. F i x) \<longlonglongrightarrow> f x) \<and>
    3.21      (\<forall>i. \<forall>x\<in>space M. dist (F i x) z \<le> 2 * dist (f x) z)"
    3.22 -proof -
    3.23 +proof%unimportant -
    3.24    obtain D :: "'b set" where "countable D" and D: "\<And>X. open X \<Longrightarrow> X \<noteq> {} \<Longrightarrow> \<exists>d\<in>D. d \<in> X"
    3.25      by (erule countable_dense_setE)
    3.26  
    3.27 @@ -155,14 +155,14 @@
    3.28    qed
    3.29  qed
    3.30  
    3.31 -lemma
    3.32 +lemma%unimportant
    3.33    fixes f :: "'a \<Rightarrow> 'b::semiring_1" assumes "finite A"
    3.34    shows sum_mult_indicator[simp]: "(\<Sum>x \<in> A. f x * indicator (B x) (g x)) = (\<Sum>x\<in>{x\<in>A. g x \<in> B x}. f x)"
    3.35    and sum_indicator_mult[simp]: "(\<Sum>x \<in> A. indicator (B x) (g x) * f x) = (\<Sum>x\<in>{x\<in>A. g x \<in> B x}. f x)"
    3.36    unfolding indicator_def
    3.37    using assms by (auto intro!: sum.mono_neutral_cong_right split: if_split_asm)
    3.38  
    3.39 -lemma borel_measurable_induct_real[consumes 2, case_names set mult add seq]:
    3.40 +lemma%unimportant borel_measurable_induct_real[consumes 2, case_names set mult add seq]:
    3.41    fixes P :: "('a \<Rightarrow> real) \<Rightarrow> bool"
    3.42    assumes u: "u \<in> borel_measurable M" "\<And>x. 0 \<le> u x"
    3.43    assumes set: "\<And>A. A \<in> sets M \<Longrightarrow> P (indicator A)"
    3.44 @@ -227,7 +227,7 @@
    3.45    qed
    3.46  qed
    3.47  
    3.48 -lemma scaleR_cong_right:
    3.49 +lemma%unimportant scaleR_cong_right:
    3.50    fixes x :: "'a :: real_vector"
    3.51    shows "(x \<noteq> 0 \<Longrightarrow> r = p) \<Longrightarrow> r *\<^sub>R x = p *\<^sub>R x"
    3.52    by (cases "x = 0") auto
    3.53 @@ -236,7 +236,7 @@
    3.54    "simple_function M f \<Longrightarrow> emeasure M {y\<in>space M. f y \<noteq> 0} \<noteq> \<infinity> \<Longrightarrow>
    3.55      simple_bochner_integrable M f"
    3.56  
    3.57 -lemma simple_bochner_integrable_compose2:
    3.58 +lemma%unimportant simple_bochner_integrable_compose2:
    3.59    assumes p_0: "p 0 0 = 0"
    3.60    shows "simple_bochner_integrable M f \<Longrightarrow> simple_bochner_integrable M g \<Longrightarrow>
    3.61      simple_bochner_integrable M (\<lambda>x. p (f x) (g x))"
    3.62 @@ -261,7 +261,7 @@
    3.63      using fin by (auto simp: top_unique)
    3.64  qed
    3.65  
    3.66 -lemma simple_function_finite_support:
    3.67 +lemma%unimportant simple_function_finite_support:
    3.68    assumes f: "simple_function M f" and fin: "(\<integral>\<^sup>+x. f x \<partial>M) < \<infinity>" and nn: "\<And>x. 0 \<le> f x"
    3.69    shows "emeasure M {x\<in>space M. f x \<noteq> 0} \<noteq> \<infinity>"
    3.70  proof cases
    3.71 @@ -296,7 +296,7 @@
    3.72    show ?thesis unfolding * by simp
    3.73  qed
    3.74  
    3.75 -lemma simple_bochner_integrableI_bounded:
    3.76 +lemma%unimportant simple_bochner_integrableI_bounded:
    3.77    assumes f: "simple_function M f" and fin: "(\<integral>\<^sup>+x. norm (f x) \<partial>M) < \<infinity>"
    3.78    shows "simple_bochner_integrable M f"
    3.79  proof
    3.80 @@ -309,16 +309,16 @@
    3.81    then show "emeasure M {y \<in> space M. f y \<noteq> 0} \<noteq> \<infinity>" by simp
    3.82  qed fact
    3.83  
    3.84 -definition simple_bochner_integral :: "'a measure \<Rightarrow> ('a \<Rightarrow> 'b::real_vector) \<Rightarrow> 'b" where
    3.85 +definition%important simple_bochner_integral :: "'a measure \<Rightarrow> ('a \<Rightarrow> 'b::real_vector) \<Rightarrow> 'b" where
    3.86    "simple_bochner_integral M f = (\<Sum>y\<in>f`space M. measure M {x\<in>space M. f x = y} *\<^sub>R y)"
    3.87  
    3.88 -lemma simple_bochner_integral_partition:
    3.89 +lemma%important simple_bochner_integral_partition:
    3.90    assumes f: "simple_bochner_integrable M f" and g: "simple_function M g"
    3.91    assumes sub: "\<And>x y. x \<in> space M \<Longrightarrow> y \<in> space M \<Longrightarrow> g x = g y \<Longrightarrow> f x = f y"
    3.92    assumes v: "\<And>x. x \<in> space M \<Longrightarrow> f x = v (g x)"
    3.93    shows "simple_bochner_integral M f = (\<Sum>y\<in>g ` space M. measure M {x\<in>space M. g x = y} *\<^sub>R v y)"
    3.94      (is "_ = ?r")
    3.95 -proof -
    3.96 +proof%unimportant -
    3.97    from f g have [simp]: "finite (f`space M)" "finite (g`space M)"
    3.98      by (auto simp: simple_function_def elim: simple_bochner_integrable.cases)
    3.99  
   3.100 @@ -394,7 +394,7 @@
   3.101      by (simp add: sum.distrib[symmetric] scaleR_add_right)
   3.102  qed
   3.103  
   3.104 -lemma simple_bochner_integral_linear:
   3.105 +lemma%unimportant simple_bochner_integral_linear:
   3.106    assumes "linear f"
   3.107    assumes g: "simple_bochner_integrable M g"
   3.108    shows "simple_bochner_integral M (\<lambda>x. f (g x)) = f (simple_bochner_integral M g)"
   3.109 @@ -484,14 +484,14 @@
   3.110    finally show ?thesis .
   3.111  qed
   3.112  
   3.113 -lemma simple_bochner_integral_bounded:
   3.114 +lemma%important simple_bochner_integral_bounded:
   3.115    fixes f :: "'a \<Rightarrow> 'b::{real_normed_vector, second_countable_topology}"
   3.116    assumes f[measurable]: "f \<in> borel_measurable M"
   3.117    assumes s: "simple_bochner_integrable M s" and t: "simple_bochner_integrable M t"
   3.118    shows "ennreal (norm (simple_bochner_integral M s - simple_bochner_integral M t)) \<le>
   3.119      (\<integral>\<^sup>+ x. norm (f x - s x) \<partial>M) + (\<integral>\<^sup>+ x. norm (f x - t x) \<partial>M)"
   3.120      (is "ennreal (norm (?s - ?t)) \<le> ?S + ?T")
   3.121 -proof -
   3.122 +proof%unimportant -
   3.123    have [measurable]: "s \<in> borel_measurable M" "t \<in> borel_measurable M"
   3.124      using s t by (auto intro: borel_measurable_simple_function elim: simple_bochner_integrable.cases)
   3.125  
   3.126 @@ -520,13 +520,13 @@
   3.127      (\<lambda>i. simple_bochner_integral M (s i)) \<longlonglongrightarrow> x \<Longrightarrow>
   3.128      has_bochner_integral M f x"
   3.129  
   3.130 -lemma has_bochner_integral_cong:
   3.131 +lemma%unimportant has_bochner_integral_cong:
   3.132    assumes "M = N" "\<And>x. x \<in> space N \<Longrightarrow> f x = g x" "x = y"
   3.133    shows "has_bochner_integral M f x \<longleftrightarrow> has_bochner_integral N g y"
   3.134    unfolding has_bochner_integral.simps assms(1,3)
   3.135    using assms(2) by (simp cong: measurable_cong_strong nn_integral_cong_strong)
   3.136  
   3.137 -lemma has_bochner_integral_cong_AE:
   3.138 +lemma%unimportant has_bochner_integral_cong_AE:
   3.139    "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> (AE x in M. f x = g x) \<Longrightarrow>
   3.140      has_bochner_integral M f x \<longleftrightarrow> has_bochner_integral M g x"
   3.141    unfolding has_bochner_integral.simps
   3.142 @@ -534,22 +534,22 @@
   3.143              nn_integral_cong_AE)
   3.144       auto
   3.145  
   3.146 -lemma borel_measurable_has_bochner_integral:
   3.147 +lemma%unimportant borel_measurable_has_bochner_integral:
   3.148    "has_bochner_integral M f x \<Longrightarrow> f \<in> borel_measurable M"
   3.149    by (rule has_bochner_integral.cases)
   3.150  
   3.151 -lemma borel_measurable_has_bochner_integral'[measurable_dest]:
   3.152 +lemma%unimportant borel_measurable_has_bochner_integral'[measurable_dest]:
   3.153    "has_bochner_integral M f x \<Longrightarrow> g \<in> measurable N M \<Longrightarrow> (\<lambda>x. f (g x)) \<in> borel_measurable N"
   3.154    using borel_measurable_has_bochner_integral[measurable] by measurable
   3.155  
   3.156 -lemma has_bochner_integral_simple_bochner_integrable:
   3.157 +lemma%unimportant has_bochner_integral_simple_bochner_integrable:
   3.158    "simple_bochner_integrable M f \<Longrightarrow> has_bochner_integral M f (simple_bochner_integral M f)"
   3.159    by (rule has_bochner_integral.intros[where s="\<lambda>_. f"])
   3.160       (auto intro: borel_measurable_simple_function
   3.161             elim: simple_bochner_integrable.cases
   3.162             simp: zero_ennreal_def[symmetric])
   3.163  
   3.164 -lemma has_bochner_integral_real_indicator:
   3.165 +lemma%unimportant has_bochner_integral_real_indicator:
   3.166    assumes [measurable]: "A \<in> sets M" and A: "emeasure M A < \<infinity>"
   3.167    shows "has_bochner_integral M (indicator A) (measure M A)"
   3.168  proof -
   3.169 @@ -567,7 +567,7 @@
   3.170      by (metis has_bochner_integral_simple_bochner_integrable)
   3.171  qed
   3.172  
   3.173 -lemma has_bochner_integral_add[intro]:
   3.174 +lemma%unimportant has_bochner_integral_add[intro]:
   3.175    "has_bochner_integral M f x \<Longrightarrow> has_bochner_integral M g y \<Longrightarrow>
   3.176      has_bochner_integral M (\<lambda>x. f x + g x) (x + y)"
   3.177  proof (safe intro!: has_bochner_integral.intros elim!: has_bochner_integral.cases)
   3.178 @@ -604,7 +604,7 @@
   3.179    qed
   3.180  qed (auto simp: simple_bochner_integral_add tendsto_add)
   3.181  
   3.182 -lemma has_bochner_integral_bounded_linear:
   3.183 +lemma%unimportant has_bochner_integral_bounded_linear:
   3.184    assumes "bounded_linear T"
   3.185    shows "has_bochner_integral M f x \<Longrightarrow> has_bochner_integral M (\<lambda>x. T (f x)) (T x)"
   3.186  proof (safe intro!: has_bochner_integral.intros elim!: has_bochner_integral.cases)
   3.187 @@ -650,79 +650,79 @@
   3.188      by (auto intro!: T.tendsto simp: simple_bochner_integral_linear T.linear_axioms)
   3.189  qed
   3.190  
   3.191 -lemma has_bochner_integral_zero[intro]: "has_bochner_integral M (\<lambda>x. 0) 0"
   3.192 +lemma%unimportant has_bochner_integral_zero[intro]: "has_bochner_integral M (\<lambda>x. 0) 0"
   3.193    by (auto intro!: has_bochner_integral.intros[where s="\<lambda>_ _. 0"]
   3.194             simp: zero_ennreal_def[symmetric] simple_bochner_integrable.simps
   3.195                   simple_bochner_integral_def image_constant_conv)
   3.196  
   3.197 -lemma has_bochner_integral_scaleR_left[intro]:
   3.198 +lemma%unimportant has_bochner_integral_scaleR_left[intro]:
   3.199    "(c \<noteq> 0 \<Longrightarrow> has_bochner_integral M f x) \<Longrightarrow> has_bochner_integral M (\<lambda>x. f x *\<^sub>R c) (x *\<^sub>R c)"
   3.200    by (cases "c = 0") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_scaleR_left])
   3.201  
   3.202 -lemma has_bochner_integral_scaleR_right[intro]:
   3.203 +lemma%unimportant has_bochner_integral_scaleR_right[intro]:
   3.204    "(c \<noteq> 0 \<Longrightarrow> has_bochner_integral M f x) \<Longrightarrow> has_bochner_integral M (\<lambda>x. c *\<^sub>R f x) (c *\<^sub>R x)"
   3.205    by (cases "c = 0") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_scaleR_right])
   3.206  
   3.207 -lemma has_bochner_integral_mult_left[intro]:
   3.208 +lemma%unimportant has_bochner_integral_mult_left[intro]:
   3.209    fixes c :: "_::{real_normed_algebra,second_countable_topology}"
   3.210    shows "(c \<noteq> 0 \<Longrightarrow> has_bochner_integral M f x) \<Longrightarrow> has_bochner_integral M (\<lambda>x. f x * c) (x * c)"
   3.211    by (cases "c = 0") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_mult_left])
   3.212  
   3.213 -lemma has_bochner_integral_mult_right[intro]:
   3.214 +lemma%unimportant has_bochner_integral_mult_right[intro]:
   3.215    fixes c :: "_::{real_normed_algebra,second_countable_topology}"
   3.216    shows "(c \<noteq> 0 \<Longrightarrow> has_bochner_integral M f x) \<Longrightarrow> has_bochner_integral M (\<lambda>x. c * f x) (c * x)"
   3.217    by (cases "c = 0") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_mult_right])
   3.218  
   3.219 -lemmas has_bochner_integral_divide =
   3.220 +lemmas%unimportant has_bochner_integral_divide =
   3.221    has_bochner_integral_bounded_linear[OF bounded_linear_divide]
   3.222  
   3.223 -lemma has_bochner_integral_divide_zero[intro]:
   3.224 +lemma%unimportant has_bochner_integral_divide_zero[intro]:
   3.225    fixes c :: "_::{real_normed_field, field, second_countable_topology}"
   3.226    shows "(c \<noteq> 0 \<Longrightarrow> has_bochner_integral M f x) \<Longrightarrow> has_bochner_integral M (\<lambda>x. f x / c) (x / c)"
   3.227    using has_bochner_integral_divide by (cases "c = 0") auto
   3.228  
   3.229 -lemma has_bochner_integral_inner_left[intro]:
   3.230 +lemma%unimportant has_bochner_integral_inner_left[intro]:
   3.231    "(c \<noteq> 0 \<Longrightarrow> has_bochner_integral M f x) \<Longrightarrow> has_bochner_integral M (\<lambda>x. f x \<bullet> c) (x \<bullet> c)"
   3.232    by (cases "c = 0") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_inner_left])
   3.233  
   3.234 -lemma has_bochner_integral_inner_right[intro]:
   3.235 +lemma%unimportant has_bochner_integral_inner_right[intro]:
   3.236    "(c \<noteq> 0 \<Longrightarrow> has_bochner_integral M f x) \<Longrightarrow> has_bochner_integral M (\<lambda>x. c \<bullet> f x) (c \<bullet> x)"
   3.237    by (cases "c = 0") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_inner_right])
   3.238  
   3.239 -lemmas has_bochner_integral_minus =
   3.240 +lemmas%unimportant has_bochner_integral_minus =
   3.241    has_bochner_integral_bounded_linear[OF bounded_linear_minus[OF bounded_linear_ident]]
   3.242 -lemmas has_bochner_integral_Re =
   3.243 +lemmas%unimportant has_bochner_integral_Re =
   3.244    has_bochner_integral_bounded_linear[OF bounded_linear_Re]
   3.245 -lemmas has_bochner_integral_Im =
   3.246 +lemmas%unimportant has_bochner_integral_Im =
   3.247    has_bochner_integral_bounded_linear[OF bounded_linear_Im]
   3.248 -lemmas has_bochner_integral_cnj =
   3.249 +lemmas%unimportant has_bochner_integral_cnj =
   3.250    has_bochner_integral_bounded_linear[OF bounded_linear_cnj]
   3.251 -lemmas has_bochner_integral_of_real =
   3.252 +lemmas%unimportant has_bochner_integral_of_real =
   3.253    has_bochner_integral_bounded_linear[OF bounded_linear_of_real]
   3.254 -lemmas has_bochner_integral_fst =
   3.255 +lemmas%unimportant has_bochner_integral_fst =
   3.256    has_bochner_integral_bounded_linear[OF bounded_linear_fst]
   3.257 -lemmas has_bochner_integral_snd =
   3.258 +lemmas%unimportant has_bochner_integral_snd =
   3.259    has_bochner_integral_bounded_linear[OF bounded_linear_snd]
   3.260  
   3.261 -lemma has_bochner_integral_indicator:
   3.262 +lemma%unimportant has_bochner_integral_indicator:
   3.263    "A \<in> sets M \<Longrightarrow> emeasure M A < \<infinity> \<Longrightarrow>
   3.264      has_bochner_integral M (\<lambda>x. indicator A x *\<^sub>R c) (measure M A *\<^sub>R c)"
   3.265    by (intro has_bochner_integral_scaleR_left has_bochner_integral_real_indicator)
   3.266  
   3.267 -lemma has_bochner_integral_diff:
   3.268 +lemma%unimportant has_bochner_integral_diff:
   3.269    "has_bochner_integral M f x \<Longrightarrow> has_bochner_integral M g y \<Longrightarrow>
   3.270      has_bochner_integral M (\<lambda>x. f x - g x) (x - y)"
   3.271    unfolding diff_conv_add_uminus
   3.272    by (intro has_bochner_integral_add has_bochner_integral_minus)
   3.273  
   3.274 -lemma has_bochner_integral_sum:
   3.275 +lemma%unimportant has_bochner_integral_sum:
   3.276    "(\<And>i. i \<in> I \<Longrightarrow> has_bochner_integral M (f i) (x i)) \<Longrightarrow>
   3.277      has_bochner_integral M (\<lambda>x. \<Sum>i\<in>I. f i x) (\<Sum>i\<in>I. x i)"
   3.278    by (induct I rule: infinite_finite_induct) auto
   3.279  
   3.280 -lemma has_bochner_integral_implies_finite_norm:
   3.281 +lemma%important has_bochner_integral_implies_finite_norm:
   3.282    "has_bochner_integral M f x \<Longrightarrow> (\<integral>\<^sup>+x. norm (f x) \<partial>M) < \<infinity>"
   3.283 -proof (elim has_bochner_integral.cases)
   3.284 +proof%unimportant (elim has_bochner_integral.cases)
   3.285    fix s v
   3.286    assume [measurable]: "f \<in> borel_measurable M" and s: "\<And>i. simple_bochner_integrable M (s i)" and
   3.287      lim_0: "(\<lambda>i. \<integral>\<^sup>+ x. ennreal (norm (f x - s i x)) \<partial>M) \<longlonglongrightarrow> 0"
   3.288 @@ -756,10 +756,10 @@
   3.289    finally show "(\<integral>\<^sup>+ x. ennreal (norm (f x)) \<partial>M) < \<infinity>" .
   3.290  qed
   3.291  
   3.292 -lemma has_bochner_integral_norm_bound:
   3.293 +lemma%important has_bochner_integral_norm_bound:
   3.294    assumes i: "has_bochner_integral M f x"
   3.295    shows "norm x \<le> (\<integral>\<^sup>+x. norm (f x) \<partial>M)"
   3.296 -using assms proof
   3.297 +using assms proof%unimportant
   3.298    fix s assume
   3.299      x: "(\<lambda>i. simple_bochner_integral M (s i)) \<longlonglongrightarrow> x" (is "?s \<longlonglongrightarrow> x") and
   3.300      s[simp]: "\<And>i. simple_bochner_integrable M (s i)" and
   3.301 @@ -797,9 +797,9 @@
   3.302    qed
   3.303  qed
   3.304  
   3.305 -lemma has_bochner_integral_eq:
   3.306 +lemma%important has_bochner_integral_eq:
   3.307    "has_bochner_integral M f x \<Longrightarrow> has_bochner_integral M f y \<Longrightarrow> x = y"
   3.308 -proof (elim has_bochner_integral.cases)
   3.309 +proof%unimportant (elim has_bochner_integral.cases)
   3.310    assume f[measurable]: "f \<in> borel_measurable M"
   3.311  
   3.312    fix s t
   3.313 @@ -834,7 +834,7 @@
   3.314    then show "x = y" by simp
   3.315  qed
   3.316  
   3.317 -lemma has_bochner_integralI_AE:
   3.318 +lemma%unimportant has_bochner_integralI_AE:
   3.319    assumes f: "has_bochner_integral M f x"
   3.320      and g: "g \<in> borel_measurable M"
   3.321      and ae: "AE x in M. f x = g x"
   3.322 @@ -848,7 +848,7 @@
   3.323    finally show "(\<lambda>i. \<integral>\<^sup>+ x. ennreal (norm (g x - s i x)) \<partial>M) \<longlonglongrightarrow> 0" .
   3.324  qed (auto intro: g)
   3.325  
   3.326 -lemma has_bochner_integral_eq_AE:
   3.327 +lemma%unimportant has_bochner_integral_eq_AE:
   3.328    assumes f: "has_bochner_integral M f x"
   3.329      and g: "has_bochner_integral M g y"
   3.330      and ae: "AE x in M. f x = g x"
   3.331 @@ -860,7 +860,7 @@
   3.332      by (rule has_bochner_integral_eq)
   3.333  qed
   3.334  
   3.335 -lemma simple_bochner_integrable_restrict_space:
   3.336 +lemma%unimportant simple_bochner_integrable_restrict_space:
   3.337    fixes f :: "_ \<Rightarrow> 'b::real_normed_vector"
   3.338    assumes \<Omega>: "\<Omega> \<inter> space M \<in> sets M"
   3.339    shows "simple_bochner_integrable (restrict_space M \<Omega>) f \<longleftrightarrow>
   3.340 @@ -869,13 +869,13 @@
   3.341      simple_function_restrict_space[OF \<Omega>] emeasure_restrict_space[OF \<Omega>] Collect_restrict
   3.342      indicator_eq_0_iff conj_left_commute)
   3.343  
   3.344 -lemma simple_bochner_integral_restrict_space:
   3.345 +lemma%important simple_bochner_integral_restrict_space:
   3.346    fixes f :: "_ \<Rightarrow> 'b::real_normed_vector"
   3.347    assumes \<Omega>: "\<Omega> \<inter> space M \<in> sets M"
   3.348    assumes f: "simple_bochner_integrable (restrict_space M \<Omega>) f"
   3.349    shows "simple_bochner_integral (restrict_space M \<Omega>) f =
   3.350      simple_bochner_integral M (\<lambda>x. indicator \<Omega> x *\<^sub>R f x)"
   3.351 -proof -
   3.352 +proof%unimportant -
   3.353    have "finite ((\<lambda>x. indicator \<Omega> x *\<^sub>R f x)`space M)"
   3.354      using f simple_bochner_integrable_restrict_space[OF \<Omega>, of f]
   3.355      by (simp add: simple_bochner_integrable.simps simple_function_def)
   3.356 @@ -895,7 +895,7 @@
   3.357  
   3.358  end
   3.359  
   3.360 -definition lebesgue_integral ("integral\<^sup>L") where
   3.361 +definition%important lebesgue_integral ("integral\<^sup>L") where
   3.362    "integral\<^sup>L M f = (if \<exists>x. has_bochner_integral M f x then THE x. has_bochner_integral M f x else 0)"
   3.363  
   3.364  syntax
   3.365 @@ -910,155 +910,155 @@
   3.366  translations
   3.367    "LINT x|M. f" == "CONST lebesgue_integral M (\<lambda>x. f)"
   3.368  
   3.369 -lemma has_bochner_integral_integral_eq: "has_bochner_integral M f x \<Longrightarrow> integral\<^sup>L M f = x"
   3.370 +lemma%unimportant has_bochner_integral_integral_eq: "has_bochner_integral M f x \<Longrightarrow> integral\<^sup>L M f = x"
   3.371    by (metis the_equality has_bochner_integral_eq lebesgue_integral_def)
   3.372  
   3.373 -lemma has_bochner_integral_integrable:
   3.374 +lemma%unimportant has_bochner_integral_integrable:
   3.375    "integrable M f \<Longrightarrow> has_bochner_integral M f (integral\<^sup>L M f)"
   3.376    by (auto simp: has_bochner_integral_integral_eq integrable.simps)
   3.377  
   3.378 -lemma has_bochner_integral_iff:
   3.379 +lemma%unimportant has_bochner_integral_iff:
   3.380    "has_bochner_integral M f x \<longleftrightarrow> integrable M f \<and> integral\<^sup>L M f = x"
   3.381    by (metis has_bochner_integral_integrable has_bochner_integral_integral_eq integrable.intros)
   3.382  
   3.383 -lemma simple_bochner_integrable_eq_integral:
   3.384 +lemma%unimportant simple_bochner_integrable_eq_integral:
   3.385    "simple_bochner_integrable M f \<Longrightarrow> simple_bochner_integral M f = integral\<^sup>L M f"
   3.386    using has_bochner_integral_simple_bochner_integrable[of M f]
   3.387    by (simp add: has_bochner_integral_integral_eq)
   3.388  
   3.389 -lemma not_integrable_integral_eq: "\<not> integrable M f \<Longrightarrow> integral\<^sup>L M f = 0"
   3.390 +lemma%unimportant not_integrable_integral_eq: "\<not> integrable M f \<Longrightarrow> integral\<^sup>L M f = 0"
   3.391    unfolding integrable.simps lebesgue_integral_def by (auto intro!: arg_cong[where f=The])
   3.392  
   3.393 -lemma integral_eq_cases:
   3.394 +lemma%unimportant integral_eq_cases:
   3.395    "integrable M f \<longleftrightarrow> integrable N g \<Longrightarrow>
   3.396      (integrable M f \<Longrightarrow> integrable N g \<Longrightarrow> integral\<^sup>L M f = integral\<^sup>L N g) \<Longrightarrow>
   3.397      integral\<^sup>L M f = integral\<^sup>L N g"
   3.398    by (metis not_integrable_integral_eq)
   3.399  
   3.400 -lemma borel_measurable_integrable[measurable_dest]: "integrable M f \<Longrightarrow> f \<in> borel_measurable M"
   3.401 +lemma%unimportant borel_measurable_integrable[measurable_dest]: "integrable M f \<Longrightarrow> f \<in> borel_measurable M"
   3.402    by (auto elim: integrable.cases has_bochner_integral.cases)
   3.403  
   3.404 -lemma borel_measurable_integrable'[measurable_dest]:
   3.405 +lemma%unimportant borel_measurable_integrable'[measurable_dest]:
   3.406    "integrable M f \<Longrightarrow> g \<in> measurable N M \<Longrightarrow> (\<lambda>x. f (g x)) \<in> borel_measurable N"
   3.407    using borel_measurable_integrable[measurable] by measurable
   3.408  
   3.409 -lemma integrable_cong:
   3.410 +lemma%unimportant integrable_cong:
   3.411    "M = N \<Longrightarrow> (\<And>x. x \<in> space N \<Longrightarrow> f x = g x) \<Longrightarrow> integrable M f \<longleftrightarrow> integrable N g"
   3.412    by (simp cong: has_bochner_integral_cong add: integrable.simps)
   3.413  
   3.414 -lemma integrable_cong_AE:
   3.415 +lemma%unimportant integrable_cong_AE:
   3.416    "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> AE x in M. f x = g x \<Longrightarrow>
   3.417      integrable M f \<longleftrightarrow> integrable M g"
   3.418    unfolding integrable.simps
   3.419    by (intro has_bochner_integral_cong_AE arg_cong[where f=Ex] ext)
   3.420  
   3.421 -lemma integrable_cong_AE_imp:
   3.422 +lemma%unimportant integrable_cong_AE_imp:
   3.423    "integrable M g \<Longrightarrow> f \<in> borel_measurable M \<Longrightarrow> (AE x in M. g x = f x) \<Longrightarrow> integrable M f"
   3.424    using integrable_cong_AE[of f M g] by (auto simp: eq_commute)
   3.425  
   3.426 -lemma integral_cong:
   3.427 +lemma%unimportant integral_cong:
   3.428    "M = N \<Longrightarrow> (\<And>x. x \<in> space N \<Longrightarrow> f x = g x) \<Longrightarrow> integral\<^sup>L M f = integral\<^sup>L N g"
   3.429    by (simp cong: has_bochner_integral_cong cong del: if_weak_cong add: lebesgue_integral_def)
   3.430  
   3.431 -lemma integral_cong_AE:
   3.432 +lemma%unimportant integral_cong_AE:
   3.433    "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> AE x in M. f x = g x \<Longrightarrow>
   3.434      integral\<^sup>L M f = integral\<^sup>L M g"
   3.435    unfolding lebesgue_integral_def
   3.436    by (rule arg_cong[where x="has_bochner_integral M f"]) (intro has_bochner_integral_cong_AE ext)
   3.437  
   3.438 -lemma integrable_add[simp, intro]: "integrable M f \<Longrightarrow> integrable M g \<Longrightarrow> integrable M (\<lambda>x. f x + g x)"
   3.439 +lemma%unimportant integrable_add[simp, intro]: "integrable M f \<Longrightarrow> integrable M g \<Longrightarrow> integrable M (\<lambda>x. f x + g x)"
   3.440    by (auto simp: integrable.simps)
   3.441  
   3.442 -lemma integrable_zero[simp, intro]: "integrable M (\<lambda>x. 0)"
   3.443 +lemma%unimportant integrable_zero[simp, intro]: "integrable M (\<lambda>x. 0)"
   3.444    by (metis has_bochner_integral_zero integrable.simps)
   3.445  
   3.446 -lemma integrable_sum[simp, intro]: "(\<And>i. i \<in> I \<Longrightarrow> integrable M (f i)) \<Longrightarrow> integrable M (\<lambda>x. \<Sum>i\<in>I. f i x)"
   3.447 +lemma%unimportant integrable_sum[simp, intro]: "(\<And>i. i \<in> I \<Longrightarrow> integrable M (f i)) \<Longrightarrow> integrable M (\<lambda>x. \<Sum>i\<in>I. f i x)"
   3.448    by (metis has_bochner_integral_sum integrable.simps)
   3.449  
   3.450 -lemma integrable_indicator[simp, intro]: "A \<in> sets M \<Longrightarrow> emeasure M A < \<infinity> \<Longrightarrow>
   3.451 +lemma%unimportant integrable_indicator[simp, intro]: "A \<in> sets M \<Longrightarrow> emeasure M A < \<infinity> \<Longrightarrow>
   3.452    integrable M (\<lambda>x. indicator A x *\<^sub>R c)"
   3.453    by (metis has_bochner_integral_indicator integrable.simps)
   3.454  
   3.455 -lemma integrable_real_indicator[simp, intro]: "A \<in> sets M \<Longrightarrow> emeasure M A < \<infinity> \<Longrightarrow>
   3.456 +lemma%unimportant integrable_real_indicator[simp, intro]: "A \<in> sets M \<Longrightarrow> emeasure M A < \<infinity> \<Longrightarrow>
   3.457    integrable M (indicator A :: 'a \<Rightarrow> real)"
   3.458    by (metis has_bochner_integral_real_indicator integrable.simps)
   3.459  
   3.460 -lemma integrable_diff[simp, intro]: "integrable M f \<Longrightarrow> integrable M g \<Longrightarrow> integrable M (\<lambda>x. f x - g x)"
   3.461 +lemma%unimportant integrable_diff[simp, intro]: "integrable M f \<Longrightarrow> integrable M g \<Longrightarrow> integrable M (\<lambda>x. f x - g x)"
   3.462    by (auto simp: integrable.simps intro: has_bochner_integral_diff)
   3.463  
   3.464 -lemma integrable_bounded_linear: "bounded_linear T \<Longrightarrow> integrable M f \<Longrightarrow> integrable M (\<lambda>x. T (f x))"
   3.465 +lemma%unimportant integrable_bounded_linear: "bounded_linear T \<Longrightarrow> integrable M f \<Longrightarrow> integrable M (\<lambda>x. T (f x))"
   3.466    by (auto simp: integrable.simps intro: has_bochner_integral_bounded_linear)
   3.467  
   3.468 -lemma integrable_scaleR_left[simp, intro]: "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> integrable M (\<lambda>x. f x *\<^sub>R c)"
   3.469 +lemma%unimportant integrable_scaleR_left[simp, intro]: "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> integrable M (\<lambda>x. f x *\<^sub>R c)"
   3.470    unfolding integrable.simps by fastforce
   3.471  
   3.472 -lemma integrable_scaleR_right[simp, intro]: "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> integrable M (\<lambda>x. c *\<^sub>R f x)"
   3.473 +lemma%unimportant integrable_scaleR_right[simp, intro]: "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> integrable M (\<lambda>x. c *\<^sub>R f x)"
   3.474    unfolding integrable.simps by fastforce
   3.475  
   3.476 -lemma integrable_mult_left[simp, intro]:
   3.477 +lemma%unimportant integrable_mult_left[simp, intro]:
   3.478    fixes c :: "_::{real_normed_algebra,second_countable_topology}"
   3.479    shows "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> integrable M (\<lambda>x. f x * c)"
   3.480    unfolding integrable.simps by fastforce
   3.481  
   3.482 -lemma integrable_mult_right[simp, intro]:
   3.483 +lemma%unimportant integrable_mult_right[simp, intro]:
   3.484    fixes c :: "_::{real_normed_algebra,second_countable_topology}"
   3.485    shows "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> integrable M (\<lambda>x. c * f x)"
   3.486    unfolding integrable.simps by fastforce
   3.487  
   3.488 -lemma integrable_divide_zero[simp, intro]:
   3.489 +lemma%unimportant integrable_divide_zero[simp, intro]:
   3.490    fixes c :: "_::{real_normed_field, field, second_countable_topology}"
   3.491    shows "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> integrable M (\<lambda>x. f x / c)"
   3.492    unfolding integrable.simps by fastforce
   3.493  
   3.494 -lemma integrable_inner_left[simp, intro]:
   3.495 +lemma%unimportant integrable_inner_left[simp, intro]:
   3.496    "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> integrable M (\<lambda>x. f x \<bullet> c)"
   3.497    unfolding integrable.simps by fastforce
   3.498  
   3.499 -lemma integrable_inner_right[simp, intro]:
   3.500 +lemma%unimportant integrable_inner_right[simp, intro]:
   3.501    "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> integrable M (\<lambda>x. c \<bullet> f x)"
   3.502    unfolding integrable.simps by fastforce
   3.503  
   3.504 -lemmas integrable_minus[simp, intro] =
   3.505 +lemmas%unimportant integrable_minus[simp, intro] =
   3.506    integrable_bounded_linear[OF bounded_linear_minus[OF bounded_linear_ident]]
   3.507 -lemmas integrable_divide[simp, intro] =
   3.508 +lemmas%unimportant integrable_divide[simp, intro] =
   3.509    integrable_bounded_linear[OF bounded_linear_divide]
   3.510 -lemmas integrable_Re[simp, intro] =
   3.511 +lemmas%unimportant integrable_Re[simp, intro] =
   3.512    integrable_bounded_linear[OF bounded_linear_Re]
   3.513 -lemmas integrable_Im[simp, intro] =
   3.514 +lemmas%unimportant integrable_Im[simp, intro] =
   3.515    integrable_bounded_linear[OF bounded_linear_Im]
   3.516 -lemmas integrable_cnj[simp, intro] =
   3.517 +lemmas%unimportant integrable_cnj[simp, intro] =
   3.518    integrable_bounded_linear[OF bounded_linear_cnj]
   3.519 -lemmas integrable_of_real[simp, intro] =
   3.520 +lemmas%unimportant integrable_of_real[simp, intro] =
   3.521    integrable_bounded_linear[OF bounded_linear_of_real]
   3.522 -lemmas integrable_fst[simp, intro] =
   3.523 +lemmas%unimportant integrable_fst[simp, intro] =
   3.524    integrable_bounded_linear[OF bounded_linear_fst]
   3.525 -lemmas integrable_snd[simp, intro] =
   3.526 +lemmas%unimportant integrable_snd[simp, intro] =
   3.527    integrable_bounded_linear[OF bounded_linear_snd]
   3.528  
   3.529 -lemma integral_zero[simp]: "integral\<^sup>L M (\<lambda>x. 0) = 0"
   3.530 +lemma%unimportant integral_zero[simp]: "integral\<^sup>L M (\<lambda>x. 0) = 0"
   3.531    by (intro has_bochner_integral_integral_eq has_bochner_integral_zero)
   3.532  
   3.533 -lemma integral_add[simp]: "integrable M f \<Longrightarrow> integrable M g \<Longrightarrow>
   3.534 +lemma%unimportant integral_add[simp]: "integrable M f \<Longrightarrow> integrable M g \<Longrightarrow>
   3.535      integral\<^sup>L M (\<lambda>x. f x + g x) = integral\<^sup>L M f + integral\<^sup>L M g"
   3.536    by (intro has_bochner_integral_integral_eq has_bochner_integral_add has_bochner_integral_integrable)
   3.537  
   3.538 -lemma integral_diff[simp]: "integrable M f \<Longrightarrow> integrable M g \<Longrightarrow>
   3.539 +lemma%unimportant integral_diff[simp]: "integrable M f \<Longrightarrow> integrable M g \<Longrightarrow>
   3.540      integral\<^sup>L M (\<lambda>x. f x - g x) = integral\<^sup>L M f - integral\<^sup>L M g"
   3.541    by (intro has_bochner_integral_integral_eq has_bochner_integral_diff has_bochner_integral_integrable)
   3.542  
   3.543 -lemma integral_sum: "(\<And>i. i \<in> I \<Longrightarrow> integrable M (f i)) \<Longrightarrow>
   3.544 +lemma%unimportant integral_sum: "(\<And>i. i \<in> I \<Longrightarrow> integrable M (f i)) \<Longrightarrow>
   3.545    integral\<^sup>L M (\<lambda>x. \<Sum>i\<in>I. f i x) = (\<Sum>i\<in>I. integral\<^sup>L M (f i))"
   3.546    by (intro has_bochner_integral_integral_eq has_bochner_integral_sum has_bochner_integral_integrable)
   3.547  
   3.548 -lemma integral_sum'[simp]: "(\<And>i. i \<in> I =simp=> integrable M (f i)) \<Longrightarrow>
   3.549 +lemma%unimportant integral_sum'[simp]: "(\<And>i. i \<in> I =simp=> integrable M (f i)) \<Longrightarrow>
   3.550    integral\<^sup>L M (\<lambda>x. \<Sum>i\<in>I. f i x) = (\<Sum>i\<in>I. integral\<^sup>L M (f i))"
   3.551    unfolding simp_implies_def by (rule integral_sum)
   3.552  
   3.553 -lemma integral_bounded_linear: "bounded_linear T \<Longrightarrow> integrable M f \<Longrightarrow>
   3.554 +lemma%unimportant integral_bounded_linear: "bounded_linear T \<Longrightarrow> integrable M f \<Longrightarrow>
   3.555      integral\<^sup>L M (\<lambda>x. T (f x)) = T (integral\<^sup>L M f)"
   3.556    by (metis has_bochner_integral_bounded_linear has_bochner_integral_integrable has_bochner_integral_integral_eq)
   3.557  
   3.558 -lemma integral_bounded_linear':
   3.559 +lemma%unimportant integral_bounded_linear':
   3.560    assumes T: "bounded_linear T" and T': "bounded_linear T'"
   3.561    assumes *: "\<not> (\<forall>x. T x = 0) \<Longrightarrow> (\<forall>x. T' (T x) = x)"
   3.562    shows "integral\<^sup>L M (\<lambda>x. T (f x)) = T (integral\<^sup>L M f)"
   3.563 @@ -1085,76 +1085,76 @@
   3.564    qed
   3.565  qed
   3.566  
   3.567 -lemma integral_scaleR_left[simp]: "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> (\<integral> x. f x *\<^sub>R c \<partial>M) = integral\<^sup>L M f *\<^sub>R c"
   3.568 +lemma%unimportant integral_scaleR_left[simp]: "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> (\<integral> x. f x *\<^sub>R c \<partial>M) = integral\<^sup>L M f *\<^sub>R c"
   3.569    by (intro has_bochner_integral_integral_eq has_bochner_integral_integrable has_bochner_integral_scaleR_left)
   3.570  
   3.571 -lemma integral_scaleR_right[simp]: "(\<integral> x. c *\<^sub>R f x \<partial>M) = c *\<^sub>R integral\<^sup>L M f"
   3.572 +lemma%unimportant integral_scaleR_right[simp]: "(\<integral> x. c *\<^sub>R f x \<partial>M) = c *\<^sub>R integral\<^sup>L M f"
   3.573    by (rule integral_bounded_linear'[OF bounded_linear_scaleR_right bounded_linear_scaleR_right[of "1 / c"]]) simp
   3.574  
   3.575 -lemma integral_mult_left[simp]:
   3.576 +lemma%unimportant integral_mult_left[simp]:
   3.577    fixes c :: "_::{real_normed_algebra,second_countable_topology}"
   3.578    shows "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> (\<integral> x. f x * c \<partial>M) = integral\<^sup>L M f * c"
   3.579    by (intro has_bochner_integral_integral_eq has_bochner_integral_integrable has_bochner_integral_mult_left)
   3.580  
   3.581 -lemma integral_mult_right[simp]:
   3.582 +lemma%unimportant integral_mult_right[simp]:
   3.583    fixes c :: "_::{real_normed_algebra,second_countable_topology}"
   3.584    shows "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> (\<integral> x. c * f x \<partial>M) = c * integral\<^sup>L M f"
   3.585    by (intro has_bochner_integral_integral_eq has_bochner_integral_integrable has_bochner_integral_mult_right)
   3.586  
   3.587 -lemma integral_mult_left_zero[simp]:
   3.588 +lemma%unimportant integral_mult_left_zero[simp]:
   3.589    fixes c :: "_::{real_normed_field,second_countable_topology}"
   3.590    shows "(\<integral> x. f x * c \<partial>M) = integral\<^sup>L M f * c"
   3.591    by (rule integral_bounded_linear'[OF bounded_linear_mult_left bounded_linear_mult_left[of "1 / c"]]) simp
   3.592  
   3.593 -lemma integral_mult_right_zero[simp]:
   3.594 +lemma%unimportant integral_mult_right_zero[simp]:
   3.595    fixes c :: "_::{real_normed_field,second_countable_topology}"
   3.596    shows "(\<integral> x. c * f x \<partial>M) = c * integral\<^sup>L M f"
   3.597    by (rule integral_bounded_linear'[OF bounded_linear_mult_right bounded_linear_mult_right[of "1 / c"]]) simp
   3.598  
   3.599 -lemma integral_inner_left[simp]: "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> (\<integral> x. f x \<bullet> c \<partial>M) = integral\<^sup>L M f \<bullet> c"
   3.600 +lemma%unimportant integral_inner_left[simp]: "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> (\<integral> x. f x \<bullet> c \<partial>M) = integral\<^sup>L M f \<bullet> c"
   3.601    by (intro has_bochner_integral_integral_eq has_bochner_integral_integrable has_bochner_integral_inner_left)
   3.602  
   3.603 -lemma integral_inner_right[simp]: "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> (\<integral> x. c \<bullet> f x \<partial>M) = c \<bullet> integral\<^sup>L M f"
   3.604 +lemma%unimportant integral_inner_right[simp]: "(c \<noteq> 0 \<Longrightarrow> integrable M f) \<Longrightarrow> (\<integral> x. c \<bullet> f x \<partial>M) = c \<bullet> integral\<^sup>L M f"
   3.605    by (intro has_bochner_integral_integral_eq has_bochner_integral_integrable has_bochner_integral_inner_right)
   3.606  
   3.607 -lemma integral_divide_zero[simp]:
   3.608 +lemma%unimportant integral_divide_zero[simp]:
   3.609    fixes c :: "_::{real_normed_field, field, second_countable_topology}"
   3.610    shows "integral\<^sup>L M (\<lambda>x. f x / c) = integral\<^sup>L M f / c"
   3.611    by (rule integral_bounded_linear'[OF bounded_linear_divide bounded_linear_mult_left[of c]]) simp
   3.612  
   3.613 -lemma integral_minus[simp]: "integral\<^sup>L M (\<lambda>x. - f x) = - integral\<^sup>L M f"
   3.614 +lemma%unimportant integral_minus[simp]: "integral\<^sup>L M (\<lambda>x. - f x) = - integral\<^sup>L M f"
   3.615    by (rule integral_bounded_linear'[OF bounded_linear_minus[OF bounded_linear_ident] bounded_linear_minus[OF bounded_linear_ident]]) simp
   3.616  
   3.617 -lemma integral_complex_of_real[simp]: "integral\<^sup>L M (\<lambda>x. complex_of_real (f x)) = of_real (integral\<^sup>L M f)"
   3.618 +lemma%unimportant integral_complex_of_real[simp]: "integral\<^sup>L M (\<lambda>x. complex_of_real (f x)) = of_real (integral\<^sup>L M f)"
   3.619    by (rule integral_bounded_linear'[OF bounded_linear_of_real bounded_linear_Re]) simp
   3.620  
   3.621 -lemma integral_cnj[simp]: "integral\<^sup>L M (\<lambda>x. cnj (f x)) = cnj (integral\<^sup>L M f)"
   3.622 +lemma%unimportant integral_cnj[simp]: "integral\<^sup>L M (\<lambda>x. cnj (f x)) = cnj (integral\<^sup>L M f)"
   3.623    by (rule integral_bounded_linear'[OF bounded_linear_cnj bounded_linear_cnj]) simp
   3.624  
   3.625 -lemmas integral_divide[simp] =
   3.626 +lemmas%unimportant integral_divide[simp] =
   3.627    integral_bounded_linear[OF bounded_linear_divide]
   3.628 -lemmas integral_Re[simp] =
   3.629 +lemmas%unimportant integral_Re[simp] =
   3.630    integral_bounded_linear[OF bounded_linear_Re]
   3.631 -lemmas integral_Im[simp] =
   3.632 +lemmas%unimportant integral_Im[simp] =
   3.633    integral_bounded_linear[OF bounded_linear_Im]
   3.634 -lemmas integral_of_real[simp] =
   3.635 +lemmas%unimportant integral_of_real[simp] =
   3.636    integral_bounded_linear[OF bounded_linear_of_real]
   3.637 -lemmas integral_fst[simp] =
   3.638 +lemmas%unimportant integral_fst[simp] =
   3.639    integral_bounded_linear[OF bounded_linear_fst]
   3.640 -lemmas integral_snd[simp] =
   3.641 +lemmas%unimportant integral_snd[simp] =
   3.642    integral_bounded_linear[OF bounded_linear_snd]
   3.643  
   3.644 -lemma integral_norm_bound_ennreal:
   3.645 +lemma%unimportant integral_norm_bound_ennreal:
   3.646    "integrable M f \<Longrightarrow> norm (integral\<^sup>L M f) \<le> (\<integral>\<^sup>+x. norm (f x) \<partial>M)"
   3.647    by (metis has_bochner_integral_integrable has_bochner_integral_norm_bound)
   3.648  
   3.649 -lemma integrableI_sequence:
   3.650 +lemma%important integrableI_sequence:
   3.651    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
   3.652    assumes f[measurable]: "f \<in> borel_measurable M"
   3.653    assumes s: "\<And>i. simple_bochner_integrable M (s i)"
   3.654    assumes lim: "(\<lambda>i. \<integral>\<^sup>+x. norm (f x - s i x) \<partial>M) \<longlonglongrightarrow> 0" (is "?S \<longlonglongrightarrow> 0")
   3.655    shows "integrable M f"
   3.656 -proof -
   3.657 +proof%unimportant -
   3.658    let ?s = "\<lambda>n. simple_bochner_integral M (s n)"
   3.659  
   3.660    have "\<exists>x. ?s \<longlonglongrightarrow> x"
   3.661 @@ -1184,7 +1184,7 @@
   3.662      by (rule, rule) fact+
   3.663  qed
   3.664  
   3.665 -lemma nn_integral_dominated_convergence_norm:
   3.666 +lemma%important nn_integral_dominated_convergence_norm:
   3.667    fixes u' :: "_ \<Rightarrow> _::{real_normed_vector, second_countable_topology}"
   3.668    assumes [measurable]:
   3.669         "\<And>i. u i \<in> borel_measurable M" "u' \<in> borel_measurable M" "w \<in> borel_measurable M"
   3.670 @@ -1192,7 +1192,7 @@
   3.671      and w: "(\<integral>\<^sup>+x. w x \<partial>M) < \<infinity>"
   3.672      and u': "AE x in M. (\<lambda>i. u i x) \<longlonglongrightarrow> u' x"
   3.673    shows "(\<lambda>i. (\<integral>\<^sup>+x. norm (u' x - u i x) \<partial>M)) \<longlonglongrightarrow> 0"
   3.674 -proof -
   3.675 +proof%unimportant -
   3.676    have "AE x in M. \<forall>j. norm (u j x) \<le> w x"
   3.677      unfolding AE_all_countable by rule fact
   3.678    with u' have bnd: "AE x in M. \<forall>j. norm (u' x - u j x) \<le> 2 * w x"
   3.679 @@ -1225,11 +1225,11 @@
   3.680    then show ?thesis by simp
   3.681  qed
   3.682  
   3.683 -lemma integrableI_bounded:
   3.684 +lemma%important integrableI_bounded:
   3.685    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
   3.686    assumes f[measurable]: "f \<in> borel_measurable M" and fin: "(\<integral>\<^sup>+x. norm (f x) \<partial>M) < \<infinity>"
   3.687    shows "integrable M f"
   3.688 -proof -
   3.689 +proof%unimportant -
   3.690    from borel_measurable_implies_sequence_metric[OF f, of 0] obtain s where
   3.691      s: "\<And>i. simple_function M (s i)" and
   3.692      pointwise: "\<And>x. x \<in> space M \<Longrightarrow> (\<lambda>i. s i x) \<longlonglongrightarrow> f x" and
   3.693 @@ -1266,14 +1266,14 @@
   3.694    qed fact
   3.695  qed
   3.696  
   3.697 -lemma integrableI_bounded_set:
   3.698 +lemma%important integrableI_bounded_set:
   3.699    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
   3.700    assumes [measurable]: "A \<in> sets M" "f \<in> borel_measurable M"
   3.701    assumes finite: "emeasure M A < \<infinity>"
   3.702      and bnd: "AE x in M. x \<in> A \<longrightarrow> norm (f x) \<le> B"
   3.703      and null: "AE x in M. x \<notin> A \<longrightarrow> f x = 0"
   3.704    shows "integrable M f"
   3.705 -proof (rule integrableI_bounded)
   3.706 +proof%unimportant (rule integrableI_bounded)
   3.707    { fix x :: 'b have "norm x \<le> B \<Longrightarrow> 0 \<le> B"
   3.708        using norm_ge_zero[of x] by arith }
   3.709    with bnd null have "(\<integral>\<^sup>+ x. ennreal (norm (f x)) \<partial>M) \<le> (\<integral>\<^sup>+ x. ennreal (max 0 B) * indicator A x \<partial>M)"
   3.710 @@ -1283,37 +1283,37 @@
   3.711    finally show "(\<integral>\<^sup>+ x. ennreal (norm (f x)) \<partial>M) < \<infinity>" .
   3.712  qed simp
   3.713  
   3.714 -lemma integrableI_bounded_set_indicator:
   3.715 +lemma%unimportant integrableI_bounded_set_indicator:
   3.716    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
   3.717    shows "A \<in> sets M \<Longrightarrow> f \<in> borel_measurable M \<Longrightarrow>
   3.718      emeasure M A < \<infinity> \<Longrightarrow> (AE x in M. x \<in> A \<longrightarrow> norm (f x) \<le> B) \<Longrightarrow>
   3.719      integrable M (\<lambda>x. indicator A x *\<^sub>R f x)"
   3.720    by (rule integrableI_bounded_set[where A=A]) auto
   3.721  
   3.722 -lemma integrableI_nonneg:
   3.723 +lemma%important integrableI_nonneg:
   3.724    fixes f :: "'a \<Rightarrow> real"
   3.725    assumes "f \<in> borel_measurable M" "AE x in M. 0 \<le> f x" "(\<integral>\<^sup>+x. f x \<partial>M) < \<infinity>"
   3.726    shows "integrable M f"
   3.727 -proof -
   3.728 +proof%unimportant -
   3.729    have "(\<integral>\<^sup>+x. norm (f x) \<partial>M) = (\<integral>\<^sup>+x. f x \<partial>M)"
   3.730      using assms by (intro nn_integral_cong_AE) auto
   3.731    then show ?thesis
   3.732      using assms by (intro integrableI_bounded) auto
   3.733  qed
   3.734  
   3.735 -lemma integrable_iff_bounded:
   3.736 +lemma%important integrable_iff_bounded:
   3.737    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
   3.738    shows "integrable M f \<longleftrightarrow> f \<in> borel_measurable M \<and> (\<integral>\<^sup>+x. norm (f x) \<partial>M) < \<infinity>"
   3.739    using integrableI_bounded[of f M] has_bochner_integral_implies_finite_norm[of M f]
   3.740    unfolding integrable.simps has_bochner_integral.simps[abs_def] by auto
   3.741  
   3.742 -lemma integrable_bound:
   3.743 +lemma%important integrable_bound:
   3.744    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
   3.745      and g :: "'a \<Rightarrow> 'c::{banach, second_countable_topology}"
   3.746    shows "integrable M f \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> (AE x in M. norm (g x) \<le> norm (f x)) \<Longrightarrow>
   3.747      integrable M g"
   3.748    unfolding integrable_iff_bounded
   3.749 -proof safe
   3.750 +proof%unimportant safe
   3.751    assume "f \<in> borel_measurable M" "g \<in> borel_measurable M"
   3.752    assume "AE x in M. norm (g x) \<le> norm (f x)"
   3.753    then have "(\<integral>\<^sup>+ x. ennreal (norm (g x)) \<partial>M) \<le> (\<integral>\<^sup>+ x. ennreal (norm (f x)) \<partial>M)"
   3.754 @@ -1322,71 +1322,71 @@
   3.755    finally show "(\<integral>\<^sup>+ x. ennreal (norm (g x)) \<partial>M) < \<infinity>" .
   3.756  qed
   3.757  
   3.758 -lemma integrable_mult_indicator:
   3.759 +lemma%unimportant integrable_mult_indicator:
   3.760    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
   3.761    shows "A \<in> sets M \<Longrightarrow> integrable M f \<Longrightarrow> integrable M (\<lambda>x. indicator A x *\<^sub>R f x)"
   3.762    by (rule integrable_bound[of M f]) (auto split: split_indicator)
   3.763  
   3.764 -lemma integrable_real_mult_indicator:
   3.765 +lemma%unimportant integrable_real_mult_indicator:
   3.766    fixes f :: "'a \<Rightarrow> real"
   3.767    shows "A \<in> sets M \<Longrightarrow> integrable M f \<Longrightarrow> integrable M (\<lambda>x. f x * indicator A x)"
   3.768    using integrable_mult_indicator[of A M f] by (simp add: mult_ac)
   3.769  
   3.770 -lemma integrable_abs[simp, intro]:
   3.771 +lemma%unimportant integrable_abs[simp, intro]:
   3.772    fixes f :: "'a \<Rightarrow> real"
   3.773    assumes [measurable]: "integrable M f" shows "integrable M (\<lambda>x. \<bar>f x\<bar>)"
   3.774    using assms by (rule integrable_bound) auto
   3.775  
   3.776 -lemma integrable_norm[simp, intro]:
   3.777 +lemma%unimportant integrable_norm[simp, intro]:
   3.778    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
   3.779    assumes [measurable]: "integrable M f" shows "integrable M (\<lambda>x. norm (f x))"
   3.780    using assms by (rule integrable_bound) auto
   3.781  
   3.782 -lemma integrable_norm_cancel:
   3.783 +lemma%unimportant integrable_norm_cancel:
   3.784    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
   3.785    assumes [measurable]: "integrable M (\<lambda>x. norm (f x))" "f \<in> borel_measurable M" shows "integrable M f"
   3.786    using assms by (rule integrable_bound) auto
   3.787  
   3.788 -lemma integrable_norm_iff:
   3.789 +lemma%unimportant integrable_norm_iff:
   3.790    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
   3.791    shows "f \<in> borel_measurable M \<Longrightarrow> integrable M (\<lambda>x. norm (f x)) \<longleftrightarrow> integrable M f"
   3.792    by (auto intro: integrable_norm_cancel)
   3.793  
   3.794 -lemma integrable_abs_cancel:
   3.795 +lemma%unimportant integrable_abs_cancel:
   3.796    fixes f :: "'a \<Rightarrow> real"
   3.797    assumes [measurable]: "integrable M (\<lambda>x. \<bar>f x\<bar>)" "f \<in> borel_measurable M" shows "integrable M f"
   3.798    using assms by (rule integrable_bound) auto
   3.799  
   3.800 -lemma integrable_abs_iff:
   3.801 +lemma%unimportant integrable_abs_iff:
   3.802    fixes f :: "'a \<Rightarrow> real"
   3.803    shows "f \<in> borel_measurable M \<Longrightarrow> integrable M (\<lambda>x. \<bar>f x\<bar>) \<longleftrightarrow> integrable M f"
   3.804    by (auto intro: integrable_abs_cancel)
   3.805  
   3.806 -lemma integrable_max[simp, intro]:
   3.807 +lemma%unimportant integrable_max[simp, intro]:
   3.808    fixes f :: "'a \<Rightarrow> real"
   3.809    assumes fg[measurable]: "integrable M f" "integrable M g"
   3.810    shows "integrable M (\<lambda>x. max (f x) (g x))"
   3.811    using integrable_add[OF integrable_norm[OF fg(1)] integrable_norm[OF fg(2)]]
   3.812    by (rule integrable_bound) auto
   3.813  
   3.814 -lemma integrable_min[simp, intro]:
   3.815 +lemma%unimportant integrable_min[simp, intro]:
   3.816    fixes f :: "'a \<Rightarrow> real"
   3.817    assumes fg[measurable]: "integrable M f" "integrable M g"
   3.818    shows "integrable M (\<lambda>x. min (f x) (g x))"
   3.819    using integrable_add[OF integrable_norm[OF fg(1)] integrable_norm[OF fg(2)]]
   3.820    by (rule integrable_bound) auto
   3.821  
   3.822 -lemma integral_minus_iff[simp]:
   3.823 +lemma%unimportant integral_minus_iff[simp]:
   3.824    "integrable M (\<lambda>x. - f x ::'a::{banach, second_countable_topology}) \<longleftrightarrow> integrable M f"
   3.825    unfolding integrable_iff_bounded
   3.826    by (auto intro: borel_measurable_uminus[of "\<lambda>x. - f x" M, simplified])
   3.827  
   3.828 -lemma integrable_indicator_iff:
   3.829 +lemma%unimportant integrable_indicator_iff:
   3.830    "integrable M (indicator A::_ \<Rightarrow> real) \<longleftrightarrow> A \<inter> space M \<in> sets M \<and> emeasure M (A \<inter> space M) < \<infinity>"
   3.831    by (simp add: integrable_iff_bounded borel_measurable_indicator_iff ennreal_indicator nn_integral_indicator'
   3.832             cong: conj_cong)
   3.833  
   3.834 -lemma integral_indicator[simp]: "integral\<^sup>L M (indicator A) = measure M (A \<inter> space M)"
   3.835 +lemma%unimportant integral_indicator[simp]: "integral\<^sup>L M (indicator A) = measure M (A \<inter> space M)"
   3.836  proof cases
   3.837    assume *: "A \<inter> space M \<in> sets M \<and> emeasure M (A \<inter> space M) < \<infinity>"
   3.838    have "integral\<^sup>L M (indicator A) = integral\<^sup>L M (indicator (A \<inter> space M))"
   3.839 @@ -1405,7 +1405,7 @@
   3.840    finally show ?thesis .
   3.841  qed
   3.842  
   3.843 -lemma integrable_discrete_difference:
   3.844 +lemma%unimportant integrable_discrete_difference:
   3.845    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
   3.846    assumes X: "countable X"
   3.847    assumes null: "\<And>x. x \<in> X \<Longrightarrow> emeasure M {x} = 0"
   3.848 @@ -1429,7 +1429,7 @@
   3.849      by simp
   3.850  qed
   3.851  
   3.852 -lemma integral_discrete_difference:
   3.853 +lemma%unimportant integral_discrete_difference:
   3.854    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
   3.855    assumes X: "countable X"
   3.856    assumes null: "\<And>x. x \<in> X \<Longrightarrow> emeasure M {x} = 0"
   3.857 @@ -1453,7 +1453,7 @@
   3.858    qed
   3.859  qed
   3.860  
   3.861 -lemma has_bochner_integral_discrete_difference:
   3.862 +lemma%unimportant has_bochner_integral_discrete_difference:
   3.863    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
   3.864    assumes X: "countable X"
   3.865    assumes null: "\<And>x. x \<in> X \<Longrightarrow> emeasure M {x} = 0"
   3.866 @@ -1464,7 +1464,7 @@
   3.867    using integral_discrete_difference[of X M f g, OF assms]
   3.868    by (metis has_bochner_integral_iff)
   3.869  
   3.870 -lemma
   3.871 +lemma%important (*FIX ME needs name *)
   3.872    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}" and w :: "'a \<Rightarrow> real"
   3.873    assumes "f \<in> borel_measurable M" "\<And>i. s i \<in> borel_measurable M" "integrable M w"
   3.874    assumes lim: "AE x in M. (\<lambda>i. s i x) \<longlonglongrightarrow> f x"
   3.875 @@ -1472,7 +1472,7 @@
   3.876    shows integrable_dominated_convergence: "integrable M f"
   3.877      and integrable_dominated_convergence2: "\<And>i. integrable M (s i)"
   3.878      and integral_dominated_convergence: "(\<lambda>i. integral\<^sup>L M (s i)) \<longlonglongrightarrow> integral\<^sup>L M f"
   3.879 -proof -
   3.880 +proof%unimportant -
   3.881    have w_nonneg: "AE x in M. 0 \<le> w x"
   3.882      using bound[of 0] by eventually_elim (auto intro: norm_ge_zero order_trans)
   3.883    then have "(\<integral>\<^sup>+x. w x \<partial>M) = (\<integral>\<^sup>+x. norm (w x) \<partial>M)"
   3.884 @@ -1539,7 +1539,7 @@
   3.885    assumes bound: "\<forall>\<^sub>F i in at_top. AE x in M. norm (s i x) \<le> w x"
   3.886  begin
   3.887  
   3.888 -lemma integral_dominated_convergence_at_top: "((\<lambda>t. integral\<^sup>L M (s t)) \<longlongrightarrow> integral\<^sup>L M f) at_top"
   3.889 +lemma%unimportant integral_dominated_convergence_at_top: "((\<lambda>t. integral\<^sup>L M (s t)) \<longlongrightarrow> integral\<^sup>L M f) at_top"
   3.890  proof (rule tendsto_at_topI_sequentially)
   3.891    fix X :: "nat \<Rightarrow> real" assume X: "filterlim X at_top sequentially"
   3.892    from filterlim_iff[THEN iffD1, OF this, rule_format, OF bound]
   3.893 @@ -1560,7 +1560,7 @@
   3.894    qed fact+
   3.895  qed
   3.896  
   3.897 -lemma integrable_dominated_convergence_at_top: "integrable M f"
   3.898 +lemma%unimportant integrable_dominated_convergence_at_top: "integrable M f"
   3.899  proof -
   3.900    from bound obtain N where w: "\<And>n. N \<le> n \<Longrightarrow> AE x in M. norm (s n x) \<le> w x"
   3.901      by (auto simp: eventually_at_top_linorder)
   3.902 @@ -1581,13 +1581,13 @@
   3.903  
   3.904  end
   3.905  
   3.906 -lemma integrable_mult_left_iff:
   3.907 +lemma%unimportant integrable_mult_left_iff:
   3.908    fixes f :: "'a \<Rightarrow> real"
   3.909    shows "integrable M (\<lambda>x. c * f x) \<longleftrightarrow> c = 0 \<or> integrable M f"
   3.910    using integrable_mult_left[of c M f] integrable_mult_left[of "1 / c" M "\<lambda>x. c * f x"]
   3.911    by (cases "c = 0") auto
   3.912  
   3.913 -lemma integrableI_nn_integral_finite:
   3.914 +lemma%unimportant integrableI_nn_integral_finite:
   3.915    assumes [measurable]: "f \<in> borel_measurable M"
   3.916      and nonneg: "AE x in M. 0 \<le> f x"
   3.917      and finite: "(\<integral>\<^sup>+x. f x \<partial>M) = ennreal x"
   3.918 @@ -1599,7 +1599,7 @@
   3.919      by auto
   3.920  qed simp
   3.921  
   3.922 -lemma integral_nonneg_AE:
   3.923 +lemma%unimportant integral_nonneg_AE:
   3.924    fixes f :: "'a \<Rightarrow> real"
   3.925    assumes nonneg: "AE x in M. 0 \<le> f x"
   3.926    shows "0 \<le> integral\<^sup>L M f"
   3.927 @@ -1635,16 +1635,16 @@
   3.928    finally show ?thesis .
   3.929  qed (simp add: not_integrable_integral_eq)
   3.930  
   3.931 -lemma integral_nonneg[simp]:
   3.932 +lemma%unimportant integral_nonneg[simp]:
   3.933    fixes f :: "'a \<Rightarrow> real"
   3.934    shows "(\<And>x. x \<in> space M \<Longrightarrow> 0 \<le> f x) \<Longrightarrow> 0 \<le> integral\<^sup>L M f"
   3.935    by (intro integral_nonneg_AE) auto
   3.936  
   3.937 -lemma nn_integral_eq_integral:
   3.938 +lemma%important nn_integral_eq_integral:
   3.939    assumes f: "integrable M f"
   3.940    assumes nonneg: "AE x in M. 0 \<le> f x"
   3.941    shows "(\<integral>\<^sup>+ x. f x \<partial>M) = integral\<^sup>L M f"
   3.942 -proof -
   3.943 +proof%unimportant -
   3.944    { fix f :: "'a \<Rightarrow> real" assume f: "f \<in> borel_measurable M" "\<And>x. 0 \<le> f x" "integrable M f"
   3.945      then have "(\<integral>\<^sup>+ x. f x \<partial>M) = integral\<^sup>L M f"
   3.946      proof (induct rule: borel_measurable_induct_real)
   3.947 @@ -1687,7 +1687,7 @@
   3.948    finally show ?thesis .
   3.949  qed
   3.950  
   3.951 -lemma nn_integral_eq_integrable:
   3.952 +lemma%unimportant nn_integral_eq_integrable:
   3.953    assumes f: "f \<in> M \<rightarrow>\<^sub>M borel" "AE x in M. 0 \<le> f x" and "0 \<le> x"
   3.954    shows "(\<integral>\<^sup>+x. f x \<partial>M) = ennreal x \<longleftrightarrow> (integrable M f \<and> integral\<^sup>L M f = x)"
   3.955  proof (safe intro!: nn_integral_eq_integral assms)
   3.956 @@ -1697,7 +1697,7 @@
   3.957      by (simp_all add: * assms integral_nonneg_AE)
   3.958  qed
   3.959  
   3.960 -lemma
   3.961 +lemma%unimportant (* FIX ME needs name*)
   3.962    fixes f :: "_ \<Rightarrow> _ \<Rightarrow> 'a :: {banach, second_countable_topology}"
   3.963    assumes integrable[measurable]: "\<And>i. integrable M (f i)"
   3.964    and summable: "AE x in M. summable (\<lambda>i. norm (f i x))"
   3.965 @@ -1748,10 +1748,10 @@
   3.966      unfolding sums_iff by auto
   3.967  qed
   3.968  
   3.969 -lemma integral_norm_bound [simp]:
   3.970 +lemma%important integral_norm_bound [simp]:
   3.971    fixes f :: "_ \<Rightarrow> 'a :: {banach, second_countable_topology}"
   3.972    shows "norm (integral\<^sup>L M f) \<le> (\<integral>x. norm (f x) \<partial>M)"
   3.973 -proof (cases "integrable M f")
   3.974 +proof%unimportant (cases "integrable M f")
   3.975    case True then show ?thesis
   3.976      using nn_integral_eq_integral[of M "\<lambda>x. norm (f x)"] integral_norm_bound_ennreal[of M f]
   3.977      by (simp add: integral_nonneg_AE)
   3.978 @@ -1762,11 +1762,11 @@
   3.979    ultimately show ?thesis by simp
   3.980  qed
   3.981  
   3.982 -lemma integral_abs_bound [simp]:
   3.983 +lemma%unimportant integral_abs_bound [simp]:
   3.984    fixes f :: "'a \<Rightarrow> real" shows "abs (\<integral>x. f x \<partial>M) \<le> (\<integral>x. \<bar>f x\<bar> \<partial>M)"
   3.985  using integral_norm_bound[of M f] by auto
   3.986  
   3.987 -lemma integral_eq_nn_integral:
   3.988 +lemma%unimportant integral_eq_nn_integral:
   3.989    assumes [measurable]: "f \<in> borel_measurable M"
   3.990    assumes nonneg: "AE x in M. 0 \<le> f x"
   3.991    shows "integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)"
   3.992 @@ -1787,7 +1787,7 @@
   3.993      by (simp add: integral_nonneg_AE)
   3.994  qed
   3.995  
   3.996 -lemma enn2real_nn_integral_eq_integral:
   3.997 +lemma%unimportant enn2real_nn_integral_eq_integral:
   3.998    assumes eq: "AE x in M. f x = ennreal (g x)" and nn: "AE x in M. 0 \<le> g x"
   3.999      and fin: "(\<integral>\<^sup>+x. f x \<partial>M) < top"
  3.1000      and [measurable]: "g \<in> M \<rightarrow>\<^sub>M borel"
  3.1001 @@ -1812,20 +1812,20 @@
  3.1002      using nn by (simp add: integral_nonneg_AE)
  3.1003  qed
  3.1004  
  3.1005 -lemma has_bochner_integral_nn_integral:
  3.1006 +lemma%unimportant has_bochner_integral_nn_integral:
  3.1007    assumes "f \<in> borel_measurable M" "AE x in M. 0 \<le> f x" "0 \<le> x"
  3.1008    assumes "(\<integral>\<^sup>+x. f x \<partial>M) = ennreal x"
  3.1009    shows "has_bochner_integral M f x"
  3.1010    unfolding has_bochner_integral_iff
  3.1011    using assms by (auto simp: assms integral_eq_nn_integral intro: integrableI_nn_integral_finite)
  3.1012  
  3.1013 -lemma integrableI_simple_bochner_integrable:
  3.1014 +lemma%unimportant integrableI_simple_bochner_integrable:
  3.1015    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1016    shows "simple_bochner_integrable M f \<Longrightarrow> integrable M f"
  3.1017    by (intro integrableI_sequence[where s="\<lambda>_. f"] borel_measurable_simple_function)
  3.1018       (auto simp: zero_ennreal_def[symmetric] simple_bochner_integrable.simps)
  3.1019  
  3.1020 -lemma integrable_induct[consumes 1, case_names base add lim, induct pred: integrable]:
  3.1021 +lemma%important integrable_induct[consumes 1, case_names base add lim, induct pred: integrable]:
  3.1022    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1023    assumes "integrable M f"
  3.1024    assumes base: "\<And>A c. A \<in> sets M \<Longrightarrow> emeasure M A < \<infinity> \<Longrightarrow> P (\<lambda>x. indicator A x *\<^sub>R c)"
  3.1025 @@ -1834,7 +1834,7 @@
  3.1026     (\<And>x. x \<in> space M \<Longrightarrow> (\<lambda>i. s i x) \<longlonglongrightarrow> f x) \<Longrightarrow>
  3.1027     (\<And>i x. x \<in> space M \<Longrightarrow> norm (s i x) \<le> 2 * norm (f x)) \<Longrightarrow> integrable M f \<Longrightarrow> P f"
  3.1028    shows "P f"
  3.1029 -proof -
  3.1030 +proof%unimportant -
  3.1031    from \<open>integrable M f\<close> have f: "f \<in> borel_measurable M" "(\<integral>\<^sup>+x. norm (f x) \<partial>M) < \<infinity>"
  3.1032      unfolding integrable_iff_bounded by auto
  3.1033    from borel_measurable_implies_sequence_metric[OF f(1)]
  3.1034 @@ -1895,12 +1895,12 @@
  3.1035    qed fact
  3.1036  qed
  3.1037  
  3.1038 -lemma integral_eq_zero_AE:
  3.1039 +lemma%unimportant integral_eq_zero_AE:
  3.1040    "(AE x in M. f x = 0) \<Longrightarrow> integral\<^sup>L M f = 0"
  3.1041    using integral_cong_AE[of f M "\<lambda>_. 0"]
  3.1042    by (cases "integrable M f") (simp_all add: not_integrable_integral_eq)
  3.1043  
  3.1044 -lemma integral_nonneg_eq_0_iff_AE:
  3.1045 +lemma%unimportant integral_nonneg_eq_0_iff_AE:
  3.1046    fixes f :: "_ \<Rightarrow> real"
  3.1047    assumes f[measurable]: "integrable M f" and nonneg: "AE x in M. 0 \<le> f x"
  3.1048    shows "integral\<^sup>L M f = 0 \<longleftrightarrow> (AE x in M. f x = 0)"
  3.1049 @@ -1914,7 +1914,7 @@
  3.1050      by auto
  3.1051  qed (auto simp add: integral_eq_zero_AE)
  3.1052  
  3.1053 -lemma integral_mono_AE:
  3.1054 +lemma%unimportant integral_mono_AE:
  3.1055    fixes f :: "'a \<Rightarrow> real"
  3.1056    assumes "integrable M f" "integrable M g" "AE x in M. f x \<le> g x"
  3.1057    shows "integral\<^sup>L M f \<le> integral\<^sup>L M g"
  3.1058 @@ -1926,7 +1926,7 @@
  3.1059    finally show ?thesis by simp
  3.1060  qed
  3.1061  
  3.1062 -lemma integral_mono:
  3.1063 +lemma%unimportant integral_mono:
  3.1064    fixes f :: "'a \<Rightarrow> real"
  3.1065    shows "integrable M f \<Longrightarrow> integrable M g \<Longrightarrow> (\<And>x. x \<in> space M \<Longrightarrow> f x \<le> g x) \<Longrightarrow>
  3.1066      integral\<^sup>L M f \<le> integral\<^sup>L M g"
  3.1067 @@ -1936,11 +1936,11 @@
  3.1068  integrability assumption. The price to pay is that the upper function has to be nonnegative,
  3.1069  but this is often true and easy to check in computations.\<close>
  3.1070  
  3.1071 -lemma integral_mono_AE':
  3.1072 +lemma%important integral_mono_AE':
  3.1073    fixes f::"_ \<Rightarrow> real"
  3.1074    assumes "integrable M f" "AE x in M. g x \<le> f x" "AE x in M. 0 \<le> f x"
  3.1075    shows "(\<integral>x. g x \<partial>M) \<le> (\<integral>x. f x \<partial>M)"
  3.1076 -proof (cases "integrable M g")
  3.1077 +proof%unimportant (cases "integrable M g")
  3.1078    case True
  3.1079    show ?thesis by (rule integral_mono_AE, auto simp add: assms True)
  3.1080  next
  3.1081 @@ -1950,16 +1950,16 @@
  3.1082    finally show ?thesis by simp
  3.1083  qed
  3.1084  
  3.1085 -lemma integral_mono':
  3.1086 +lemma%important integral_mono':
  3.1087    fixes f::"_ \<Rightarrow> real"
  3.1088    assumes "integrable M f" "\<And>x. x \<in> space M \<Longrightarrow> g x \<le> f x" "\<And>x. x \<in> space M \<Longrightarrow> 0 \<le> f x"
  3.1089    shows "(\<integral>x. g x \<partial>M) \<le> (\<integral>x. f x \<partial>M)"
  3.1090  by (rule integral_mono_AE', insert assms, auto)
  3.1091  
  3.1092 -lemma (in finite_measure) integrable_measure:
  3.1093 +lemma%important (in finite_measure) integrable_measure:
  3.1094    assumes I: "disjoint_family_on X I" "countable I"
  3.1095    shows "integrable (count_space I) (\<lambda>i. measure M (X i))"
  3.1096 -proof -
  3.1097 +proof%unimportant -
  3.1098    have "(\<integral>\<^sup>+i. measure M (X i) \<partial>count_space I) = (\<integral>\<^sup>+i. measure M (if X i \<in> sets M then X i else {}) \<partial>count_space I)"
  3.1099      by (auto intro!: nn_integral_cong measure_notin_sets)
  3.1100    also have "\<dots> = measure M (\<Union>i\<in>I. if X i \<in> sets M then X i else {})"
  3.1101 @@ -1969,7 +1969,7 @@
  3.1102      by (auto intro!: integrableI_bounded)
  3.1103  qed
  3.1104  
  3.1105 -lemma integrableI_real_bounded:
  3.1106 +lemma%unimportant integrableI_real_bounded:
  3.1107    assumes f: "f \<in> borel_measurable M" and ae: "AE x in M. 0 \<le> f x" and fin: "integral\<^sup>N M f < \<infinity>"
  3.1108    shows "integrable M f"
  3.1109  proof (rule integrableI_bounded)
  3.1110 @@ -1979,13 +1979,13 @@
  3.1111    finally show "(\<integral>\<^sup>+ x. ennreal (norm (f x)) \<partial>M) < \<infinity>" .
  3.1112  qed fact
  3.1113  
  3.1114 -lemma nn_integral_nonneg_infinite:
  3.1115 +lemma%unimportant nn_integral_nonneg_infinite:
  3.1116    fixes f::"'a \<Rightarrow> real"
  3.1117    assumes "f \<in> borel_measurable M" "\<not> integrable M f" "AE x in M. f x \<ge> 0"
  3.1118    shows "(\<integral>\<^sup>+x. f x \<partial>M) = \<infinity>"
  3.1119  using assms integrableI_real_bounded less_top by auto
  3.1120  
  3.1121 -lemma integral_real_bounded:
  3.1122 +lemma%unimportant integral_real_bounded:
  3.1123    assumes "0 \<le> r" "integral\<^sup>N M f \<le> ennreal r"
  3.1124    shows "integral\<^sup>L M f \<le> r"
  3.1125  proof cases
  3.1126 @@ -2009,22 +2009,22 @@
  3.1127      using \<open>0 \<le> r\<close> by (simp add: not_integrable_integral_eq)
  3.1128  qed
  3.1129  
  3.1130 -lemma integrable_MIN:
  3.1131 +lemma%unimportant integrable_MIN:
  3.1132    fixes f:: "_ \<Rightarrow> _ \<Rightarrow> real"
  3.1133    shows "\<lbrakk> finite I;  I \<noteq> {}; \<And>i. i \<in> I \<Longrightarrow> integrable M (f i) \<rbrakk>
  3.1134     \<Longrightarrow> integrable M (\<lambda>x. MIN i\<in>I. f i x)"
  3.1135  by (induct rule: finite_ne_induct) simp+
  3.1136  
  3.1137 -lemma integrable_MAX:
  3.1138 +lemma%unimportant integrable_MAX:
  3.1139    fixes f:: "_ \<Rightarrow> _ \<Rightarrow> real"
  3.1140    shows "\<lbrakk> finite I;  I \<noteq> {};  \<And>i. i \<in> I \<Longrightarrow> integrable M (f i) \<rbrakk>
  3.1141    \<Longrightarrow> integrable M (\<lambda>x. MAX i\<in>I. f i x)"
  3.1142  by (induct rule: finite_ne_induct) simp+
  3.1143  
  3.1144 -lemma integral_Markov_inequality:
  3.1145 +lemma%important integral_Markov_inequality:
  3.1146    assumes [measurable]: "integrable M u" and "AE x in M. 0 \<le> u x" "0 < (c::real)"
  3.1147    shows "(emeasure M) {x\<in>space M. u x \<ge> c} \<le> (1/c) * (\<integral>x. u x \<partial>M)"
  3.1148 -proof -
  3.1149 +proof%unimportant -
  3.1150    have "(\<integral>\<^sup>+ x. ennreal(u x) * indicator (space M) x \<partial>M) \<le> (\<integral>\<^sup>+ x. u x \<partial>M)"
  3.1151      by (rule nn_integral_mono_AE, auto simp add: \<open>c>0\<close> less_eq_real_def)
  3.1152    also have "... = (\<integral>x. u x \<partial>M)"
  3.1153 @@ -2044,7 +2044,7 @@
  3.1154      using \<open>0<c\<close> by (simp add: ennreal_mult'[symmetric])
  3.1155  qed
  3.1156  
  3.1157 -lemma integral_ineq_eq_0_then_AE:
  3.1158 +lemma%unimportant integral_ineq_eq_0_then_AE:
  3.1159    fixes f::"_ \<Rightarrow> real"
  3.1160    assumes "AE x in M. f x \<le> g x" "integrable M f" "integrable M g"
  3.1161            "(\<integral>x. f x \<partial>M) = (\<integral>x. g x \<partial>M)"
  3.1162 @@ -2057,7 +2057,7 @@
  3.1163    then show ?thesis unfolding h_def by auto
  3.1164  qed
  3.1165  
  3.1166 -lemma not_AE_zero_int_E:
  3.1167 +lemma%unimportant not_AE_zero_int_E:
  3.1168    fixes f::"'a \<Rightarrow> real"
  3.1169    assumes "AE x in M. f x \<ge> 0" "(\<integral>x. f x \<partial>M) > 0"
  3.1170        and [measurable]: "f \<in> borel_measurable M"
  3.1171 @@ -2069,12 +2069,12 @@
  3.1172    then show False using assms(2) by simp
  3.1173  qed
  3.1174  
  3.1175 -lemma tendsto_L1_int:
  3.1176 +lemma%important tendsto_L1_int:
  3.1177    fixes u :: "_ \<Rightarrow> _ \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1178    assumes [measurable]: "\<And>n. integrable M (u n)" "integrable M f"
  3.1179            and "((\<lambda>n. (\<integral>\<^sup>+x. norm(u n x - f x) \<partial>M)) \<longlongrightarrow> 0) F"
  3.1180    shows "((\<lambda>n. (\<integral>x. u n x \<partial>M)) \<longlongrightarrow> (\<integral>x. f x \<partial>M)) F"
  3.1181 -proof -
  3.1182 +proof%unimportant -
  3.1183    have "((\<lambda>n. norm((\<integral>x. u n x \<partial>M) - (\<integral>x. f x \<partial>M))) \<longlongrightarrow> (0::ennreal)) F"
  3.1184    proof (rule tendsto_sandwich[of "\<lambda>_. 0", where ?h = "\<lambda>n. (\<integral>\<^sup>+x. norm(u n x - f x) \<partial>M)"], auto simp add: assms)
  3.1185      {
  3.1186 @@ -2103,12 +2103,12 @@
  3.1187  text \<open>The next lemma asserts that, if a sequence of functions converges in $L^1$, then
  3.1188  it admits a subsequence that converges almost everywhere.\<close>
  3.1189  
  3.1190 -lemma tendsto_L1_AE_subseq:
  3.1191 +lemma%important tendsto_L1_AE_subseq:
  3.1192    fixes u :: "nat \<Rightarrow> 'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1193    assumes [measurable]: "\<And>n. integrable M (u n)"
  3.1194        and "(\<lambda>n. (\<integral>x. norm(u n x) \<partial>M)) \<longlonglongrightarrow> 0"
  3.1195    shows "\<exists>r::nat\<Rightarrow>nat. strict_mono r \<and> (AE x in M. (\<lambda>n. u (r n) x) \<longlonglongrightarrow> 0)"
  3.1196 -proof -
  3.1197 +proof%unimportant -
  3.1198    {
  3.1199      fix k
  3.1200      have "eventually (\<lambda>n. (\<integral>x. norm(u n x) \<partial>M) < (1/2)^k) sequentially"
  3.1201 @@ -2201,9 +2201,9 @@
  3.1202    then show ?thesis using \<open>strict_mono r\<close> by auto
  3.1203  qed
  3.1204  
  3.1205 -subsection \<open>Restricted measure spaces\<close>
  3.1206 -
  3.1207 -lemma integrable_restrict_space:
  3.1208 +subsection%important \<open>Restricted measure spaces\<close>
  3.1209 +
  3.1210 +lemma%unimportant integrable_restrict_space:
  3.1211    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1212    assumes \<Omega>[simp]: "\<Omega> \<inter> space M \<in> sets M"
  3.1213    shows "integrable (restrict_space M \<Omega>) f \<longleftrightarrow> integrable M (\<lambda>x. indicator \<Omega> x *\<^sub>R f x)"
  3.1214 @@ -2212,11 +2212,11 @@
  3.1215      nn_integral_restrict_space[OF \<Omega>]
  3.1216    by (simp add: ac_simps ennreal_indicator ennreal_mult)
  3.1217  
  3.1218 -lemma integral_restrict_space:
  3.1219 +lemma%important integral_restrict_space:
  3.1220    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1221    assumes \<Omega>[simp]: "\<Omega> \<inter> space M \<in> sets M"
  3.1222    shows "integral\<^sup>L (restrict_space M \<Omega>) f = integral\<^sup>L M (\<lambda>x. indicator \<Omega> x *\<^sub>R f x)"
  3.1223 -proof (rule integral_eq_cases)
  3.1224 +proof%unimportant (rule integral_eq_cases)
  3.1225    assume "integrable (restrict_space M \<Omega>) f"
  3.1226    then show ?thesis
  3.1227    proof induct
  3.1228 @@ -2243,7 +2243,7 @@
  3.1229    qed
  3.1230  qed (simp add: integrable_restrict_space)
  3.1231  
  3.1232 -lemma integral_empty:
  3.1233 +lemma%unimportant integral_empty:
  3.1234    assumes "space M = {}"
  3.1235    shows "integral\<^sup>L M f = 0"
  3.1236  proof -
  3.1237 @@ -2252,9 +2252,9 @@
  3.1238    thus ?thesis by simp
  3.1239  qed
  3.1240  
  3.1241 -subsection \<open>Measure spaces with an associated density\<close>
  3.1242 -
  3.1243 -lemma integrable_density:
  3.1244 +subsection%important \<open>Measure spaces with an associated density\<close>
  3.1245 +
  3.1246 +lemma%unimportant integrable_density:
  3.1247    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}" and g :: "'a \<Rightarrow> real"
  3.1248    assumes [measurable]: "f \<in> borel_measurable M" "g \<in> borel_measurable M"
  3.1249      and nn: "AE x in M. 0 \<le> g x"
  3.1250 @@ -2265,12 +2265,12 @@
  3.1251    apply (auto simp: ennreal_mult)
  3.1252    done
  3.1253  
  3.1254 -lemma integral_density:
  3.1255 +lemma%important integral_density:
  3.1256    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}" and g :: "'a \<Rightarrow> real"
  3.1257    assumes f: "f \<in> borel_measurable M"
  3.1258      and g[measurable]: "g \<in> borel_measurable M" "AE x in M. 0 \<le> g x"
  3.1259    shows "integral\<^sup>L (density M g) f = integral\<^sup>L M (\<lambda>x. g x *\<^sub>R f x)"
  3.1260 -proof (rule integral_eq_cases)
  3.1261 +proof%unimportant (rule integral_eq_cases)
  3.1262    assume "integrable (density M g) f"
  3.1263    then show ?thesis
  3.1264    proof induct
  3.1265 @@ -2325,38 +2325,38 @@
  3.1266    qed
  3.1267  qed (simp add: f g integrable_density)
  3.1268  
  3.1269 -lemma
  3.1270 +lemma%unimportant (*FIX ME needs name *)
  3.1271    fixes g :: "'a \<Rightarrow> real"
  3.1272    assumes "f \<in> borel_measurable M" "AE x in M. 0 \<le> f x" "g \<in> borel_measurable M"
  3.1273    shows integral_real_density: "integral\<^sup>L (density M f) g = (\<integral> x. f x * g x \<partial>M)"
  3.1274      and integrable_real_density: "integrable (density M f) g \<longleftrightarrow> integrable M (\<lambda>x. f x * g x)"
  3.1275    using assms integral_density[of g M f] integrable_density[of g M f] by auto
  3.1276  
  3.1277 -lemma has_bochner_integral_density:
  3.1278 +lemma%important has_bochner_integral_density:
  3.1279    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}" and g :: "'a \<Rightarrow> real"
  3.1280    shows "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> (AE x in M. 0 \<le> g x) \<Longrightarrow>
  3.1281      has_bochner_integral M (\<lambda>x. g x *\<^sub>R f x) x \<Longrightarrow> has_bochner_integral (density M g) f x"
  3.1282    by (simp add: has_bochner_integral_iff integrable_density integral_density)
  3.1283  
  3.1284 -subsection \<open>Distributions\<close>
  3.1285 -
  3.1286 -lemma integrable_distr_eq:
  3.1287 +subsection%important \<open>Distributions\<close>
  3.1288 +
  3.1289 +lemma%unimportant integrable_distr_eq:
  3.1290    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1291    assumes [measurable]: "g \<in> measurable M N" "f \<in> borel_measurable N"
  3.1292    shows "integrable (distr M N g) f \<longleftrightarrow> integrable M (\<lambda>x. f (g x))"
  3.1293    unfolding integrable_iff_bounded by (simp_all add: nn_integral_distr)
  3.1294  
  3.1295 -lemma integrable_distr:
  3.1296 +lemma%unimportant integrable_distr:
  3.1297    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1298    shows "T \<in> measurable M M' \<Longrightarrow> integrable (distr M M' T) f \<Longrightarrow> integrable M (\<lambda>x. f (T x))"
  3.1299    by (subst integrable_distr_eq[symmetric, where g=T])
  3.1300       (auto dest: borel_measurable_integrable)
  3.1301  
  3.1302 -lemma integral_distr:
  3.1303 +lemma%important integral_distr:
  3.1304    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1305    assumes g[measurable]: "g \<in> measurable M N" and f: "f \<in> borel_measurable N"
  3.1306    shows "integral\<^sup>L (distr M N g) f = integral\<^sup>L M (\<lambda>x. f (g x))"
  3.1307 -proof (rule integral_eq_cases)
  3.1308 +proof%unimportant (rule integral_eq_cases)
  3.1309    assume "integrable (distr M N g) f"
  3.1310    then show ?thesis
  3.1311    proof induct
  3.1312 @@ -2404,27 +2404,27 @@
  3.1313    qed
  3.1314  qed (simp add: f g integrable_distr_eq)
  3.1315  
  3.1316 -lemma has_bochner_integral_distr:
  3.1317 +lemma%important has_bochner_integral_distr:
  3.1318    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1319    shows "f \<in> borel_measurable N \<Longrightarrow> g \<in> measurable M N \<Longrightarrow>
  3.1320      has_bochner_integral M (\<lambda>x. f (g x)) x \<Longrightarrow> has_bochner_integral (distr M N g) f x"
  3.1321 -  by (simp add: has_bochner_integral_iff integrable_distr_eq integral_distr)
  3.1322 -
  3.1323 -subsection \<open>Lebesgue integration on @{const count_space}\<close>
  3.1324 -
  3.1325 -lemma integrable_count_space:
  3.1326 +  by%unimportant (simp add: has_bochner_integral_iff integrable_distr_eq integral_distr)
  3.1327 +
  3.1328 +subsection%important \<open>Lebesgue integration on @{const count_space}\<close>
  3.1329 +
  3.1330 +lemma%unimportant integrable_count_space:
  3.1331    fixes f :: "'a \<Rightarrow> 'b::{banach,second_countable_topology}"
  3.1332    shows "finite X \<Longrightarrow> integrable (count_space X) f"
  3.1333    by (auto simp: nn_integral_count_space integrable_iff_bounded)
  3.1334  
  3.1335 -lemma measure_count_space[simp]:
  3.1336 +lemma%unimportant measure_count_space[simp]:
  3.1337    "B \<subseteq> A \<Longrightarrow> finite B \<Longrightarrow> measure (count_space A) B = card B"
  3.1338    unfolding measure_def by (subst emeasure_count_space ) auto
  3.1339  
  3.1340 -lemma lebesgue_integral_count_space_finite_support:
  3.1341 +lemma%important lebesgue_integral_count_space_finite_support:
  3.1342    assumes f: "finite {a\<in>A. f a \<noteq> 0}"
  3.1343    shows "(\<integral>x. f x \<partial>count_space A) = (\<Sum>a | a \<in> A \<and> f a \<noteq> 0. f a)"
  3.1344 -proof -
  3.1345 +proof%unimportant -
  3.1346    have eq: "\<And>x. x \<in> A \<Longrightarrow> (\<Sum>a | x = a \<and> a \<in> A \<and> f a \<noteq> 0. f a) = (\<Sum>x\<in>{x}. f x)"
  3.1347      by (intro sum.mono_neutral_cong_left) auto
  3.1348  
  3.1349 @@ -2436,17 +2436,17 @@
  3.1350      by auto
  3.1351  qed
  3.1352  
  3.1353 -lemma lebesgue_integral_count_space_finite: "finite A \<Longrightarrow> (\<integral>x. f x \<partial>count_space A) = (\<Sum>a\<in>A. f a)"
  3.1354 +lemma%unimportant lebesgue_integral_count_space_finite: "finite A \<Longrightarrow> (\<integral>x. f x \<partial>count_space A) = (\<Sum>a\<in>A. f a)"
  3.1355    by (subst lebesgue_integral_count_space_finite_support)
  3.1356       (auto intro!: sum.mono_neutral_cong_left)
  3.1357  
  3.1358 -lemma integrable_count_space_nat_iff:
  3.1359 +lemma%unimportant integrable_count_space_nat_iff:
  3.1360    fixes f :: "nat \<Rightarrow> _::{banach,second_countable_topology}"
  3.1361    shows "integrable (count_space UNIV) f \<longleftrightarrow> summable (\<lambda>x. norm (f x))"
  3.1362    by (auto simp add: integrable_iff_bounded nn_integral_count_space_nat ennreal_suminf_neq_top
  3.1363             intro:  summable_suminf_not_top)
  3.1364  
  3.1365 -lemma sums_integral_count_space_nat:
  3.1366 +lemma%unimportant sums_integral_count_space_nat:
  3.1367    fixes f :: "nat \<Rightarrow> _::{banach,second_countable_topology}"
  3.1368    assumes *: "integrable (count_space UNIV) f"
  3.1369    shows "f sums (integral\<^sup>L (count_space UNIV) f)"
  3.1370 @@ -2471,18 +2471,18 @@
  3.1371    finally show ?thesis .
  3.1372  qed
  3.1373  
  3.1374 -lemma integral_count_space_nat:
  3.1375 +lemma%unimportant integral_count_space_nat:
  3.1376    fixes f :: "nat \<Rightarrow> _::{banach,second_countable_topology}"
  3.1377    shows "integrable (count_space UNIV) f \<Longrightarrow> integral\<^sup>L (count_space UNIV) f = (\<Sum>x. f x)"
  3.1378    using sums_integral_count_space_nat by (rule sums_unique)
  3.1379  
  3.1380 -lemma integrable_bij_count_space:
  3.1381 +lemma%unimportant integrable_bij_count_space:
  3.1382    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1383    assumes g: "bij_betw g A B"
  3.1384    shows "integrable (count_space A) (\<lambda>x. f (g x)) \<longleftrightarrow> integrable (count_space B) f"
  3.1385    unfolding integrable_iff_bounded by (subst nn_integral_bij_count_space[OF g]) auto
  3.1386  
  3.1387 -lemma integral_bij_count_space:
  3.1388 +lemma%important integral_bij_count_space:
  3.1389    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1390    assumes g: "bij_betw g A B"
  3.1391    shows "integral\<^sup>L (count_space A) (\<lambda>x. f (g x)) = integral\<^sup>L (count_space B) f"
  3.1392 @@ -2492,49 +2492,49 @@
  3.1393    apply auto
  3.1394    done
  3.1395  
  3.1396 -lemma has_bochner_integral_count_space_nat:
  3.1397 +lemma%important has_bochner_integral_count_space_nat:
  3.1398    fixes f :: "nat \<Rightarrow> _::{banach,second_countable_topology}"
  3.1399    shows "has_bochner_integral (count_space UNIV) f x \<Longrightarrow> f sums x"
  3.1400    unfolding has_bochner_integral_iff by (auto intro!: sums_integral_count_space_nat)
  3.1401  
  3.1402 -subsection \<open>Point measure\<close>
  3.1403 -
  3.1404 -lemma lebesgue_integral_point_measure_finite:
  3.1405 +subsection%important \<open>Point measure\<close>
  3.1406 +
  3.1407 +lemma%unimportant lebesgue_integral_point_measure_finite:
  3.1408    fixes g :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1409    shows "finite A \<Longrightarrow> (\<And>a. a \<in> A \<Longrightarrow> 0 \<le> f a) \<Longrightarrow>
  3.1410      integral\<^sup>L (point_measure A f) g = (\<Sum>a\<in>A. f a *\<^sub>R g a)"
  3.1411    by (simp add: lebesgue_integral_count_space_finite AE_count_space integral_density point_measure_def)
  3.1412  
  3.1413 -lemma integrable_point_measure_finite:
  3.1414 +lemma%important integrable_point_measure_finite:
  3.1415    fixes g :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}" and f :: "'a \<Rightarrow> real"
  3.1416    shows "finite A \<Longrightarrow> integrable (point_measure A f) g"
  3.1417 -  unfolding point_measure_def
  3.1418 +  unfolding%unimportant point_measure_def
  3.1419    apply (subst density_cong[where f'="\<lambda>x. ennreal (max 0 (f x))"])
  3.1420    apply (auto split: split_max simp: ennreal_neg)
  3.1421    apply (subst integrable_density)
  3.1422    apply (auto simp: AE_count_space integrable_count_space)
  3.1423    done
  3.1424  
  3.1425 -subsection \<open>Lebesgue integration on @{const null_measure}\<close>
  3.1426 -
  3.1427 -lemma has_bochner_integral_null_measure_iff[iff]:
  3.1428 +subsection%important \<open>Lebesgue integration on @{const null_measure}\<close>
  3.1429 +
  3.1430 +lemma%unimportant has_bochner_integral_null_measure_iff[iff]:
  3.1431    "has_bochner_integral (null_measure M) f 0 \<longleftrightarrow> f \<in> borel_measurable M"
  3.1432    by (auto simp add: has_bochner_integral.simps simple_bochner_integral_def[abs_def]
  3.1433             intro!: exI[of _ "\<lambda>n x. 0"] simple_bochner_integrable.intros)
  3.1434  
  3.1435 -lemma integrable_null_measure_iff[iff]: "integrable (null_measure M) f \<longleftrightarrow> f \<in> borel_measurable M"
  3.1436 -  by (auto simp add: integrable.simps)
  3.1437 -
  3.1438 -lemma integral_null_measure[simp]: "integral\<^sup>L (null_measure M) f = 0"
  3.1439 +lemma%important integrable_null_measure_iff[iff]: "integrable (null_measure M) f \<longleftrightarrow> f \<in> borel_measurable M"
  3.1440 +  by%unimportant (auto simp add: integrable.simps)
  3.1441 +
  3.1442 +lemma%unimportant integral_null_measure[simp]: "integral\<^sup>L (null_measure M) f = 0"
  3.1443    by (cases "integrable (null_measure M) f")
  3.1444       (auto simp add: not_integrable_integral_eq has_bochner_integral_integral_eq)
  3.1445  
  3.1446 -subsection \<open>Legacy lemmas for the real-valued Lebesgue integral\<close>
  3.1447 -
  3.1448 -lemma real_lebesgue_integral_def:
  3.1449 +subsection%important \<open>Legacy lemmas for the real-valued Lebesgue integral\<close>
  3.1450 +
  3.1451 +lemma%important real_lebesgue_integral_def:
  3.1452    assumes f[measurable]: "integrable M f"
  3.1453    shows "integral\<^sup>L M f = enn2real (\<integral>\<^sup>+x. f x \<partial>M) - enn2real (\<integral>\<^sup>+x. ennreal (- f x) \<partial>M)"
  3.1454 -proof -
  3.1455 +proof%unimportant -
  3.1456    have "integral\<^sup>L M f = integral\<^sup>L M (\<lambda>x. max 0 (f x) - max 0 (- f x))"
  3.1457      by (auto intro!: arg_cong[where f="integral\<^sup>L M"])
  3.1458    also have "\<dots> = integral\<^sup>L M (\<lambda>x. max 0 (f x)) - integral\<^sup>L M (\<lambda>x. max 0 (- f x))"
  3.1459 @@ -2546,11 +2546,11 @@
  3.1460    finally show ?thesis .
  3.1461  qed
  3.1462  
  3.1463 -lemma real_integrable_def:
  3.1464 +lemma%important real_integrable_def:
  3.1465    "integrable M f \<longleftrightarrow> f \<in> borel_measurable M \<and>
  3.1466      (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M) \<noteq> \<infinity> \<and> (\<integral>\<^sup>+ x. ennreal (- f x) \<partial>M) \<noteq> \<infinity>"
  3.1467    unfolding integrable_iff_bounded
  3.1468 -proof (safe del: notI)
  3.1469 +proof%unimportant (safe del: notI)
  3.1470    assume *: "(\<integral>\<^sup>+ x. ennreal (norm (f x)) \<partial>M) < \<infinity>"
  3.1471    have "(\<integral>\<^sup>+ x. ennreal (f x) \<partial>M) \<le> (\<integral>\<^sup>+ x. ennreal (norm (f x)) \<partial>M)"
  3.1472      by (intro nn_integral_mono) auto
  3.1473 @@ -2574,12 +2574,12 @@
  3.1474    finally show "(\<integral>\<^sup>+ x. norm (f x) \<partial>M) < \<infinity>" .
  3.1475  qed
  3.1476  
  3.1477 -lemma integrableD[dest]:
  3.1478 +lemma%unimportant integrableD[dest]:
  3.1479    assumes "integrable M f"
  3.1480    shows "f \<in> borel_measurable M" "(\<integral>\<^sup>+ x. ennreal (f x) \<partial>M) \<noteq> \<infinity>" "(\<integral>\<^sup>+ x. ennreal (- f x) \<partial>M) \<noteq> \<infinity>"
  3.1481    using assms unfolding real_integrable_def by auto
  3.1482  
  3.1483 -lemma integrableE:
  3.1484 +lemma%unimportant integrableE:
  3.1485    assumes "integrable M f"
  3.1486    obtains r q where "0 \<le> r" "0 \<le> q"
  3.1487      "(\<integral>\<^sup>+x. ennreal (f x)\<partial>M) = ennreal r"
  3.1488 @@ -2588,7 +2588,7 @@
  3.1489    using assms unfolding real_integrable_def real_lebesgue_integral_def[OF assms]
  3.1490    by (cases rule: ennreal2_cases[of "(\<integral>\<^sup>+x. ennreal (-f x)\<partial>M)" "(\<integral>\<^sup>+x. ennreal (f x)\<partial>M)"]) auto
  3.1491  
  3.1492 -lemma integral_monotone_convergence_nonneg:
  3.1493 +lemma%important integral_monotone_convergence_nonneg:
  3.1494    fixes f :: "nat \<Rightarrow> 'a \<Rightarrow> real"
  3.1495    assumes i: "\<And>i. integrable M (f i)" and mono: "AE x in M. mono (\<lambda>n. f n x)"
  3.1496      and pos: "\<And>i. AE x in M. 0 \<le> f i x"
  3.1497 @@ -2597,7 +2597,7 @@
  3.1498      and u: "u \<in> borel_measurable M"
  3.1499    shows "integrable M u"
  3.1500    and "integral\<^sup>L M u = x"
  3.1501 -proof -
  3.1502 +proof%unimportant -
  3.1503    have nn: "AE x in M. \<forall>i. 0 \<le> f i x"
  3.1504      using pos unfolding AE_all_countable by auto
  3.1505    with lim have u_nn: "AE x in M. 0 \<le> u x"
  3.1506 @@ -2629,7 +2629,7 @@
  3.1507      by (auto simp: real_integrable_def real_lebesgue_integral_def u)
  3.1508  qed
  3.1509  
  3.1510 -lemma
  3.1511 +lemma%unimportant (*FIX ME needs name *)
  3.1512    fixes f :: "nat \<Rightarrow> 'a \<Rightarrow> real"
  3.1513    assumes f: "\<And>i. integrable M (f i)" and mono: "AE x in M. mono (\<lambda>n. f n x)"
  3.1514    and lim: "AE x in M. (\<lambda>i. f i x) \<longlonglongrightarrow> u x"
  3.1515 @@ -2660,7 +2660,7 @@
  3.1516      by (metis has_bochner_integral_integrable)
  3.1517  qed
  3.1518  
  3.1519 -lemma integral_norm_eq_0_iff:
  3.1520 +lemma%unimportant integral_norm_eq_0_iff:
  3.1521    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1522    assumes f[measurable]: "integrable M f"
  3.1523    shows "(\<integral>x. norm (f x) \<partial>M) = 0 \<longleftrightarrow> emeasure M {x\<in>space M. f x \<noteq> 0} = 0"
  3.1524 @@ -2675,18 +2675,18 @@
  3.1525      by simp
  3.1526  qed
  3.1527  
  3.1528 -lemma integral_0_iff:
  3.1529 +lemma%unimportant integral_0_iff:
  3.1530    fixes f :: "'a \<Rightarrow> real"
  3.1531    shows "integrable M f \<Longrightarrow> (\<integral>x. \<bar>f x\<bar> \<partial>M) = 0 \<longleftrightarrow> emeasure M {x\<in>space M. f x \<noteq> 0} = 0"
  3.1532    using integral_norm_eq_0_iff[of M f] by simp
  3.1533  
  3.1534 -lemma (in finite_measure) integrable_const[intro!, simp]: "integrable M (\<lambda>x. a)"
  3.1535 +lemma%unimportant (in finite_measure) integrable_const[intro!, simp]: "integrable M (\<lambda>x. a)"
  3.1536    using integrable_indicator[of "space M" M a] by (simp cong: integrable_cong add: less_top[symmetric])
  3.1537  
  3.1538 -lemma lebesgue_integral_const[simp]:
  3.1539 +lemma%important lebesgue_integral_const[simp]:
  3.1540    fixes a :: "'a :: {banach, second_countable_topology}"
  3.1541    shows "(\<integral>x. a \<partial>M) = measure M (space M) *\<^sub>R a"
  3.1542 -proof -
  3.1543 +proof%unimportant -
  3.1544    { assume "emeasure M (space M) = \<infinity>" "a \<noteq> 0"
  3.1545      then have ?thesis
  3.1546        by (auto simp add: not_integrable_integral_eq ennreal_mult_less_top measure_def integrable_iff_bounded) }
  3.1547 @@ -2704,7 +2704,7 @@
  3.1548    ultimately show ?thesis by blast
  3.1549  qed
  3.1550  
  3.1551 -lemma (in finite_measure) integrable_const_bound:
  3.1552 +lemma%unimportant (in finite_measure) integrable_const_bound:
  3.1553    fixes f :: "'a \<Rightarrow> 'b::{banach,second_countable_topology}"
  3.1554    shows "AE x in M. norm (f x) \<le> B \<Longrightarrow> f \<in> borel_measurable M \<Longrightarrow> integrable M f"
  3.1555    apply (rule integrable_bound[OF integrable_const[of B], of f])
  3.1556 @@ -2713,19 +2713,19 @@
  3.1557    apply auto
  3.1558    done
  3.1559  
  3.1560 -lemma (in finite_measure) integral_bounded_eq_bound_then_AE:
  3.1561 +lemma%unimportant (in finite_measure) integral_bounded_eq_bound_then_AE:
  3.1562    assumes "AE x in M. f x \<le> (c::real)"
  3.1563      "integrable M f" "(\<integral>x. f x \<partial>M) = c * measure M (space M)"
  3.1564    shows "AE x in M. f x = c"
  3.1565    apply (rule integral_ineq_eq_0_then_AE) using assms by auto
  3.1566  
  3.1567 -lemma integral_indicator_finite_real:
  3.1568 +lemma%important integral_indicator_finite_real:
  3.1569    fixes f :: "'a \<Rightarrow> real"
  3.1570    assumes [simp]: "finite A"
  3.1571    assumes [measurable]: "\<And>a. a \<in> A \<Longrightarrow> {a} \<in> sets M"
  3.1572    assumes finite: "\<And>a. a \<in> A \<Longrightarrow> emeasure M {a} < \<infinity>"
  3.1573    shows "(\<integral>x. f x * indicator A x \<partial>M) = (\<Sum>a\<in>A. f a * measure M {a})"
  3.1574 -proof -
  3.1575 +proof%unimportant -
  3.1576    have "(\<integral>x. f x * indicator A x \<partial>M) = (\<integral>x. (\<Sum>a\<in>A. f a * indicator {a} x) \<partial>M)"
  3.1577    proof (intro integral_cong refl)
  3.1578      fix x show "f x * indicator A x = (\<Sum>a\<in>A. f a * indicator {a} x)"
  3.1579 @@ -2736,7 +2736,7 @@
  3.1580    finally show ?thesis .
  3.1581  qed
  3.1582  
  3.1583 -lemma (in finite_measure) ennreal_integral_real:
  3.1584 +lemma%unimportant (in finite_measure) ennreal_integral_real:
  3.1585    assumes [measurable]: "f \<in> borel_measurable M"
  3.1586    assumes ae: "AE x in M. f x \<le> ennreal B" "0 \<le> B"
  3.1587    shows "ennreal (\<integral>x. enn2real (f x) \<partial>M) = (\<integral>\<^sup>+x. f x \<partial>M)"
  3.1588 @@ -2747,7 +2747,7 @@
  3.1589      using ae by (intro nn_integral_cong_AE) (auto simp: le_less_trans[OF _ ennreal_less_top])
  3.1590  qed auto
  3.1591  
  3.1592 -lemma (in finite_measure) integral_less_AE:
  3.1593 +lemma%unimportant (in finite_measure) integral_less_AE:
  3.1594    fixes X Y :: "'a \<Rightarrow> real"
  3.1595    assumes int: "integrable M X" "integrable M Y"
  3.1596    assumes A: "(emeasure M) A \<noteq> 0" "A \<in> sets M" "AE x in M. x \<in> A \<longrightarrow> X x \<noteq> Y x"
  3.1597 @@ -2778,14 +2778,14 @@
  3.1598    ultimately show ?thesis by auto
  3.1599  qed
  3.1600  
  3.1601 -lemma (in finite_measure) integral_less_AE_space:
  3.1602 +lemma%unimportant (in finite_measure) integral_less_AE_space:
  3.1603    fixes X Y :: "'a \<Rightarrow> real"
  3.1604    assumes int: "integrable M X" "integrable M Y"
  3.1605    assumes gt: "AE x in M. X x < Y x" "emeasure M (space M) \<noteq> 0"
  3.1606    shows "integral\<^sup>L M X < integral\<^sup>L M Y"
  3.1607    using gt by (intro integral_less_AE[OF int, where A="space M"]) auto
  3.1608  
  3.1609 -lemma tendsto_integral_at_top:
  3.1610 +lemma%unimportant tendsto_integral_at_top:
  3.1611    fixes f :: "real \<Rightarrow> 'a::{banach, second_countable_topology}"
  3.1612    assumes [measurable_cong]: "sets M = sets borel" and f[measurable]: "integrable M f"
  3.1613    shows "((\<lambda>y. \<integral> x. indicator {.. y} x *\<^sub>R f x \<partial>M) \<longlongrightarrow> \<integral> x. f x \<partial>M) at_top"
  3.1614 @@ -2809,7 +2809,7 @@
  3.1615    qed auto
  3.1616  qed
  3.1617  
  3.1618 -lemma
  3.1619 +lemma%unimportant (*FIX ME needs name *)
  3.1620    fixes f :: "real \<Rightarrow> real"
  3.1621    assumes M: "sets M = sets borel"
  3.1622    assumes nonneg: "AE x in M. 0 \<le> f x"
  3.1623 @@ -2840,32 +2840,32 @@
  3.1624      by (auto simp: _has_bochner_integral_iff)
  3.1625  qed
  3.1626  
  3.1627 -subsection \<open>Product measure\<close>
  3.1628 -
  3.1629 -lemma (in sigma_finite_measure) borel_measurable_lebesgue_integrable[measurable (raw)]:
  3.1630 +subsection%important \<open>Product measure\<close>
  3.1631 +
  3.1632 +lemma%important (in sigma_finite_measure) borel_measurable_lebesgue_integrable[measurable (raw)]:
  3.1633    fixes f :: "_ \<Rightarrow> _ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1634    assumes [measurable]: "case_prod f \<in> borel_measurable (N \<Otimes>\<^sub>M M)"
  3.1635    shows "Measurable.pred N (\<lambda>x. integrable M (f x))"
  3.1636 -proof -
  3.1637 +proof%unimportant -
  3.1638    have [simp]: "\<And>x. x \<in> space N \<Longrightarrow> integrable M (f x) \<longleftrightarrow> (\<integral>\<^sup>+y. norm (f x y) \<partial>M) < \<infinity>"
  3.1639      unfolding integrable_iff_bounded by simp
  3.1640    show ?thesis
  3.1641      by (simp cong: measurable_cong)
  3.1642  qed
  3.1643  
  3.1644 -lemma Collect_subset [simp]: "{x\<in>A. P x} \<subseteq> A" by auto
  3.1645 -
  3.1646 -lemma (in sigma_finite_measure) measurable_measure[measurable (raw)]:
  3.1647 +lemma%unimportant Collect_subset [simp]: "{x\<in>A. P x} \<subseteq> A" by auto
  3.1648 +
  3.1649 +lemma%unimportant (in sigma_finite_measure) measurable_measure[measurable (raw)]:
  3.1650    "(\<And>x. x \<in> space N \<Longrightarrow> A x \<subseteq> space M) \<Longrightarrow>
  3.1651      {x \<in> space (N \<Otimes>\<^sub>M M). snd x \<in> A (fst x)} \<in> sets (N \<Otimes>\<^sub>M M) \<Longrightarrow>
  3.1652      (\<lambda>x. measure M (A x)) \<in> borel_measurable N"
  3.1653    unfolding measure_def by (intro measurable_emeasure borel_measurable_enn2real) auto
  3.1654  
  3.1655 -lemma (in sigma_finite_measure) borel_measurable_lebesgue_integral[measurable (raw)]:
  3.1656 +lemma%important (in sigma_finite_measure) borel_measurable_lebesgue_integral[measurable (raw)]:
  3.1657    fixes f :: "_ \<Rightarrow> _ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1658    assumes f[measurable]: "case_prod f \<in> borel_measurable (N \<Otimes>\<^sub>M M)"
  3.1659    shows "(\<lambda>x. \<integral>y. f x y \<partial>M) \<in> borel_measurable N"
  3.1660 -proof -
  3.1661 +proof%unimportant -
  3.1662    from borel_measurable_implies_sequence_metric[OF f, of 0] guess s ..
  3.1663    then have s: "\<And>i. simple_function (N \<Otimes>\<^sub>M M) (s i)"
  3.1664      "\<And>x y. x \<in> space N \<Longrightarrow> y \<in> space M \<Longrightarrow> (\<lambda>i. s i (x, y)) \<longlonglongrightarrow> f x y"
  3.1665 @@ -2936,7 +2936,7 @@
  3.1666    qed
  3.1667  qed
  3.1668  
  3.1669 -lemma (in pair_sigma_finite) integrable_product_swap:
  3.1670 +lemma%unimportant (in pair_sigma_finite) integrable_product_swap:
  3.1671    fixes f :: "_ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1672    assumes "integrable (M1 \<Otimes>\<^sub>M M2) f"
  3.1673    shows "integrable (M2 \<Otimes>\<^sub>M M1) (\<lambda>(x,y). f (y,x))"
  3.1674 @@ -2948,7 +2948,7 @@
  3.1675         (simp add: distr_pair_swap[symmetric] assms)
  3.1676  qed
  3.1677  
  3.1678 -lemma (in pair_sigma_finite) integrable_product_swap_iff:
  3.1679 +lemma%unimportant (in pair_sigma_finite) integrable_product_swap_iff:
  3.1680    fixes f :: "_ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1681    shows "integrable (M2 \<Otimes>\<^sub>M M1) (\<lambda>(x,y). f (y,x)) \<longleftrightarrow> integrable (M1 \<Otimes>\<^sub>M M2) f"
  3.1682  proof -
  3.1683 @@ -2957,7 +2957,7 @@
  3.1684    show ?thesis by auto
  3.1685  qed
  3.1686  
  3.1687 -lemma (in pair_sigma_finite) integral_product_swap:
  3.1688 +lemma%unimportant (in pair_sigma_finite) integral_product_swap:
  3.1689    fixes f :: "_ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1690    assumes f: "f \<in> borel_measurable (M1 \<Otimes>\<^sub>M M2)"
  3.1691    shows "(\<integral>(x,y). f (y,x) \<partial>(M2 \<Otimes>\<^sub>M M1)) = integral\<^sup>L (M1 \<Otimes>\<^sub>M M2) f"
  3.1692 @@ -2967,13 +2967,13 @@
  3.1693      by (simp add: integral_distr[symmetric, OF measurable_pair_swap' f] distr_pair_swap[symmetric])
  3.1694  qed
  3.1695  
  3.1696 -lemma (in pair_sigma_finite) Fubini_integrable:
  3.1697 +lemma%important (in pair_sigma_finite) Fubini_integrable:
  3.1698    fixes f :: "_ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1699    assumes f[measurable]: "f \<in> borel_measurable (M1 \<Otimes>\<^sub>M M2)"
  3.1700      and integ1: "integrable M1 (\<lambda>x. \<integral> y. norm (f (x, y)) \<partial>M2)"
  3.1701      and integ2: "AE x in M1. integrable M2 (\<lambda>y. f (x, y))"
  3.1702    shows "integrable (M1 \<Otimes>\<^sub>M M2) f"
  3.1703 -proof (rule integrableI_bounded)
  3.1704 +proof%unimportant (rule integrableI_bounded)
  3.1705    have "(\<integral>\<^sup>+ p. norm (f p) \<partial>(M1 \<Otimes>\<^sub>M M2)) = (\<integral>\<^sup>+ x. (\<integral>\<^sup>+ y. norm (f (x, y)) \<partial>M2) \<partial>M1)"
  3.1706      by (simp add: M2.nn_integral_fst [symmetric])
  3.1707    also have "\<dots> = (\<integral>\<^sup>+ x. \<bar>\<integral>y. norm (f (x, y)) \<partial>M2\<bar> \<partial>M1)"
  3.1708 @@ -2994,7 +2994,7 @@
  3.1709    finally show "(\<integral>\<^sup>+ p. norm (f p) \<partial>(M1 \<Otimes>\<^sub>M M2)) < \<infinity>" .
  3.1710  qed fact
  3.1711  
  3.1712 -lemma (in pair_sigma_finite) emeasure_pair_measure_finite:
  3.1713 +lemma%unimportant (in pair_sigma_finite) emeasure_pair_measure_finite:
  3.1714    assumes A: "A \<in> sets (M1 \<Otimes>\<^sub>M M2)" and finite: "emeasure (M1 \<Otimes>\<^sub>M M2) A < \<infinity>"
  3.1715    shows "AE x in M1. emeasure M2 {y\<in>space M2. (x, y) \<in> A} < \<infinity>"
  3.1716  proof -
  3.1717 @@ -3008,7 +3008,7 @@
  3.1718    ultimately show ?thesis by (auto simp: less_top)
  3.1719  qed
  3.1720  
  3.1721 -lemma (in pair_sigma_finite) AE_integrable_fst':
  3.1722 +lemma%unimportant (in pair_sigma_finite) AE_integrable_fst':
  3.1723    fixes f :: "_ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1724    assumes f[measurable]: "integrable (M1 \<Otimes>\<^sub>M M2) f"
  3.1725    shows "AE x in M1. integrable M2 (\<lambda>y. f (x, y))"
  3.1726 @@ -3025,7 +3025,7 @@
  3.1727         (auto simp: integrable_iff_bounded measurable_compose[OF _ borel_measurable_integrable[OF f]] less_top)
  3.1728  qed
  3.1729  
  3.1730 -lemma (in pair_sigma_finite) integrable_fst':
  3.1731 +lemma%unimportant (in pair_sigma_finite) integrable_fst':
  3.1732    fixes f :: "_ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1733    assumes f[measurable]: "integrable (M1 \<Otimes>\<^sub>M M2) f"
  3.1734    shows "integrable M1 (\<lambda>x. \<integral>y. f (x, y) \<partial>M2)"
  3.1735 @@ -3042,11 +3042,11 @@
  3.1736    finally show "(\<integral>\<^sup>+ x. ennreal (norm (\<integral> y. f (x, y) \<partial>M2)) \<partial>M1) < \<infinity>" .
  3.1737  qed
  3.1738  
  3.1739 -lemma (in pair_sigma_finite) integral_fst':
  3.1740 +lemma%important (in pair_sigma_finite) integral_fst':
  3.1741    fixes f :: "_ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1742    assumes f: "integrable (M1 \<Otimes>\<^sub>M M2) f"
  3.1743    shows "(\<integral>x. (\<integral>y. f (x, y) \<partial>M2) \<partial>M1) = integral\<^sup>L (M1 \<Otimes>\<^sub>M M2) f"
  3.1744 -using f proof induct
  3.1745 +using f proof%unimportant induct
  3.1746    case (base A c)
  3.1747    have A[measurable]: "A \<in> sets (M1 \<Otimes>\<^sub>M M2)" by fact
  3.1748  
  3.1749 @@ -3155,7 +3155,7 @@
  3.1750    qed
  3.1751  qed
  3.1752  
  3.1753 -lemma (in pair_sigma_finite)
  3.1754 +lemma%unimportant (in pair_sigma_finite) (* FIX ME needs name *)
  3.1755    fixes f :: "_ \<Rightarrow> _ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1756    assumes f: "integrable (M1 \<Otimes>\<^sub>M M2) (case_prod f)"
  3.1757    shows AE_integrable_fst: "AE x in M1. integrable M2 (\<lambda>y. f x y)" (is "?AE")
  3.1758 @@ -3163,7 +3163,7 @@
  3.1759      and integral_fst: "(\<integral>x. (\<integral>y. f x y \<partial>M2) \<partial>M1) = integral\<^sup>L (M1 \<Otimes>\<^sub>M M2) (\<lambda>(x, y). f x y)" (is "?EQ")
  3.1760    using AE_integrable_fst'[OF f] integrable_fst'[OF f] integral_fst'[OF f] by auto
  3.1761  
  3.1762 -lemma (in pair_sigma_finite)
  3.1763 +lemma%unimportant (in pair_sigma_finite) (* FIX ME needs name *)
  3.1764    fixes f :: "_ \<Rightarrow> _ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1765    assumes f[measurable]: "integrable (M1 \<Otimes>\<^sub>M M2) (case_prod f)"
  3.1766    shows AE_integrable_snd: "AE y in M2. integrable M1 (\<lambda>x. f x y)" (is "?AE")
  3.1767 @@ -3179,13 +3179,13 @@
  3.1768      using integral_product_swap[of "case_prod f"] by simp
  3.1769  qed
  3.1770  
  3.1771 -lemma (in pair_sigma_finite) Fubini_integral:
  3.1772 +lemma%unimportant (in pair_sigma_finite) Fubini_integral:
  3.1773    fixes f :: "_ \<Rightarrow> _ \<Rightarrow> _ :: {banach, second_countable_topology}"
  3.1774    assumes f: "integrable (M1 \<Otimes>\<^sub>M M2) (case_prod f)"
  3.1775    shows "(\<integral>y. (\<integral>x. f x y \<partial>M1) \<partial>M2) = (\<integral>x. (\<integral>y. f x y \<partial>M2) \<partial>M1)"
  3.1776    unfolding integral_snd[OF assms] integral_fst[OF assms] ..
  3.1777  
  3.1778 -lemma (in product_sigma_finite) product_integral_singleton:
  3.1779 +lemma%unimportant (in product_sigma_finite) product_integral_singleton:
  3.1780    fixes f :: "_ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1781    shows "f \<in> borel_measurable (M i) \<Longrightarrow> (\<integral>x. f (x i) \<partial>Pi\<^sub>M {i} M) = integral\<^sup>L (M i) f"
  3.1782    apply (subst distr_singleton[symmetric])
  3.1783 @@ -3193,7 +3193,7 @@
  3.1784    apply simp_all
  3.1785    done
  3.1786  
  3.1787 -lemma (in product_sigma_finite) product_integral_fold:
  3.1788 +lemma%unimportant (in product_sigma_finite) product_integral_fold:
  3.1789    fixes f :: "_ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1790    assumes IJ[simp]: "I \<inter> J = {}" and fin: "finite I" "finite J"
  3.1791    and f: "integrable (Pi\<^sub>M (I \<union> J) M) f"
  3.1792 @@ -3220,12 +3220,12 @@
  3.1793      done
  3.1794  qed
  3.1795  
  3.1796 -lemma (in product_sigma_finite) product_integral_insert:
  3.1797 +lemma%important (in product_sigma_finite) product_integral_insert:
  3.1798    fixes f :: "_ \<Rightarrow> _::{banach, second_countable_topology}"
  3.1799    assumes I: "finite I" "i \<notin> I"
  3.1800      and f: "integrable (Pi\<^sub>M (insert i I) M) f"
  3.1801    shows "integral\<^sup>L (Pi\<^sub>M (insert i I) M) f = (\<integral>x. (\<integral>y. f (x(i:=y)) \<partial>M i) \<partial>Pi\<^sub>M I M)"
  3.1802 -proof -
  3.1803 +proof%unimportant -
  3.1804    have "integral\<^sup>L (Pi\<^sub>M (insert i I) M) f = integral\<^sup>L (Pi\<^sub>M (I \<union> {i}) M) f"
  3.1805      by simp
  3.1806    also have "\<dots> = (\<integral>x. (\<integral>y. f (merge I {i} (x,y)) \<partial>Pi\<^sub>M {i} M) \<partial>Pi\<^sub>M I M)"
  3.1807 @@ -3244,11 +3244,11 @@
  3.1808    finally show ?thesis .
  3.1809  qed
  3.1810  
  3.1811 -lemma (in product_sigma_finite) product_integrable_prod:
  3.1812 +lemma%important (in product_sigma_finite) product_integrable_prod:
  3.1813    fixes f :: "'i \<Rightarrow> 'a \<Rightarrow> _::{real_normed_field,banach,second_countable_topology}"
  3.1814    assumes [simp]: "finite I" and integrable: "\<And>i. i \<in> I \<Longrightarrow> integrable (M i) (f i)"
  3.1815    shows "integrable (Pi\<^sub>M I M) (\<lambda>x. (\<Prod>i\<in>I. f i (x i)))" (is "integrable _ ?f")
  3.1816 -proof (unfold integrable_iff_bounded, intro conjI)
  3.1817 +proof%unimportant (unfold integrable_iff_bounded, intro conjI)
  3.1818    interpret finite_product_sigma_finite M I by standard fact
  3.1819  
  3.1820    show "?f \<in> borel_measurable (Pi\<^sub>M I M)"
  3.1821 @@ -3263,11 +3263,11 @@
  3.1822    finally show "(\<integral>\<^sup>+ x. ennreal (norm (\<Prod>i\<in>I. f i (x i))) \<partial>Pi\<^sub>M I M) < \<infinity>" .
  3.1823  qed
  3.1824  
  3.1825 -lemma (in product_sigma_finite) product_integral_prod:
  3.1826 +lemma%important (in product_sigma_finite) product_integral_prod:
  3.1827    fixes f :: "'i \<Rightarrow> 'a \<Rightarrow> _::{real_normed_field,banach,second_countable_topology}"
  3.1828    assumes "finite I" and integrable: "\<And>i. i \<in> I \<Longrightarrow> integrable (M i) (f i)"
  3.1829    shows "(\<integral>x. (\<Prod>i\<in>I. f i (x i)) \<partial>Pi\<^sub>M I M) = (\<Prod>i\<in>I. integral\<^sup>L (M i) (f i))"
  3.1830 -using assms proof induct
  3.1831 +using assms proof%unimportant induct
  3.1832    case empty
  3.1833    interpret finite_measure "Pi\<^sub>M {} M"
  3.1834      by rule (simp add: space_PiM)
  3.1835 @@ -3286,7 +3286,7 @@
  3.1836      by (simp add: * insert prod subset_insertI)
  3.1837  qed
  3.1838  
  3.1839 -lemma integrable_subalgebra:
  3.1840 +lemma%unimportant integrable_subalgebra:
  3.1841    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1842    assumes borel: "f \<in> borel_measurable N"
  3.1843    and N: "sets N \<subseteq> sets M" "space N = space M" "\<And>A. A \<in> sets N \<Longrightarrow> emeasure N A = emeasure M A"
  3.1844 @@ -3298,12 +3298,12 @@
  3.1845      using assms by (auto simp: integrable_iff_bounded nn_integral_subalgebra)
  3.1846  qed
  3.1847  
  3.1848 -lemma integral_subalgebra:
  3.1849 +lemma%important integral_subalgebra:
  3.1850    fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  3.1851    assumes borel: "f \<in> borel_measurable N"
  3.1852    and N: "sets N \<subseteq> sets M" "space N = space M" "\<And>A. A \<in> sets N \<Longrightarrow> emeasure N A = emeasure M A"
  3.1853    shows "integral\<^sup>L N f = integral\<^sup>L M f"
  3.1854 -proof cases
  3.1855 +proof%unimportant cases
  3.1856    assume "integrable N f"
  3.1857    then show ?thesis
  3.1858    proof induct
     4.1 --- a/src/HOL/Analysis/Borel_Space.thy	Mon Aug 27 22:58:36 2018 +0200
     4.2 +++ b/src/HOL/Analysis/Borel_Space.thy	Tue Aug 28 13:28:39 2018 +0100
     4.3 @@ -3,55 +3,55 @@
     4.4      Author:     Armin Heller, TU München
     4.5  *)
     4.6  
     4.7 -section \<open>Borel spaces\<close>
     4.8 +section%important \<open>Borel spaces\<close>
     4.9  
    4.10  theory Borel_Space
    4.11  imports
    4.12    Measurable Derivative Ordered_Euclidean_Space Extended_Real_Limits
    4.13  begin
    4.14  
    4.15 -lemma sets_Collect_eventually_sequentially[measurable]:
    4.16 +lemma%unimportant sets_Collect_eventually_sequentially[measurable]:
    4.17    "(\<And>i. {x\<in>space M. P x i} \<in> sets M) \<Longrightarrow> {x\<in>space M. eventually (P x) sequentially} \<in> sets M"
    4.18    unfolding eventually_sequentially by simp
    4.19  
    4.20 -lemma topological_basis_trivial: "topological_basis {A. open A}"
    4.21 +lemma%unimportant topological_basis_trivial: "topological_basis {A. open A}"
    4.22    by (auto simp: topological_basis_def)
    4.23  
    4.24 -lemma open_prod_generated: "open = generate_topology {A \<times> B | A B. open A \<and> open B}"
    4.25 -proof -
    4.26 +lemma%important open_prod_generated: "open = generate_topology {A \<times> B | A B. open A \<and> open B}"
    4.27 +proof%unimportant -
    4.28    have "{A \<times> B :: ('a \<times> 'b) set | A B. open A \<and> open B} = ((\<lambda>(a, b). a \<times> b) ` ({A. open A} \<times> {A. open A}))"
    4.29      by auto
    4.30    then show ?thesis
    4.31      by (auto intro: topological_basis_prod topological_basis_trivial topological_basis_imp_subbasis)
    4.32  qed
    4.33  
    4.34 -definition "mono_on f A \<equiv> \<forall>r s. r \<in> A \<and> s \<in> A \<and> r \<le> s \<longrightarrow> f r \<le> f s"
    4.35 +definition%important "mono_on f A \<equiv> \<forall>r s. r \<in> A \<and> s \<in> A \<and> r \<le> s \<longrightarrow> f r \<le> f s"
    4.36  
    4.37 -lemma mono_onI:
    4.38 +lemma%unimportant mono_onI:
    4.39    "(\<And>r s. r \<in> A \<Longrightarrow> s \<in> A \<Longrightarrow> r \<le> s \<Longrightarrow> f r \<le> f s) \<Longrightarrow> mono_on f A"
    4.40    unfolding mono_on_def by simp
    4.41  
    4.42 -lemma mono_onD:
    4.43 +lemma%unimportant mono_onD:
    4.44    "\<lbrakk>mono_on f A; r \<in> A; s \<in> A; r \<le> s\<rbrakk> \<Longrightarrow> f r \<le> f s"
    4.45    unfolding mono_on_def by simp
    4.46  
    4.47 -lemma mono_imp_mono_on: "mono f \<Longrightarrow> mono_on f A"
    4.48 +lemma%unimportant mono_imp_mono_on: "mono f \<Longrightarrow> mono_on f A"
    4.49    unfolding mono_def mono_on_def by auto
    4.50  
    4.51 -lemma mono_on_subset: "mono_on f A \<Longrightarrow> B \<subseteq> A \<Longrightarrow> mono_on f B"
    4.52 +lemma%unimportant mono_on_subset: "mono_on f A \<Longrightarrow> B \<subseteq> A \<Longrightarrow> mono_on f B"
    4.53    unfolding mono_on_def by auto
    4.54  
    4.55 -definition "strict_mono_on f A \<equiv> \<forall>r s. r \<in> A \<and> s \<in> A \<and> r < s \<longrightarrow> f r < f s"
    4.56 +definition%important "strict_mono_on f A \<equiv> \<forall>r s. r \<in> A \<and> s \<in> A \<and> r < s \<longrightarrow> f r < f s"
    4.57  
    4.58 -lemma strict_mono_onI:
    4.59 +lemma%unimportant strict_mono_onI:
    4.60    "(\<And>r s. r \<in> A \<Longrightarrow> s \<in> A \<Longrightarrow> r < s \<Longrightarrow> f r < f s) \<Longrightarrow> strict_mono_on f A"
    4.61    unfolding strict_mono_on_def by simp
    4.62  
    4.63 -lemma strict_mono_onD:
    4.64 +lemma%unimportant strict_mono_onD:
    4.65    "\<lbrakk>strict_mono_on f A; r \<in> A; s \<in> A; r < s\<rbrakk> \<Longrightarrow> f r < f s"
    4.66    unfolding strict_mono_on_def by simp
    4.67  
    4.68 -lemma mono_on_greaterD:
    4.69 +lemma%unimportant mono_on_greaterD:
    4.70    assumes "mono_on g A" "x \<in> A" "y \<in> A" "g x > (g (y::_::linorder) :: _ :: linorder)"
    4.71    shows "x > y"
    4.72  proof (rule ccontr)
    4.73 @@ -61,7 +61,7 @@
    4.74    with assms(4) show False by simp
    4.75  qed
    4.76  
    4.77 -lemma strict_mono_inv:
    4.78 +lemma%unimportant strict_mono_inv:
    4.79    fixes f :: "('a::linorder) \<Rightarrow> ('b::linorder)"
    4.80    assumes "strict_mono f" and "surj f" and inv: "\<And>x. g (f x) = x"
    4.81    shows "strict_mono g"
    4.82 @@ -72,7 +72,7 @@
    4.83    with inv show "g x < g y" by simp
    4.84  qed
    4.85  
    4.86 -lemma strict_mono_on_imp_inj_on:
    4.87 +lemma%unimportant strict_mono_on_imp_inj_on:
    4.88    assumes "strict_mono_on (f :: (_ :: linorder) \<Rightarrow> (_ :: preorder)) A"
    4.89    shows "inj_on f A"
    4.90  proof (rule inj_onI)
    4.91 @@ -82,7 +82,7 @@
    4.92         (auto dest: strict_mono_onD[OF assms, of x y] strict_mono_onD[OF assms, of y x])
    4.93  qed
    4.94  
    4.95 -lemma strict_mono_on_leD:
    4.96 +lemma%unimportant strict_mono_on_leD:
    4.97    assumes "strict_mono_on (f :: (_ :: linorder) \<Rightarrow> _ :: preorder) A" "x \<in> A" "y \<in> A" "x \<le> y"
    4.98    shows "f x \<le> f y"
    4.99  proof (insert le_less_linear[of y x], elim disjE)
   4.100 @@ -91,17 +91,17 @@
   4.101    thus ?thesis by (rule less_imp_le)
   4.102  qed (insert assms, simp)
   4.103  
   4.104 -lemma strict_mono_on_eqD:
   4.105 +lemma%unimportant strict_mono_on_eqD:
   4.106    fixes f :: "(_ :: linorder) \<Rightarrow> (_ :: preorder)"
   4.107    assumes "strict_mono_on f A" "f x = f y" "x \<in> A" "y \<in> A"
   4.108    shows "y = x"
   4.109    using assms by (rule_tac linorder_cases[of x y]) (auto dest: strict_mono_onD)
   4.110  
   4.111 -lemma mono_on_imp_deriv_nonneg:
   4.112 +lemma%important mono_on_imp_deriv_nonneg:
   4.113    assumes mono: "mono_on f A" and deriv: "(f has_real_derivative D) (at x)"
   4.114    assumes "x \<in> interior A"
   4.115    shows "D \<ge> 0"
   4.116 -proof (rule tendsto_lowerbound)
   4.117 +proof%unimportant (rule tendsto_lowerbound)
   4.118    let ?A' = "(\<lambda>y. y - x) ` interior A"
   4.119    from deriv show "((\<lambda>h. (f (x + h) - f x) / h) \<longlongrightarrow> D) (at 0)"
   4.120        by (simp add: field_has_derivative_at has_field_derivative_def)
   4.121 @@ -124,16 +124,16 @@
   4.122    qed
   4.123  qed simp
   4.124  
   4.125 -lemma strict_mono_on_imp_mono_on:
   4.126 +lemma%unimportant strict_mono_on_imp_mono_on:
   4.127    "strict_mono_on (f :: (_ :: linorder) \<Rightarrow> _ :: preorder) A \<Longrightarrow> mono_on f A"
   4.128    by (rule mono_onI, rule strict_mono_on_leD)
   4.129  
   4.130 -lemma mono_on_ctble_discont:
   4.131 +lemma%important mono_on_ctble_discont:
   4.132    fixes f :: "real \<Rightarrow> real"
   4.133    fixes A :: "real set"
   4.134    assumes "mono_on f A"
   4.135    shows "countable {a\<in>A. \<not> continuous (at a within A) f}"
   4.136 -proof -
   4.137 +proof%unimportant -
   4.138    have mono: "\<And>x y. x \<in> A \<Longrightarrow> y \<in> A \<Longrightarrow> x \<le> y \<Longrightarrow> f x \<le> f y"
   4.139      using \<open>mono_on f A\<close> by (simp add: mono_on_def)
   4.140    have "\<forall>a \<in> {a\<in>A. \<not> continuous (at a within A) f}. \<exists>q :: nat \<times> rat.
   4.141 @@ -196,12 +196,12 @@
   4.142      by (rule countableI')
   4.143  qed
   4.144  
   4.145 -lemma mono_on_ctble_discont_open:
   4.146 +lemma%important mono_on_ctble_discont_open:
   4.147    fixes f :: "real \<Rightarrow> real"
   4.148    fixes A :: "real set"
   4.149    assumes "open A" "mono_on f A"
   4.150    shows "countable {a\<in>A. \<not>isCont f a}"
   4.151 -proof -
   4.152 +proof%unimportant -
   4.153    have "{a\<in>A. \<not>isCont f a} = {a\<in>A. \<not>(continuous (at a within A) f)}"
   4.154      by (auto simp add: continuous_within_open [OF _ \<open>open A\<close>])
   4.155    thus ?thesis
   4.156 @@ -209,13 +209,13 @@
   4.157      by (rule mono_on_ctble_discont, rule assms)
   4.158  qed
   4.159  
   4.160 -lemma mono_ctble_discont:
   4.161 +lemma%important mono_ctble_discont:
   4.162    fixes f :: "real \<Rightarrow> real"
   4.163    assumes "mono f"
   4.164    shows "countable {a. \<not> isCont f a}"
   4.165 -using assms mono_on_ctble_discont [of f UNIV] unfolding mono_on_def mono_def by auto
   4.166 +using%unimportant assms mono_on_ctble_discont [of f UNIV] unfolding mono_on_def mono_def by auto
   4.167  
   4.168 -lemma has_real_derivative_imp_continuous_on:
   4.169 +lemma%important has_real_derivative_imp_continuous_on:
   4.170    assumes "\<And>x. x \<in> A \<Longrightarrow> (f has_real_derivative f' x) (at x)"
   4.171    shows "continuous_on A f"
   4.172    apply (intro differentiable_imp_continuous_on, unfold differentiable_on_def)
   4.173 @@ -224,11 +224,11 @@
   4.174    apply simp_all
   4.175    done
   4.176  
   4.177 -lemma closure_contains_Sup:
   4.178 +lemma%important closure_contains_Sup:
   4.179    fixes S :: "real set"
   4.180    assumes "S \<noteq> {}" "bdd_above S"
   4.181    shows "Sup S \<in> closure S"
   4.182 -proof-
   4.183 +proof%unimportant -
   4.184    have "Inf (uminus ` S) \<in> closure (uminus ` S)"
   4.185        using assms by (intro closure_contains_Inf) auto
   4.186    also have "Inf (uminus ` S) = -Sup S" by (simp add: Inf_real_def)
   4.187 @@ -237,22 +237,22 @@
   4.188    finally show ?thesis by auto
   4.189  qed
   4.190  
   4.191 -lemma closed_contains_Sup:
   4.192 +lemma%unimportant closed_contains_Sup:
   4.193    fixes S :: "real set"
   4.194    shows "S \<noteq> {} \<Longrightarrow> bdd_above S \<Longrightarrow> closed S \<Longrightarrow> Sup S \<in> S"
   4.195    by (subst closure_closed[symmetric], assumption, rule closure_contains_Sup)
   4.196  
   4.197 -lemma closed_subset_contains_Sup:
   4.198 +lemma%unimportant closed_subset_contains_Sup:
   4.199    fixes A C :: "real set"
   4.200    shows "closed C \<Longrightarrow> A \<subseteq> C \<Longrightarrow> A \<noteq> {} \<Longrightarrow> bdd_above A \<Longrightarrow> Sup A \<in> C"
   4.201    by (metis closure_contains_Sup closure_minimal subset_eq)
   4.202  
   4.203 -lemma deriv_nonneg_imp_mono:
   4.204 +lemma%important deriv_nonneg_imp_mono:
   4.205    assumes deriv: "\<And>x. x \<in> {a..b} \<Longrightarrow> (g has_real_derivative g' x) (at x)"
   4.206    assumes nonneg: "\<And>x. x \<in> {a..b} \<Longrightarrow> g' x \<ge> 0"
   4.207    assumes ab: "a \<le> b"
   4.208    shows "g a \<le> g b"
   4.209 -proof (cases "a < b")
   4.210 +proof%unimportant (cases "a < b")
   4.211    assume "a < b"
   4.212    from deriv have "\<And>x. \<lbrakk>x \<ge> a; x \<le> b\<rbrakk> \<Longrightarrow> (g has_real_derivative g' x) (at x)" by simp
   4.213    with MVT2[OF \<open>a < b\<close>] and deriv
   4.214 @@ -261,11 +261,11 @@
   4.215    with g_ab show ?thesis by simp
   4.216  qed (insert ab, simp)
   4.217  
   4.218 -lemma continuous_interval_vimage_Int:
   4.219 +lemma%important continuous_interval_vimage_Int:
   4.220    assumes "continuous_on {a::real..b} g" and mono: "\<And>x y. a \<le> x \<Longrightarrow> x \<le> y \<Longrightarrow> y \<le> b \<Longrightarrow> g x \<le> g y"
   4.221    assumes "a \<le> b" "(c::real) \<le> d" "{c..d} \<subseteq> {g a..g b}"
   4.222    obtains c' d' where "{a..b} \<inter> g -` {c..d} = {c'..d'}" "c' \<le> d'" "g c' = c" "g d' = d"
   4.223 -proof-
   4.224 +proof%unimportant-
   4.225    let ?A = "{a..b} \<inter> g -` {c..d}"
   4.226    from IVT'[of g a c b, OF _ _ \<open>a \<le> b\<close> assms(1)] assms(4,5)
   4.227    obtain c'' where c'': "c'' \<in> ?A" "g c'' = c" by auto
   4.228 @@ -297,48 +297,48 @@
   4.229    ultimately show ?thesis using that by blast
   4.230  qed
   4.231  
   4.232 -subsection \<open>Generic Borel spaces\<close>
   4.233 +subsection%important \<open>Generic Borel spaces\<close>
   4.234  
   4.235 -definition (in topological_space) borel :: "'a measure" where
   4.236 +definition%important (in topological_space) borel :: "'a measure" where
   4.237    "borel = sigma UNIV {S. open S}"
   4.238  
   4.239  abbreviation "borel_measurable M \<equiv> measurable M borel"
   4.240  
   4.241 -lemma in_borel_measurable:
   4.242 +lemma%important in_borel_measurable:
   4.243     "f \<in> borel_measurable M \<longleftrightarrow>
   4.244      (\<forall>S \<in> sigma_sets UNIV {S. open S}. f -` S \<inter> space M \<in> sets M)"
   4.245 -  by (auto simp add: measurable_def borel_def)
   4.246 +  by%unimportant (auto simp add: measurable_def borel_def)
   4.247  
   4.248 -lemma in_borel_measurable_borel:
   4.249 +lemma%important in_borel_measurable_borel:
   4.250     "f \<in> borel_measurable M \<longleftrightarrow>
   4.251      (\<forall>S \<in> sets borel.
   4.252        f -` S \<inter> space M \<in> sets M)"
   4.253 -  by (auto simp add: measurable_def borel_def)
   4.254 +  by%unimportant (auto simp add: measurable_def borel_def)
   4.255  
   4.256 -lemma space_borel[simp]: "space borel = UNIV"
   4.257 +lemma%unimportant space_borel[simp]: "space borel = UNIV"
   4.258    unfolding borel_def by auto
   4.259  
   4.260 -lemma space_in_borel[measurable]: "UNIV \<in> sets borel"
   4.261 +lemma%unimportant space_in_borel[measurable]: "UNIV \<in> sets borel"
   4.262    unfolding borel_def by auto
   4.263  
   4.264 -lemma sets_borel: "sets borel = sigma_sets UNIV {S. open S}"
   4.265 +lemma%unimportant sets_borel: "sets borel = sigma_sets UNIV {S. open S}"
   4.266    unfolding borel_def by (rule sets_measure_of) simp
   4.267  
   4.268 -lemma measurable_sets_borel:
   4.269 +lemma%unimportant measurable_sets_borel:
   4.270      "\<lbrakk>f \<in> measurable borel M; A \<in> sets M\<rbrakk> \<Longrightarrow> f -` A \<in> sets borel"
   4.271    by (drule (1) measurable_sets) simp
   4.272  
   4.273 -lemma pred_Collect_borel[measurable (raw)]: "Measurable.pred borel P \<Longrightarrow> {x. P x} \<in> sets borel"
   4.274 +lemma%unimportant pred_Collect_borel[measurable (raw)]: "Measurable.pred borel P \<Longrightarrow> {x. P x} \<in> sets borel"
   4.275    unfolding borel_def pred_def by auto
   4.276  
   4.277 -lemma borel_open[measurable (raw generic)]:
   4.278 +lemma%unimportant borel_open[measurable (raw generic)]:
   4.279    assumes "open A" shows "A \<in> sets borel"
   4.280  proof -
   4.281    have "A \<in> {S. open S}" unfolding mem_Collect_eq using assms .
   4.282    thus ?thesis unfolding borel_def by auto
   4.283  qed
   4.284  
   4.285 -lemma borel_closed[measurable (raw generic)]:
   4.286 +lemma%unimportant borel_closed[measurable (raw generic)]:
   4.287    assumes "closed A" shows "A \<in> sets borel"
   4.288  proof -
   4.289    have "space borel - (- A) \<in> sets borel"
   4.290 @@ -346,11 +346,11 @@
   4.291    thus ?thesis by simp
   4.292  qed
   4.293  
   4.294 -lemma borel_singleton[measurable]:
   4.295 +lemma%unimportant borel_singleton[measurable]:
   4.296    "A \<in> sets borel \<Longrightarrow> insert x A \<in> sets (borel :: 'a::t1_space measure)"
   4.297    unfolding insert_def by (rule sets.Un) auto
   4.298  
   4.299 -lemma sets_borel_eq_count_space: "sets (borel :: 'a::{countable, t2_space} measure) = count_space UNIV"
   4.300 +lemma%unimportant sets_borel_eq_count_space: "sets (borel :: 'a::{countable, t2_space} measure) = count_space UNIV"
   4.301  proof -
   4.302    have "(\<Union>a\<in>A. {a}) \<in> sets borel" for A :: "'a set"
   4.303      by (intro sets.countable_UN') auto
   4.304 @@ -358,16 +358,16 @@
   4.305      by auto
   4.306  qed
   4.307  
   4.308 -lemma borel_comp[measurable]: "A \<in> sets borel \<Longrightarrow> - A \<in> sets borel"
   4.309 +lemma%unimportant borel_comp[measurable]: "A \<in> sets borel \<Longrightarrow> - A \<in> sets borel"
   4.310    unfolding Compl_eq_Diff_UNIV by simp
   4.311  
   4.312 -lemma borel_measurable_vimage:
   4.313 +lemma%unimportant borel_measurable_vimage:
   4.314    fixes f :: "'a \<Rightarrow> 'x::t2_space"
   4.315    assumes borel[measurable]: "f \<in> borel_measurable M"
   4.316    shows "f -` {x} \<inter> space M \<in> sets M"
   4.317    by simp
   4.318  
   4.319 -lemma borel_measurableI:
   4.320 +lemma%unimportant borel_measurableI:
   4.321    fixes f :: "'a \<Rightarrow> 'x::topological_space"
   4.322    assumes "\<And>S. open S \<Longrightarrow> f -` S \<inter> space M \<in> sets M"
   4.323    shows "f \<in> borel_measurable M"
   4.324 @@ -377,30 +377,30 @@
   4.325      using assms[of S] by simp
   4.326  qed
   4.327  
   4.328 -lemma borel_measurable_const:
   4.329 +lemma%unimportant borel_measurable_const:
   4.330    "(\<lambda>x. c) \<in> borel_measurable M"
   4.331    by auto
   4.332  
   4.333 -lemma borel_measurable_indicator:
   4.334 +lemma%unimportant borel_measurable_indicator:
   4.335    assumes A: "A \<in> sets M"
   4.336    shows "indicator A \<in> borel_measurable M"
   4.337    unfolding indicator_def [abs_def] using A
   4.338    by (auto intro!: measurable_If_set)
   4.339  
   4.340 -lemma borel_measurable_count_space[measurable (raw)]:
   4.341 +lemma%unimportant borel_measurable_count_space[measurable (raw)]:
   4.342    "f \<in> borel_measurable (count_space S)"
   4.343    unfolding measurable_def by auto
   4.344  
   4.345 -lemma borel_measurable_indicator'[measurable (raw)]:
   4.346 +lemma%unimportant borel_measurable_indicator'[measurable (raw)]:
   4.347    assumes [measurable]: "{x\<in>space M. f x \<in> A x} \<in> sets M"
   4.348    shows "(\<lambda>x. indicator (A x) (f x)) \<in> borel_measurable M"
   4.349    unfolding indicator_def[abs_def]
   4.350    by (auto intro!: measurable_If)
   4.351  
   4.352 -lemma borel_measurable_indicator_iff:
   4.353 +lemma%important borel_measurable_indicator_iff:
   4.354    "(indicator A :: 'a \<Rightarrow> 'x::{t1_space, zero_neq_one}) \<in> borel_measurable M \<longleftrightarrow> A \<inter> space M \<in> sets M"
   4.355      (is "?I \<in> borel_measurable M \<longleftrightarrow> _")
   4.356 -proof
   4.357 +proof%unimportant
   4.358    assume "?I \<in> borel_measurable M"
   4.359    then have "?I -` {1} \<inter> space M \<in> sets M"
   4.360      unfolding measurable_def by auto
   4.361 @@ -415,12 +415,12 @@
   4.362    ultimately show "?I \<in> borel_measurable M" by auto
   4.363  qed
   4.364  
   4.365 -lemma borel_measurable_subalgebra:
   4.366 +lemma%unimportant borel_measurable_subalgebra:
   4.367    assumes "sets N \<subseteq> sets M" "space N = space M" "f \<in> borel_measurable N"
   4.368    shows "f \<in> borel_measurable M"
   4.369    using assms unfolding measurable_def by auto
   4.370  
   4.371 -lemma borel_measurable_restrict_space_iff_ereal:
   4.372 +lemma%unimportant borel_measurable_restrict_space_iff_ereal:
   4.373    fixes f :: "'a \<Rightarrow> ereal"
   4.374    assumes \<Omega>[measurable, simp]: "\<Omega> \<inter> space M \<in> sets M"
   4.375    shows "f \<in> borel_measurable (restrict_space M \<Omega>) \<longleftrightarrow>
   4.376 @@ -428,7 +428,7 @@
   4.377    by (subst measurable_restrict_space_iff)
   4.378       (auto simp: indicator_def if_distrib[where f="\<lambda>x. a * x" for a] cong del: if_weak_cong)
   4.379  
   4.380 -lemma borel_measurable_restrict_space_iff_ennreal:
   4.381 +lemma%unimportant borel_measurable_restrict_space_iff_ennreal:
   4.382    fixes f :: "'a \<Rightarrow> ennreal"
   4.383    assumes \<Omega>[measurable, simp]: "\<Omega> \<inter> space M \<in> sets M"
   4.384    shows "f \<in> borel_measurable (restrict_space M \<Omega>) \<longleftrightarrow>
   4.385 @@ -436,7 +436,7 @@
   4.386    by (subst measurable_restrict_space_iff)
   4.387       (auto simp: indicator_def if_distrib[where f="\<lambda>x. a * x" for a] cong del: if_weak_cong)
   4.388  
   4.389 -lemma borel_measurable_restrict_space_iff:
   4.390 +lemma%unimportant borel_measurable_restrict_space_iff:
   4.391    fixes f :: "'a \<Rightarrow> 'b::real_normed_vector"
   4.392    assumes \<Omega>[measurable, simp]: "\<Omega> \<inter> space M \<in> sets M"
   4.393    shows "f \<in> borel_measurable (restrict_space M \<Omega>) \<longleftrightarrow>
   4.394 @@ -445,27 +445,27 @@
   4.395       (auto simp: indicator_def if_distrib[where f="\<lambda>x. x *\<^sub>R a" for a] ac_simps
   4.396         cong del: if_weak_cong)
   4.397  
   4.398 -lemma cbox_borel[measurable]: "cbox a b \<in> sets borel"
   4.399 +lemma%unimportant cbox_borel[measurable]: "cbox a b \<in> sets borel"
   4.400    by (auto intro: borel_closed)
   4.401  
   4.402 -lemma box_borel[measurable]: "box a b \<in> sets borel"
   4.403 +lemma%unimportant box_borel[measurable]: "box a b \<in> sets borel"
   4.404    by (auto intro: borel_open)
   4.405  
   4.406 -lemma borel_compact: "compact (A::'a::t2_space set) \<Longrightarrow> A \<in> sets borel"
   4.407 +lemma%unimportant borel_compact: "compact (A::'a::t2_space set) \<Longrightarrow> A \<in> sets borel"
   4.408    by (auto intro: borel_closed dest!: compact_imp_closed)
   4.409  
   4.410 -lemma borel_sigma_sets_subset:
   4.411 +lemma%unimportant borel_sigma_sets_subset:
   4.412    "A \<subseteq> sets borel \<Longrightarrow> sigma_sets UNIV A \<subseteq> sets borel"
   4.413    using sets.sigma_sets_subset[of A borel] by simp
   4.414  
   4.415 -lemma borel_eq_sigmaI1:
   4.416 +lemma%important borel_eq_sigmaI1:
   4.417    fixes F :: "'i \<Rightarrow> 'a::topological_space set" and X :: "'a::topological_space set set"
   4.418    assumes borel_eq: "borel = sigma UNIV X"
   4.419    assumes X: "\<And>x. x \<in> X \<Longrightarrow> x \<in> sets (sigma UNIV (F ` A))"
   4.420    assumes F: "\<And>i. i \<in> A \<Longrightarrow> F i \<in> sets borel"
   4.421    shows "borel = sigma UNIV (F ` A)"
   4.422    unfolding borel_def
   4.423 -proof (intro sigma_eqI antisym)
   4.424 +proof%unimportant (intro sigma_eqI antisym)
   4.425    have borel_rev_eq: "sigma_sets UNIV {S::'a set. open S} = sets borel"
   4.426      unfolding borel_def by simp
   4.427    also have "\<dots> = sigma_sets UNIV X"
   4.428 @@ -477,7 +477,7 @@
   4.429      unfolding borel_rev_eq using F by (intro borel_sigma_sets_subset) auto
   4.430  qed auto
   4.431  
   4.432 -lemma borel_eq_sigmaI2:
   4.433 +lemma%unimportant borel_eq_sigmaI2:
   4.434    fixes F :: "'i \<Rightarrow> 'j \<Rightarrow> 'a::topological_space set"
   4.435      and G :: "'l \<Rightarrow> 'k \<Rightarrow> 'a::topological_space set"
   4.436    assumes borel_eq: "borel = sigma UNIV ((\<lambda>(i, j). G i j)`B)"
   4.437 @@ -487,7 +487,7 @@
   4.438    using assms
   4.439    by (intro borel_eq_sigmaI1[where X="(\<lambda>(i, j). G i j) ` B" and F="(\<lambda>(i, j). F i j)"]) auto
   4.440  
   4.441 -lemma borel_eq_sigmaI3:
   4.442 +lemma%unimportant borel_eq_sigmaI3:
   4.443    fixes F :: "'i \<Rightarrow> 'j \<Rightarrow> 'a::topological_space set" and X :: "'a::topological_space set set"
   4.444    assumes borel_eq: "borel = sigma UNIV X"
   4.445    assumes X: "\<And>x. x \<in> X \<Longrightarrow> x \<in> sets (sigma UNIV ((\<lambda>(i, j). F i j) ` A))"
   4.446 @@ -495,7 +495,7 @@
   4.447    shows "borel = sigma UNIV ((\<lambda>(i, j). F i j) ` A)"
   4.448    using assms by (intro borel_eq_sigmaI1[where X=X and F="(\<lambda>(i, j). F i j)"]) auto
   4.449  
   4.450 -lemma borel_eq_sigmaI4:
   4.451 +lemma%unimportant borel_eq_sigmaI4:
   4.452    fixes F :: "'i \<Rightarrow> 'a::topological_space set"
   4.453      and G :: "'l \<Rightarrow> 'k \<Rightarrow> 'a::topological_space set"
   4.454    assumes borel_eq: "borel = sigma UNIV ((\<lambda>(i, j). G i j)`A)"
   4.455 @@ -504,7 +504,7 @@
   4.456    shows "borel = sigma UNIV (range F)"
   4.457    using assms by (intro borel_eq_sigmaI1[where X="(\<lambda>(i, j). G i j) ` A" and F=F]) auto
   4.458  
   4.459 -lemma borel_eq_sigmaI5:
   4.460 +lemma%unimportant borel_eq_sigmaI5:
   4.461    fixes F :: "'i \<Rightarrow> 'j \<Rightarrow> 'a::topological_space set" and G :: "'l \<Rightarrow> 'a::topological_space set"
   4.462    assumes borel_eq: "borel = sigma UNIV (range G)"
   4.463    assumes X: "\<And>i. G i \<in> sets (sigma UNIV (range (\<lambda>(i, j). F i j)))"
   4.464 @@ -512,12 +512,12 @@
   4.465    shows "borel = sigma UNIV (range (\<lambda>(i, j). F i j))"
   4.466    using assms by (intro borel_eq_sigmaI1[where X="range G" and F="(\<lambda>(i, j). F i j)"]) auto
   4.467  
   4.468 -lemma second_countable_borel_measurable:
   4.469 +lemma%important second_countable_borel_measurable:
   4.470    fixes X :: "'a::second_countable_topology set set"
   4.471    assumes eq: "open = generate_topology X"
   4.472    shows "borel = sigma UNIV X"
   4.473    unfolding borel_def
   4.474 -proof (intro sigma_eqI sigma_sets_eqI)
   4.475 +proof%unimportant (intro sigma_eqI sigma_sets_eqI)
   4.476    interpret X: sigma_algebra UNIV "sigma_sets UNIV X"
   4.477      by (rule sigma_algebra_sigma_sets) simp
   4.478  
   4.479 @@ -556,7 +556,7 @@
   4.480    qed auto
   4.481  qed (auto simp: eq intro: generate_topology.Basis)
   4.482  
   4.483 -lemma borel_eq_closed: "borel = sigma UNIV (Collect closed)"
   4.484 +lemma%unimportant borel_eq_closed: "borel = sigma UNIV (Collect closed)"
   4.485    unfolding borel_def
   4.486  proof (intro sigma_eqI sigma_sets_eqI, safe)
   4.487    fix x :: "'a set" assume "open x"
   4.488 @@ -572,13 +572,13 @@
   4.489    finally show "x \<in> sigma_sets UNIV (Collect open)" by simp
   4.490  qed simp_all
   4.491  
   4.492 -lemma borel_eq_countable_basis:
   4.493 +lemma%important borel_eq_countable_basis:
   4.494    fixes B::"'a::topological_space set set"
   4.495    assumes "countable B"
   4.496    assumes "topological_basis B"
   4.497    shows "borel = sigma UNIV B"
   4.498    unfolding borel_def
   4.499 -proof (intro sigma_eqI sigma_sets_eqI, safe)
   4.500 +proof%unimportant (intro sigma_eqI sigma_sets_eqI, safe)
   4.501    interpret countable_basis using assms by unfold_locales
   4.502    fix X::"'a set" assume "open X"
   4.503    from open_countable_basisE[OF this] guess B' . note B' = this
   4.504 @@ -590,7 +590,7 @@
   4.505    thus "b \<in> sigma_sets UNIV (Collect open)" by auto
   4.506  qed simp_all
   4.507  
   4.508 -lemma borel_measurable_continuous_on_restrict:
   4.509 +lemma%unimportant borel_measurable_continuous_on_restrict:
   4.510    fixes f :: "'a::topological_space \<Rightarrow> 'b::topological_space"
   4.511    assumes f: "continuous_on A f"
   4.512    shows "f \<in> borel_measurable (restrict_space borel A)"
   4.513 @@ -602,16 +602,16 @@
   4.514      by (force simp add: sets_restrict_space space_restrict_space)
   4.515  qed
   4.516  
   4.517 -lemma borel_measurable_continuous_on1: "continuous_on UNIV f \<Longrightarrow> f \<in> borel_measurable borel"
   4.518 +lemma%unimportant borel_measurable_continuous_on1: "continuous_on UNIV f \<Longrightarrow> f \<in> borel_measurable borel"
   4.519    by (drule borel_measurable_continuous_on_restrict) simp
   4.520  
   4.521 -lemma borel_measurable_continuous_on_if:
   4.522 +lemma%unimportant borel_measurable_continuous_on_if:
   4.523    "A \<in> sets borel \<Longrightarrow> continuous_on A f \<Longrightarrow> continuous_on (- A) g \<Longrightarrow>
   4.524      (\<lambda>x. if x \<in> A then f x else g x) \<in> borel_measurable borel"
   4.525    by (auto simp add: measurable_If_restrict_space_iff Collect_neg_eq
   4.526             intro!: borel_measurable_continuous_on_restrict)
   4.527  
   4.528 -lemma borel_measurable_continuous_countable_exceptions:
   4.529 +lemma%unimportant borel_measurable_continuous_countable_exceptions:
   4.530    fixes f :: "'a::t1_space \<Rightarrow> 'b::topological_space"
   4.531    assumes X: "countable X"
   4.532    assumes "continuous_on (- X) f"
   4.533 @@ -623,23 +623,23 @@
   4.534      by (intro borel_measurable_continuous_on_if assms continuous_intros)
   4.535  qed auto
   4.536  
   4.537 -lemma borel_measurable_continuous_on:
   4.538 +lemma%unimportant borel_measurable_continuous_on:
   4.539    assumes f: "continuous_on UNIV f" and g: "g \<in> borel_measurable M"
   4.540    shows "(\<lambda>x. f (g x)) \<in> borel_measurable M"
   4.541    using measurable_comp[OF g borel_measurable_continuous_on1[OF f]] by (simp add: comp_def)
   4.542  
   4.543 -lemma borel_measurable_continuous_on_indicator:
   4.544 +lemma%unimportant borel_measurable_continuous_on_indicator:
   4.545    fixes f g :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"
   4.546    shows "A \<in> sets borel \<Longrightarrow> continuous_on A f \<Longrightarrow> (\<lambda>x. indicator A x *\<^sub>R f x) \<in> borel_measurable borel"
   4.547    by (subst borel_measurable_restrict_space_iff[symmetric])
   4.548       (auto intro: borel_measurable_continuous_on_restrict)
   4.549  
   4.550 -lemma borel_measurable_Pair[measurable (raw)]:
   4.551 +lemma%important borel_measurable_Pair[measurable (raw)]:
   4.552    fixes f :: "'a \<Rightarrow> 'b::second_countable_topology" and g :: "'a \<Rightarrow> 'c::second_countable_topology"
   4.553    assumes f[measurable]: "f \<in> borel_measurable M"
   4.554    assumes g[measurable]: "g \<in> borel_measurable M"
   4.555    shows "(\<lambda>x. (f x, g x)) \<in> borel_measurable M"
   4.556 -proof (subst borel_eq_countable_basis)
   4.557 +proof%unimportant (subst borel_eq_countable_basis)
   4.558    let ?B = "SOME B::'b set set. countable B \<and> topological_basis B"
   4.559    let ?C = "SOME B::'c set set. countable B \<and> topological_basis B"
   4.560    let ?P = "(\<lambda>(b, c). b \<times> c) ` (?B \<times> ?C)"
   4.561 @@ -660,21 +660,21 @@
   4.562    qed auto
   4.563  qed
   4.564  
   4.565 -lemma borel_measurable_continuous_Pair:
   4.566 +lemma%important borel_measurable_continuous_Pair:
   4.567    fixes f :: "'a \<Rightarrow> 'b::second_countable_topology" and g :: "'a \<Rightarrow> 'c::second_countable_topology"
   4.568    assumes [measurable]: "f \<in> borel_measurable M"
   4.569    assumes [measurable]: "g \<in> borel_measurable M"
   4.570    assumes H: "continuous_on UNIV (\<lambda>x. H (fst x) (snd x))"
   4.571    shows "(\<lambda>x. H (f x) (g x)) \<in> borel_measurable M"
   4.572 -proof -
   4.573 +proof%unimportant -
   4.574    have eq: "(\<lambda>x. H (f x) (g x)) = (\<lambda>x. (\<lambda>x. H (fst x) (snd x)) (f x, g x))" by auto
   4.575    show ?thesis
   4.576      unfolding eq by (rule borel_measurable_continuous_on[OF H]) auto
   4.577  qed
   4.578  
   4.579 -subsection \<open>Borel spaces on order topologies\<close>
   4.580 +subsection%important \<open>Borel spaces on order topologies\<close>
   4.581  
   4.582 -lemma [measurable]:
   4.583 +lemma%unimportant [measurable]:
   4.584    fixes a b :: "'a::linorder_topology"
   4.585    shows lessThan_borel: "{..< a} \<in> sets borel"
   4.586      and greaterThan_borel: "{a <..} \<in> sets borel"
   4.587 @@ -688,7 +688,7 @@
   4.588    by (blast intro: borel_open borel_closed open_lessThan open_greaterThan open_greaterThanLessThan
   4.589                     closed_atMost closed_atLeast closed_atLeastAtMost)+
   4.590  
   4.591 -lemma borel_Iio:
   4.592 +lemma%unimportant borel_Iio:
   4.593    "borel = sigma UNIV (range lessThan :: 'a::{linorder_topology, second_countable_topology} set set)"
   4.594    unfolding second_countable_borel_measurable[OF open_generated_order]
   4.595  proof (intro sigma_eqI sigma_sets_eqI)
   4.596 @@ -726,7 +726,7 @@
   4.597    qed auto
   4.598  qed auto
   4.599  
   4.600 -lemma borel_Ioi:
   4.601 +lemma%unimportant borel_Ioi:
   4.602    "borel = sigma UNIV (range greaterThan :: 'a::{linorder_topology, second_countable_topology} set set)"
   4.603    unfolding second_countable_borel_measurable[OF open_generated_order]
   4.604  proof (intro sigma_eqI sigma_sets_eqI)
   4.605 @@ -764,29 +764,29 @@
   4.606    qed auto
   4.607  qed auto
   4.608  
   4.609 -lemma borel_measurableI_less:
   4.610 +lemma%unimportant borel_measurableI_less:
   4.611    fixes f :: "'a \<Rightarrow> 'b::{linorder_topology, second_countable_topology}"
   4.612    shows "(\<And>y. {x\<in>space M. f x < y} \<in> sets M) \<Longrightarrow> f \<in> borel_measurable M"
   4.613    unfolding borel_Iio
   4.614    by (rule measurable_measure_of) (auto simp: Int_def conj_commute)
   4.615  
   4.616 -lemma borel_measurableI_greater:
   4.617 +lemma%important borel_measurableI_greater:
   4.618    fixes f :: "'a \<Rightarrow> 'b::{linorder_topology, second_countable_topology}"
   4.619    shows "(\<And>y. {x\<in>space M. y < f x} \<in> sets M) \<Longrightarrow> f \<in> borel_measurable M"
   4.620    unfolding borel_Ioi
   4.621 -  by (rule measurable_measure_of) (auto simp: Int_def conj_commute)
   4.622 +  by%unimportant (rule measurable_measure_of) (auto simp: Int_def conj_commute)
   4.623  
   4.624 -lemma borel_measurableI_le:
   4.625 +lemma%unimportant borel_measurableI_le:
   4.626    fixes f :: "'a \<Rightarrow> 'b::{linorder_topology, second_countable_topology}"
   4.627    shows "(\<And>y. {x\<in>space M. f x \<le> y} \<in> sets M) \<Longrightarrow> f \<in> borel_measurable M"
   4.628    by (rule borel_measurableI_greater) (auto simp: not_le[symmetric])
   4.629  
   4.630 -lemma borel_measurableI_ge:
   4.631 +lemma%unimportant borel_measurableI_ge:
   4.632    fixes f :: "'a \<Rightarrow> 'b::{linorder_topology, second_countable_topology}"
   4.633    shows "(\<And>y. {x\<in>space M. y \<le> f x} \<in> sets M) \<Longrightarrow> f \<in> borel_measurable M"
   4.634    by (rule borel_measurableI_less) (auto simp: not_le[symmetric])
   4.635  
   4.636 -lemma borel_measurable_less[measurable]:
   4.637 +lemma%unimportant borel_measurable_less[measurable]:
   4.638    fixes f :: "'a \<Rightarrow> 'b::{second_countable_topology, linorder_topology}"
   4.639    assumes "f \<in> borel_measurable M"
   4.640    assumes "g \<in> borel_measurable M"
   4.641 @@ -800,7 +800,7 @@
   4.642    finally show ?thesis .
   4.643  qed
   4.644  
   4.645 -lemma
   4.646 +lemma%important
   4.647    fixes f :: "'a \<Rightarrow> 'b::{second_countable_topology, linorder_topology}"
   4.648    assumes f[measurable]: "f \<in> borel_measurable M"
   4.649    assumes g[measurable]: "g \<in> borel_measurable M"
   4.650 @@ -808,23 +808,23 @@
   4.651      and borel_measurable_eq[measurable]: "{w \<in> space M. f w = g w} \<in> sets M"
   4.652      and borel_measurable_neq: "{w \<in> space M. f w \<noteq> g w} \<in> sets M"
   4.653    unfolding eq_iff not_less[symmetric]
   4.654 -  by measurable
   4.655 +  by%unimportant measurable
   4.656  
   4.657 -lemma borel_measurable_SUP[measurable (raw)]:
   4.658 +lemma%important borel_measurable_SUP[measurable (raw)]:
   4.659    fixes F :: "_ \<Rightarrow> _ \<Rightarrow> _::{complete_linorder, linorder_topology, second_countable_topology}"
   4.660    assumes [simp]: "countable I"
   4.661    assumes [measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> borel_measurable M"
   4.662    shows "(\<lambda>x. SUP i:I. F i x) \<in> borel_measurable M"
   4.663 -  by (rule borel_measurableI_greater) (simp add: less_SUP_iff)
   4.664 +  by%unimportant (rule borel_measurableI_greater) (simp add: less_SUP_iff)
   4.665  
   4.666 -lemma borel_measurable_INF[measurable (raw)]:
   4.667 +lemma%unimportant borel_measurable_INF[measurable (raw)]:
   4.668    fixes F :: "_ \<Rightarrow> _ \<Rightarrow> _::{complete_linorder, linorder_topology, second_countable_topology}"
   4.669    assumes [simp]: "countable I"
   4.670    assumes [measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> borel_measurable M"
   4.671    shows "(\<lambda>x. INF i:I. F i x) \<in> borel_measurable M"
   4.672    by (rule borel_measurableI_less) (simp add: INF_less_iff)
   4.673  
   4.674 -lemma borel_measurable_cSUP[measurable (raw)]:
   4.675 +lemma%unimportant borel_measurable_cSUP[measurable (raw)]:
   4.676    fixes F :: "_ \<Rightarrow> _ \<Rightarrow> 'a::{conditionally_complete_linorder, linorder_topology, second_countable_topology}"
   4.677    assumes [simp]: "countable I"
   4.678    assumes [measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> borel_measurable M"
   4.679 @@ -846,13 +846,13 @@
   4.680    qed
   4.681  qed
   4.682  
   4.683 -lemma borel_measurable_cINF[measurable (raw)]:
   4.684 +lemma%important borel_measurable_cINF[measurable (raw)]:
   4.685    fixes F :: "_ \<Rightarrow> _ \<Rightarrow> 'a::{conditionally_complete_linorder, linorder_topology, second_countable_topology}"
   4.686    assumes [simp]: "countable I"
   4.687    assumes [measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> borel_measurable M"
   4.688    assumes bdd: "\<And>x. x \<in> space M \<Longrightarrow> bdd_below ((\<lambda>i. F i x) ` I)"
   4.689    shows "(\<lambda>x. INF i:I. F i x) \<in> borel_measurable M"
   4.690 -proof cases
   4.691 +proof%unimportant cases
   4.692    assume "I = {}" then show ?thesis
   4.693      unfolding \<open>I = {}\<close> image_empty by simp
   4.694  next
   4.695 @@ -868,7 +868,7 @@
   4.696    qed
   4.697  qed
   4.698  
   4.699 -lemma borel_measurable_lfp[consumes 1, case_names continuity step]:
   4.700 +lemma%unimportant borel_measurable_lfp[consumes 1, case_names continuity step]:
   4.701    fixes F :: "('a \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b::{complete_linorder, linorder_topology, second_countable_topology})"
   4.702    assumes "sup_continuous F"
   4.703    assumes *: "\<And>f. f \<in> borel_measurable M \<Longrightarrow> F f \<in> borel_measurable M"
   4.704 @@ -885,7 +885,7 @@
   4.705    finally show ?thesis .
   4.706  qed
   4.707  
   4.708 -lemma borel_measurable_gfp[consumes 1, case_names continuity step]:
   4.709 +lemma%unimportant borel_measurable_gfp[consumes 1, case_names continuity step]:
   4.710    fixes F :: "('a \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b::{complete_linorder, linorder_topology, second_countable_topology})"
   4.711    assumes "inf_continuous F"
   4.712    assumes *: "\<And>f. f \<in> borel_measurable M \<Longrightarrow> F f \<in> borel_measurable M"
   4.713 @@ -902,56 +902,56 @@
   4.714    finally show ?thesis .
   4.715  qed
   4.716  
   4.717 -lemma borel_measurable_max[measurable (raw)]:
   4.718 +lemma%unimportant borel_measurable_max[measurable (raw)]:
   4.719    "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> (\<lambda>x. max (g x) (f x) :: 'b::{second_countable_topology, linorder_topology}) \<in> borel_measurable M"
   4.720    by (rule borel_measurableI_less) simp
   4.721  
   4.722 -lemma borel_measurable_min[measurable (raw)]:
   4.723 +lemma%unimportant borel_measurable_min[measurable (raw)]:
   4.724    "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> (\<lambda>x. min (g x) (f x) :: 'b::{second_countable_topology, linorder_topology}) \<in> borel_measurable M"
   4.725    by (rule borel_measurableI_greater) simp
   4.726  
   4.727 -lemma borel_measurable_Min[measurable (raw)]:
   4.728 +lemma%unimportant borel_measurable_Min[measurable (raw)]:
   4.729    "finite I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> f i \<in> borel_measurable M) \<Longrightarrow> (\<lambda>x. Min ((\<lambda>i. f i x)`I) :: 'b::{second_countable_topology, linorder_topology}) \<in> borel_measurable M"
   4.730  proof (induct I rule: finite_induct)
   4.731    case (insert i I) then show ?case
   4.732      by (cases "I = {}") auto
   4.733  qed auto
   4.734  
   4.735 -lemma borel_measurable_Max[measurable (raw)]:
   4.736 +lemma%unimportant borel_measurable_Max[measurable (raw)]:
   4.737    "finite I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> f i \<in> borel_measurable M) \<Longrightarrow> (\<lambda>x. Max ((\<lambda>i. f i x)`I) :: 'b::{second_countable_topology, linorder_topology}) \<in> borel_measurable M"
   4.738  proof (induct I rule: finite_induct)
   4.739    case (insert i I) then show ?case
   4.740      by (cases "I = {}") auto
   4.741  qed auto
   4.742  
   4.743 -lemma borel_measurable_sup[measurable (raw)]:
   4.744 +lemma%unimportant borel_measurable_sup[measurable (raw)]:
   4.745    "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> (\<lambda>x. sup (g x) (f x) :: 'b::{lattice, second_countable_topology, linorder_topology}) \<in> borel_measurable M"
   4.746    unfolding sup_max by measurable
   4.747  
   4.748 -lemma borel_measurable_inf[measurable (raw)]:
   4.749 +lemma%unimportant borel_measurable_inf[measurable (raw)]:
   4.750    "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> (\<lambda>x. inf (g x) (f x) :: 'b::{lattice, second_countable_topology, linorder_topology}) \<in> borel_measurable M"
   4.751    unfolding inf_min by measurable
   4.752  
   4.753 -lemma [measurable (raw)]:
   4.754 +lemma%unimportant [measurable (raw)]:
   4.755    fixes f :: "nat \<Rightarrow> 'a \<Rightarrow> 'b::{complete_linorder, second_countable_topology, linorder_topology}"
   4.756    assumes "\<And>i. f i \<in> borel_measurable M"
   4.757    shows borel_measurable_liminf: "(\<lambda>x. liminf (\<lambda>i. f i x)) \<in> borel_measurable M"
   4.758      and borel_measurable_limsup: "(\<lambda>x. limsup (\<lambda>i. f i x)) \<in> borel_measurable M"
   4.759    unfolding liminf_SUP_INF limsup_INF_SUP using assms by auto
   4.760  
   4.761 -lemma measurable_convergent[measurable (raw)]:
   4.762 +lemma%unimportant measurable_convergent[measurable (raw)]:
   4.763    fixes f :: "nat \<Rightarrow> 'a \<Rightarrow> 'b::{complete_linorder, second_countable_topology, linorder_topology}"
   4.764    assumes [measurable]: "\<And>i. f i \<in> borel_measurable M"
   4.765    shows "Measurable.pred M (\<lambda>x. convergent (\<lambda>i. f i x))"
   4.766    unfolding convergent_ereal by measurable
   4.767  
   4.768 -lemma sets_Collect_convergent[measurable]:
   4.769 +lemma%unimportant sets_Collect_convergent[measurable]:
   4.770    fixes f :: "nat \<Rightarrow> 'a \<Rightarrow> 'b::{complete_linorder, second_countable_topology, linorder_topology}"
   4.771    assumes f[measurable]: "\<And>i. f i \<in> borel_measurable M"
   4.772    shows "{x\<in>space M. convergent (\<lambda>i. f i x)} \<in> sets M"
   4.773    by measurable
   4.774  
   4.775 -lemma borel_measurable_lim[measurable (raw)]:
   4.776 +lemma%unimportant borel_measurable_lim[measurable (raw)]:
   4.777    fixes f :: "nat \<Rightarrow> 'a \<Rightarrow> 'b::{complete_linorder, second_countable_topology, linorder_topology}"
   4.778    assumes [measurable]: "\<And>i. f i \<in> borel_measurable M"
   4.779    shows "(\<lambda>x. lim (\<lambda>i. f i x)) \<in> borel_measurable M"
   4.780 @@ -962,7 +962,7 @@
   4.781      by simp
   4.782  qed
   4.783  
   4.784 -lemma borel_measurable_LIMSEQ_order:
   4.785 +lemma%unimportant borel_measurable_LIMSEQ_order:
   4.786    fixes u :: "nat \<Rightarrow> 'a \<Rightarrow> 'b::{complete_linorder, second_countable_topology, linorder_topology}"
   4.787    assumes u': "\<And>x. x \<in> space M \<Longrightarrow> (\<lambda>i. u i x) \<longlonglongrightarrow> u' x"
   4.788    and u: "\<And>i. u i \<in> borel_measurable M"
   4.789 @@ -973,16 +973,16 @@
   4.790    with u show ?thesis by (simp cong: measurable_cong)
   4.791  qed
   4.792  
   4.793 -subsection \<open>Borel spaces on topological monoids\<close>
   4.794 +subsection%important \<open>Borel spaces on topological monoids\<close>
   4.795  
   4.796 -lemma borel_measurable_add[measurable (raw)]:
   4.797 +lemma%unimportant borel_measurable_add[measurable (raw)]:
   4.798    fixes f g :: "'a \<Rightarrow> 'b::{second_countable_topology, topological_monoid_add}"
   4.799    assumes f: "f \<in> borel_measurable M"
   4.800    assumes g: "g \<in> borel_measurable M"
   4.801    shows "(\<lambda>x. f x + g x) \<in> borel_measurable M"
   4.802    using f g by (rule borel_measurable_continuous_Pair) (intro continuous_intros)
   4.803  
   4.804 -lemma borel_measurable_sum[measurable (raw)]:
   4.805 +lemma%unimportant borel_measurable_sum[measurable (raw)]:
   4.806    fixes f :: "'c \<Rightarrow> 'a \<Rightarrow> 'b::{second_countable_topology, topological_comm_monoid_add}"
   4.807    assumes "\<And>i. i \<in> S \<Longrightarrow> f i \<in> borel_measurable M"
   4.808    shows "(\<lambda>x. \<Sum>i\<in>S. f i x) \<in> borel_measurable M"
   4.809 @@ -991,30 +991,30 @@
   4.810    thus ?thesis using assms by induct auto
   4.811  qed simp
   4.812  
   4.813 -lemma borel_measurable_suminf_order[measurable (raw)]:
   4.814 +lemma%important borel_measurable_suminf_order[measurable (raw)]:
   4.815    fixes f :: "nat \<Rightarrow> 'a \<Rightarrow> 'b::{complete_linorder, second_countable_topology, linorder_topology, topological_comm_monoid_add}"
   4.816    assumes f[measurable]: "\<And>i. f i \<in> borel_measurable M"
   4.817    shows "(\<lambda>x. suminf (\<lambda>i. f i x)) \<in> borel_measurable M"
   4.818    unfolding suminf_def sums_def[abs_def] lim_def[symmetric] by simp
   4.819  
   4.820 -subsection \<open>Borel spaces on Euclidean spaces\<close>
   4.821 +subsection%important \<open>Borel spaces on Euclidean spaces\<close>
   4.822  
   4.823 -lemma borel_measurable_inner[measurable (raw)]:
   4.824 +lemma%important borel_measurable_inner[measurable (raw)]:
   4.825    fixes f g :: "'a \<Rightarrow> 'b::{second_countable_topology, real_inner}"
   4.826    assumes "f \<in> borel_measurable M"
   4.827    assumes "g \<in> borel_measurable M"
   4.828    shows "(\<lambda>x. f x \<bullet> g x) \<in> borel_measurable M"
   4.829    using assms
   4.830 -  by (rule borel_measurable_continuous_Pair) (intro continuous_intros)
   4.831 +  by%unimportant (rule borel_measurable_continuous_Pair) (intro continuous_intros)
   4.832  
   4.833  notation
   4.834    eucl_less (infix "<e" 50)
   4.835  
   4.836 -lemma box_oc: "{x. a <e x \<and> x \<le> b} = {x. a <e x} \<inter> {..b}"
   4.837 +lemma%important box_oc: "{x. a <e x \<and> x \<le> b} = {x. a <e x} \<inter> {..b}"
   4.838    and box_co: "{x. a \<le> x \<and> x <e b} = {a..} \<inter> {x. x <e b}"
   4.839    by auto
   4.840  
   4.841 -lemma eucl_ivals[measurable]:
   4.842 +lemma%important eucl_ivals[measurable]:
   4.843    fixes a b :: "'a::ordered_euclidean_space"
   4.844    shows "{x. x <e a} \<in> sets borel"
   4.845      and "{x. a <e x} \<in> sets borel"
   4.846 @@ -1026,7 +1026,7 @@
   4.847    unfolding box_oc box_co
   4.848    by (auto intro: borel_open borel_closed)
   4.849  
   4.850 -lemma
   4.851 +lemma%unimportant (*FIX ME this has no name *)
   4.852    fixes i :: "'a::{second_countable_topology, real_inner}"
   4.853    shows hafspace_less_borel: "{x. a < x \<bullet> i} \<in> sets borel"
   4.854      and hafspace_greater_borel: "{x. x \<bullet> i < a} \<in> sets borel"
   4.855 @@ -1034,7 +1034,7 @@
   4.856      and hafspace_greater_eq_borel: "{x. x \<bullet> i \<le> a} \<in> sets borel"
   4.857    by simp_all
   4.858  
   4.859 -lemma borel_eq_box:
   4.860 +lemma%unimportant borel_eq_box:
   4.861    "borel = sigma UNIV (range (\<lambda> (a, b). box a b :: 'a :: euclidean_space set))"
   4.862      (is "_ = ?SIGMA")
   4.863  proof (rule borel_eq_sigmaI1[OF borel_def])
   4.864 @@ -1047,7 +1047,7 @@
   4.865      done
   4.866  qed (auto simp: box_def)
   4.867  
   4.868 -lemma halfspace_gt_in_halfspace:
   4.869 +lemma%unimportant halfspace_gt_in_halfspace:
   4.870    assumes i: "i \<in> A"
   4.871    shows "{x::'a. a < x \<bullet> i} \<in>
   4.872      sigma_sets UNIV ((\<lambda> (a, i). {x::'a::euclidean_space. x \<bullet> i < a}) ` (UNIV \<times> A))"
   4.873 @@ -1073,7 +1073,7 @@
   4.874      by (auto intro!: Diff sigma_sets_Inter i)
   4.875  qed
   4.876  
   4.877 -lemma borel_eq_halfspace_less:
   4.878 +lemma%unimportant borel_eq_halfspace_less:
   4.879    "borel = sigma UNIV ((\<lambda>(a, i). {x::'a::euclidean_space. x \<bullet> i < a}) ` (UNIV \<times> Basis))"
   4.880    (is "_ = ?SIGMA")
   4.881  proof (rule borel_eq_sigmaI2[OF borel_eq_box])
   4.882 @@ -1086,7 +1086,7 @@
   4.883    finally show "box a b \<in> sets ?SIGMA" .
   4.884  qed auto
   4.885  
   4.886 -lemma borel_eq_halfspace_le:
   4.887 +lemma%unimportant borel_eq_halfspace_le:
   4.888    "borel = sigma UNIV ((\<lambda> (a, i). {x::'a::euclidean_space. x \<bullet> i \<le> a}) ` (UNIV \<times> Basis))"
   4.889    (is "_ = ?SIGMA")
   4.890  proof (rule borel_eq_sigmaI2[OF borel_eq_halfspace_less])
   4.891 @@ -1110,7 +1110,7 @@
   4.892      by (intro sets.countable_UN) (auto intro: i)
   4.893  qed auto
   4.894  
   4.895 -lemma borel_eq_halfspace_ge:
   4.896 +lemma%unimportant borel_eq_halfspace_ge:
   4.897    "borel = sigma UNIV ((\<lambda> (a, i). {x::'a::euclidean_space. a \<le> x \<bullet> i}) ` (UNIV \<times> Basis))"
   4.898    (is "_ = ?SIGMA")
   4.899  proof (rule borel_eq_sigmaI2[OF borel_eq_halfspace_less])
   4.900 @@ -1120,10 +1120,10 @@
   4.901      using i by (intro sets.compl_sets) auto
   4.902  qed auto
   4.903  
   4.904 -lemma borel_eq_halfspace_greater:
   4.905 +lemma%important borel_eq_halfspace_greater:
   4.906    "borel = sigma UNIV ((\<lambda> (a, i). {x::'a::euclidean_space. a < x \<bullet> i}) ` (UNIV \<times> Basis))"
   4.907    (is "_ = ?SIGMA")
   4.908 -proof (rule borel_eq_sigmaI2[OF borel_eq_halfspace_le])
   4.909 +proof%unimportant (rule borel_eq_sigmaI2[OF borel_eq_halfspace_le])
   4.910    fix a :: real and i :: 'a assume "(a, i) \<in> (UNIV \<times> Basis)"
   4.911    then have i: "i \<in> Basis" by auto
   4.912    have *: "{x::'a. x\<bullet>i \<le> a} = space ?SIGMA - {x::'a. a < x\<bullet>i}" by auto
   4.913 @@ -1131,7 +1131,7 @@
   4.914      by (intro sets.compl_sets) (auto intro: i)
   4.915  qed auto
   4.916  
   4.917 -lemma borel_eq_atMost:
   4.918 +lemma%unimportant borel_eq_atMost:
   4.919    "borel = sigma UNIV (range (\<lambda>a. {..a::'a::ordered_euclidean_space}))"
   4.920    (is "_ = ?SIGMA")
   4.921  proof (rule borel_eq_sigmaI4[OF borel_eq_halfspace_le])
   4.922 @@ -1150,7 +1150,7 @@
   4.923      by (intro sets.countable_UN) auto
   4.924  qed auto
   4.925  
   4.926 -lemma borel_eq_greaterThan:
   4.927 +lemma%unimportant borel_eq_greaterThan:
   4.928    "borel = sigma UNIV (range (\<lambda>a::'a::ordered_euclidean_space. {x. a <e x}))"
   4.929    (is "_ = ?SIGMA")
   4.930  proof (rule borel_eq_sigmaI4[OF borel_eq_halfspace_le])
   4.931 @@ -1177,7 +1177,7 @@
   4.932      done
   4.933  qed auto
   4.934  
   4.935 -lemma borel_eq_lessThan:
   4.936 +lemma%unimportant borel_eq_lessThan:
   4.937    "borel = sigma UNIV (range (\<lambda>a::'a::ordered_euclidean_space. {x. x <e a}))"
   4.938    (is "_ = ?SIGMA")
   4.939  proof (rule borel_eq_sigmaI4[OF borel_eq_halfspace_ge])
   4.940 @@ -1203,10 +1203,10 @@
   4.941      done
   4.942  qed auto
   4.943  
   4.944 -lemma borel_eq_atLeastAtMost:
   4.945 +lemma%important borel_eq_atLeastAtMost:
   4.946    "borel = sigma UNIV (range (\<lambda>(a,b). {a..b} ::'a::ordered_euclidean_space set))"
   4.947    (is "_ = ?SIGMA")
   4.948 -proof (rule borel_eq_sigmaI5[OF borel_eq_atMost])
   4.949 +proof%unimportant (rule borel_eq_sigmaI5[OF borel_eq_atMost])
   4.950    fix a::'a
   4.951    have *: "{..a} = (\<Union>n::nat. {- real n *\<^sub>R One .. a})"
   4.952    proof (safe, simp_all add: eucl_le[where 'a='a])
   4.953 @@ -1225,12 +1225,12 @@
   4.954         (auto intro!: sigma_sets_top)
   4.955  qed auto
   4.956  
   4.957 -lemma borel_set_induct[consumes 1, case_names empty interval compl union]:
   4.958 +lemma%important borel_set_induct[consumes 1, case_names empty interval compl union]:
   4.959    assumes "A \<in> sets borel"
   4.960    assumes empty: "P {}" and int: "\<And>a b. a \<le> b \<Longrightarrow> P {a..b}" and compl: "\<And>A. A \<in> sets borel \<Longrightarrow> P A \<Longrightarrow> P (-A)" and
   4.961            un: "\<And>f. disjoint_family f \<Longrightarrow> (\<And>i. f i \<in> sets borel) \<Longrightarrow>  (\<And>i. P (f i)) \<Longrightarrow> P (\<Union>i::nat. f i)"
   4.962    shows "P (A::real set)"
   4.963 -proof-
   4.964 +proof%unimportant -
   4.965    let ?G = "range (\<lambda>(a,b). {a..b::real})"
   4.966    have "Int_stable ?G" "?G \<subseteq> Pow UNIV" "A \<in> sigma_sets UNIV ?G"
   4.967        using assms(1) by (auto simp add: borel_eq_atLeastAtMost Int_stable_def)
   4.968 @@ -1247,7 +1247,7 @@
   4.969    qed (auto intro: empty compl simp: Compl_eq_Diff_UNIV[symmetric] borel_eq_atLeastAtMost)
   4.970  qed
   4.971  
   4.972 -lemma borel_sigma_sets_Ioc: "borel = sigma UNIV (range (\<lambda>(a, b). {a <.. b::real}))"
   4.973 +lemma%unimportant borel_sigma_sets_Ioc: "borel = sigma UNIV (range (\<lambda>(a, b). {a <.. b::real}))"
   4.974  proof (rule borel_eq_sigmaI5[OF borel_eq_atMost])
   4.975    fix i :: real
   4.976    have "{..i} = (\<Union>j::nat. {-j <.. i})"
   4.977 @@ -1257,10 +1257,10 @@
   4.978    finally show "{..i} \<in> sets (sigma UNIV (range (\<lambda>(i, j). {i<..j})))" .
   4.979  qed simp
   4.980  
   4.981 -lemma eucl_lessThan: "{x::real. x <e a} = lessThan a"
   4.982 +lemma%unimportant eucl_lessThan: "{x::real. x <e a} = lessThan a"
   4.983    by (simp add: eucl_less_def lessThan_def)
   4.984  
   4.985 -lemma borel_eq_atLeastLessThan:
   4.986 +lemma%unimportant borel_eq_atLeastLessThan:
   4.987    "borel = sigma UNIV (range (\<lambda>(a, b). {a ..< b :: real}))" (is "_ = ?SIGMA")
   4.988  proof (rule borel_eq_sigmaI5[OF borel_eq_lessThan])
   4.989    have move_uminus: "\<And>x y::real. -x \<le> y \<longleftrightarrow> -y \<le> x" by auto
   4.990 @@ -1271,7 +1271,7 @@
   4.991      by (auto intro: sigma_sets.intros(2-) simp: eucl_lessThan)
   4.992  qed auto
   4.993  
   4.994 -lemma borel_measurable_halfspacesI:
   4.995 +lemma%unimportant borel_measurable_halfspacesI:
   4.996    fixes f :: "'a \<Rightarrow> 'c::euclidean_space"
   4.997    assumes F: "borel = sigma UNIV (F ` (UNIV \<times> Basis))"
   4.998    and S_eq: "\<And>a i. S a i = f -` F (a,i) \<inter> space M"
   4.999 @@ -1286,112 +1286,112 @@
  4.1000      by (auto intro!: measurable_measure_of simp: S_eq F)
  4.1001  qed
  4.1002  
  4.1003 -lemma borel_measurable_iff_halfspace_le:
  4.1004 +lemma%unimportant borel_measurable_iff_halfspace_le:
  4.1005    fixes f :: "'a \<Rightarrow> 'c::euclidean_space"
  4.1006    shows "f \<in> borel_measurable M = (\<forall>i\<in>Basis. \<forall>a. {w \<in> space M. f w \<bullet> i \<le> a} \<in> sets M)"
  4.1007    by (rule borel_measurable_halfspacesI[OF borel_eq_halfspace_le]) auto
  4.1008  
  4.1009 -lemma borel_measurable_iff_halfspace_less:
  4.1010 +lemma%unimportant borel_measurable_iff_halfspace_less:
  4.1011    fixes f :: "'a \<Rightarrow> 'c::euclidean_space"
  4.1012    shows "f \<in> borel_measurable M \<longleftrightarrow> (\<forall>i\<in>Basis. \<forall>a. {w \<in> space M. f w \<bullet> i < a} \<in> sets M)"
  4.1013    by (rule borel_measurable_halfspacesI[OF borel_eq_halfspace_less]) auto
  4.1014  
  4.1015 -lemma borel_measurable_iff_halfspace_ge:
  4.1016 +lemma%unimportant borel_measurable_iff_halfspace_ge:
  4.1017    fixes f :: "'a \<Rightarrow> 'c::euclidean_space"
  4.1018    shows "f \<in> borel_measurable M = (\<forall>i\<in>Basis. \<forall>a. {w \<in> space M. a \<le> f w \<bullet> i} \<in> sets M)"
  4.1019    by (rule borel_measurable_halfspacesI[OF borel_eq_halfspace_ge]) auto
  4.1020  
  4.1021 -lemma borel_measurable_iff_halfspace_greater:
  4.1022 +lemma%unimportant borel_measurable_iff_halfspace_greater:
  4.1023    fixes f :: "'a \<Rightarrow> 'c::euclidean_space"
  4.1024    shows "f \<in> borel_measurable M \<longleftrightarrow> (\<forall>i\<in>Basis. \<forall>a. {w \<in> space M. a < f w \<bullet> i} \<in> sets M)"
  4.1025    by (rule borel_measurable_halfspacesI[OF borel_eq_halfspace_greater]) auto
  4.1026  
  4.1027 -lemma borel_measurable_iff_le:
  4.1028 +lemma%unimportant borel_measurable_iff_le:
  4.1029    "(f::'a \<Rightarrow> real) \<in> borel_measurable M = (\<forall>a. {w \<in> space M. f w \<le> a} \<in> sets M)"
  4.1030    using borel_measurable_iff_halfspace_le[where 'c=real] by simp
  4.1031  
  4.1032 -lemma borel_measurable_iff_less:
  4.1033 +lemma%unimportant borel_measurable_iff_less:
  4.1034    "(f::'a \<Rightarrow> real) \<in> borel_measurable M = (\<forall>a. {w \<in> space M. f w < a} \<in> sets M)"
  4.1035    using borel_measurable_iff_halfspace_less[where 'c=real] by simp
  4.1036  
  4.1037 -lemma borel_measurable_iff_ge:
  4.1038 +lemma%unimportant borel_measurable_iff_ge:
  4.1039    "(f::'a \<Rightarrow> real) \<in> borel_measurable M = (\<forall>a. {w \<in> space M. a \<le> f w} \<in> sets M)"
  4.1040    using borel_measurable_iff_halfspace_ge[where 'c=real]
  4.1041    by simp
  4.1042  
  4.1043 -lemma borel_measurable_iff_greater:
  4.1044 +lemma%unimportant borel_measurable_iff_greater:
  4.1045    "(f::'a \<Rightarrow> real) \<in> borel_measurable M = (\<forall>a. {w \<in> space M. a < f w} \<in> sets M)"
  4.1046    using borel_measurable_iff_halfspace_greater[where 'c=real] by simp
  4.1047  
  4.1048 -lemma borel_measurable_euclidean_space:
  4.1049 +lemma%important borel_measurable_euclidean_space:
  4.1050    fixes f :: "'a \<Rightarrow> 'c::euclidean_space"
  4.1051    shows "f \<in> borel_measurable M \<longleftrightarrow> (\<forall>i\<in>Basis. (\<lambda>x. f x \<bullet> i) \<in> borel_measurable M)"
  4.1052 -proof safe
  4.1053 +proof%unimportant safe
  4.1054    assume f: "\<forall>i\<in>Basis. (\<lambda>x. f x \<bullet> i) \<in> borel_measurable M"
  4.1055    then show "f \<in> borel_measurable M"
  4.1056      by (subst borel_measurable_iff_halfspace_le) auto
  4.1057  qed auto
  4.1058  
  4.1059 -subsection "Borel measurable operators"
  4.1060 +subsection%important "Borel measurable operators"
  4.1061  
  4.1062 -lemma borel_measurable_norm[measurable]: "norm \<in> borel_measurable borel"
  4.1063 -  by (intro borel_measurable_continuous_on1 continuous_intros)
  4.1064 +lemma%important borel_measurable_norm[measurable]: "norm \<in> borel_measurable borel"
  4.1065 +  by%unimportant (intro borel_measurable_continuous_on1 continuous_intros)
  4.1066  
  4.1067 -lemma borel_measurable_sgn [measurable]: "(sgn::'a::real_normed_vector \<Rightarrow> 'a) \<in> borel_measurable borel"
  4.1068 +lemma%unimportant borel_measurable_sgn [measurable]: "(sgn::'a::real_normed_vector \<Rightarrow> 'a) \<in> borel_measurable borel"
  4.1069    by (rule borel_measurable_continuous_countable_exceptions[where X="{0}"])
  4.1070       (auto intro!: continuous_on_sgn continuous_on_id)
  4.1071  
  4.1072 -lemma borel_measurable_uminus[measurable (raw)]:
  4.1073 +lemma%important borel_measurable_uminus[measurable (raw)]:
  4.1074    fixes g :: "'a \<Rightarrow> 'b::{second_countable_topology, real_normed_vector}"
  4.1075    assumes g: "g \<in> borel_measurable M"
  4.1076    shows "(\<lambda>x. - g x) \<in> borel_measurable M"
  4.1077 -  by (rule borel_measurable_continuous_on[OF _ g]) (intro continuous_intros)
  4.1078 +  by%unimportant (rule borel_measurable_continuous_on[OF _ g]) (intro continuous_intros)
  4.1079  
  4.1080 -lemma borel_measurable_diff[measurable (raw)]:
  4.1081 +lemma%important borel_measurable_diff[measurable (raw)]:
  4.1082    fixes f :: "'a \<Rightarrow> 'b::{second_countable_topology, real_normed_vector}"
  4.1083    assumes f: "f \<in> borel_measurable M"
  4.1084    assumes g: "g \<in> borel_measurable M"
  4.1085    shows "(\<lambda>x. f x - g x) \<in> borel_measurable M"
  4.1086 -  using borel_measurable_add [of f M "- g"] assms by (simp add: fun_Compl_def)
  4.1087 +  using%unimportant borel_measurable_add [of f M "- g"] assms by (simp add: fun_Compl_def)
  4.1088  
  4.1089 -lemma borel_measurable_times[measurable (raw)]:
  4.1090 +lemma%unimportant borel_measurable_times[measurable (raw)]:
  4.1091    fixes f :: "'a \<Rightarrow> 'b::{second_countable_topology, real_normed_algebra}"
  4.1092    assumes f: "f \<in> borel_measurable M"
  4.1093    assumes g: "g \<in> borel_measurable M"
  4.1094    shows "(\<lambda>x. f x * g x) \<in> borel_measurable M"
  4.1095    using f g by (rule borel_measurable_continuous_Pair) (intro continuous_intros)
  4.1096  
  4.1097 -lemma borel_measurable_prod[measurable (raw)]:
  4.1098 +lemma%important borel_measurable_prod[measurable (raw)]:
  4.1099    fixes f :: "'c \<Rightarrow> 'a \<Rightarrow> 'b::{second_countable_topology, real_normed_field}"
  4.1100    assumes "\<And>i. i \<in> S \<Longrightarrow> f i \<in> borel_measurable M"
  4.1101    shows "(\<lambda>x. \<Prod>i\<in>S. f i x) \<in> borel_measurable M"
  4.1102 -proof cases
  4.1103 +proof%unimportant cases
  4.1104    assume "finite S"
  4.1105    thus ?thesis using assms by induct auto
  4.1106  qed simp
  4.1107  
  4.1108 -lemma borel_measurable_dist[measurable (raw)]:
  4.1109 +lemma%important borel_measurable_dist[measurable (raw)]:
  4.1110    fixes g f :: "'a \<Rightarrow> 'b::{second_countable_topology, metric_space}"
  4.1111    assumes f: "f \<in> borel_measurable M"
  4.1112    assumes g: "g \<in> borel_measurable M"
  4.1113    shows "(\<lambda>x. dist (f x) (g x)) \<in> borel_measurable M"
  4.1114 -  using f g by (rule borel_measurable_continuous_Pair) (intro continuous_intros)
  4.1115 +  using%unimportant f g by (rule borel_measurable_continuous_Pair) (intro continuous_intros)
  4.1116  
  4.1117 -lemma borel_measurable_scaleR[measurable (raw)]:
  4.1118 +lemma%unimportant borel_measurable_scaleR[measurable (raw)]:
  4.1119    fixes g :: "'a \<Rightarrow> 'b::{second_countable_topology, real_normed_vector}"
  4.1120    assumes f: "f \<in> borel_measurable M"
  4.1121    assumes g: "g \<in> borel_measurable M"
  4.1122    shows "(\<lambda>x. f x *\<^sub>R g x) \<in> borel_measurable M"
  4.1123    using f g by (rule borel_measurable_continuous_Pair) (intro continuous_intros)
  4.1124  
  4.1125 -lemma borel_measurable_uminus_eq [simp]:
  4.1126 +lemma%unimportant borel_measurable_uminus_eq [simp]:
  4.1127    fixes f :: "'a \<Rightarrow> 'b::{second_countable_topology, real_normed_vector}"
  4.1128    shows "(\<lambda>x. - f x) \<in> borel_measurable M \<longleftrightarrow> f \<in> borel_measurable M" (is "?l = ?r")
  4.1129  proof
  4.1130    assume ?l from borel_measurable_uminus[OF this] show ?r by simp
  4.1131  qed auto
  4.1132  
  4.1133 -lemma affine_borel_measurable_vector:
  4.1134 +lemma%unimportant affine_borel_measurable_vector:
  4.1135    fixes f :: "'a \<Rightarrow> 'x::real_normed_vector"
  4.1136    assumes "f \<in> borel_measurable M"
  4.1137    shows "(\<lambda>x. a + b *\<^sub>R f x) \<in> borel_measurable M"
  4.1138 @@ -1412,15 +1412,15 @@
  4.1139    qed simp
  4.1140  qed
  4.1141  
  4.1142 -lemma borel_measurable_const_scaleR[measurable (raw)]:
  4.1143 +lemma%unimportant borel_measurable_const_scaleR[measurable (raw)]:
  4.1144    "f \<in> borel_measurable M \<Longrightarrow> (\<lambda>x. b *\<^sub>R f x ::'a::real_normed_vector) \<in> borel_measurable M"
  4.1145    using affine_borel_measurable_vector[of f M 0 b] by simp
  4.1146  
  4.1147 -lemma borel_measurable_const_add[measurable (raw)]:
  4.1148 +lemma%unimportant borel_measurable_const_add[measurable (raw)]:
  4.1149    "f \<in> borel_measurable M \<Longrightarrow> (\<lambda>x. a + f x ::'a::real_normed_vector) \<in> borel_measurable M"
  4.1150    using affine_borel_measurable_vector[of f M a 1] by simp
  4.1151  
  4.1152 -lemma borel_measurable_inverse[measurable (raw)]:
  4.1153 +lemma%unimportant borel_measurable_inverse[measurable (raw)]:
  4.1154    fixes f :: "'a \<Rightarrow> 'b::real_normed_div_algebra"
  4.1155    assumes f: "f \<in> borel_measurable M"
  4.1156    shows "(\<lambda>x. inverse (f x)) \<in> borel_measurable M"
  4.1157 @@ -1429,27 +1429,27 @@
  4.1158    apply (auto intro!: continuous_on_inverse continuous_on_id)
  4.1159    done
  4.1160  
  4.1161 -lemma borel_measurable_divide[measurable (raw)]:
  4.1162 +lemma%unimportant borel_measurable_divide[measurable (raw)]:
  4.1163    "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow>
  4.1164      (\<lambda>x. f x / g x::'b::{second_countable_topology, real_normed_div_algebra}) \<in> borel_measurable M"
  4.1165    by (simp add: divide_inverse)
  4.1166  
  4.1167 -lemma borel_measurable_abs[measurable (raw)]:
  4.1168 +lemma%unimportant borel_measurable_abs[measurable (raw)]:
  4.1169    "f \<in> borel_measurable M \<Longrightarrow> (\<lambda>x. \<bar>f x :: real\<bar>) \<in> borel_measurable M"
  4.1170    unfolding abs_real_def by simp
  4.1171  
  4.1172 -lemma borel_measurable_nth[measurable (raw)]:
  4.1173 +lemma%unimportant borel_measurable_nth[measurable (raw)]:
  4.1174    "(\<lambda>x::real^'n. x $ i) \<in> borel_measurable borel"
  4.1175    by (simp add: cart_eq_inner_axis)
  4.1176  
  4.1177 -lemma convex_measurable:
  4.1178 +lemma%important convex_measurable:
  4.1179    fixes A :: "'a :: euclidean_space set"
  4.1180    shows "X \<in> borel_measurable M \<Longrightarrow> X ` space M \<subseteq> A \<Longrightarrow> open A \<Longrightarrow> convex_on A q \<Longrightarrow>
  4.1181      (\<lambda>x. q (X x)) \<in> borel_measurable M"
  4.1182 -  by (rule measurable_compose[where f=X and N="restrict_space borel A"])
  4.1183 +  by%unimportant (rule measurable_compose[where f=X and N="restrict_space borel A"])
  4.1184       (auto intro!: borel_measurable_continuous_on_restrict convex_on_continuous measurable_restrict_space2)
  4.1185  
  4.1186 -lemma borel_measurable_ln[measurable (raw)]:
  4.1187 +lemma%unimportant borel_measurable_ln[measurable (raw)]:
  4.1188    assumes f: "f \<in> borel_measurable M"
  4.1189    shows "(\<lambda>x. ln (f x :: real)) \<in> borel_measurable M"
  4.1190    apply (rule measurable_compose[OF f])
  4.1191 @@ -1457,15 +1457,15 @@
  4.1192    apply (auto intro!: continuous_on_ln continuous_on_id)
  4.1193    done
  4.1194  
  4.1195 -lemma borel_measurable_log[measurable (raw)]:
  4.1196 +lemma%unimportant borel_measurable_log[measurable (raw)]:
  4.1197    "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> (\<lambda>x. log (g x) (f x)) \<in> borel_measurable M"
  4.1198    unfolding log_def by auto
  4.1199  
  4.1200 -lemma borel_measurable_exp[measurable]:
  4.1201 +lemma%unimportant borel_measurable_exp[measurable]:
  4.1202    "(exp::'a::{real_normed_field,banach}\<Rightarrow>'a) \<in> borel_measurable borel"
  4.1203    by (intro borel_measurable_continuous_on1 continuous_at_imp_continuous_on ballI isCont_exp)
  4.1204  
  4.1205 -lemma measurable_real_floor[measurable]:
  4.1206 +lemma%unimportant measurable_real_floor[measurable]:
  4.1207    "(floor :: real \<Rightarrow> int) \<in> measurable borel (count_space UNIV)"
  4.1208  proof -
  4.1209    have "\<And>a x. \<lfloor>x\<rfloor> = a \<longleftrightarrow> (real_of_int a \<le> x \<and> x < real_of_int (a + 1))"
  4.1210 @@ -1474,44 +1474,44 @@
  4.1211      by (auto simp: vimage_def measurable_count_space_eq2_countable)
  4.1212  qed
  4.1213  
  4.1214 -lemma measurable_real_ceiling[measurable]:
  4.1215 +lemma%unimportant measurable_real_ceiling[measurable]:
  4.1216    "(ceiling :: real \<Rightarrow> int) \<in> measurable borel (count_space UNIV)"
  4.1217    unfolding ceiling_def[abs_def] by simp
  4.1218  
  4.1219 -lemma borel_measurable_real_floor: "(\<lambda>x::real. real_of_int \<lfloor>x\<rfloor>) \<in> borel_measurable borel"
  4.1220 +lemma%unimportant borel_measurable_real_floor: "(\<lambda>x::real. real_of_int \<lfloor>x\<rfloor>) \<in> borel_measurable borel"
  4.1221    by simp
  4.1222  
  4.1223 -lemma borel_measurable_root [measurable]: "root n \<in> borel_measurable borel"
  4.1224 +lemma%unimportant borel_measurable_root [measurable]: "root n \<in> borel_measurable borel"
  4.1225    by (intro borel_measurable_continuous_on1 continuous_intros)
  4.1226  
  4.1227 -lemma borel_measurable_sqrt [measurable]: "sqrt \<in> borel_measurable borel"
  4.1228 +lemma%unimportant borel_measurable_sqrt [measurable]: "sqrt \<in> borel_measurable borel"
  4.1229    by (intro borel_measurable_continuous_on1 continuous_intros)
  4.1230  
  4.1231 -lemma borel_measurable_power [measurable (raw)]:
  4.1232 +lemma%unimportant borel_measurable_power [measurable (raw)]:
  4.1233    fixes f :: "_ \<Rightarrow> 'b::{power,real_normed_algebra}"
  4.1234    assumes f: "f \<in> borel_measurable M"
  4.1235    shows "(\<lambda>x. (f x) ^ n) \<in> borel_measurable M"
  4.1236    by (intro borel_measurable_continuous_on [OF _ f] continuous_intros)
  4.1237  
  4.1238 -lemma borel_measurable_Re [measurable]: "Re \<in> borel_measurable borel"
  4.1239 +lemma%unimportant borel_measurable_Re [measurable]: "Re \<in> borel_measurable borel"
  4.1240    by (intro borel_measurable_continuous_on1 continuous_intros)
  4.1241  
  4.1242 -lemma borel_measurable_Im [measurable]: "Im \<in> borel_measurable borel"
  4.1243 +lemma%unimportant borel_measurable_Im [measurable]: "Im \<in> borel_measurable borel"
  4.1244    by (intro borel_measurable_continuous_on1 continuous_intros)
  4.1245  
  4.1246 -lemma borel_measurable_of_real [measurable]: "(of_real :: _ \<Rightarrow> (_::real_normed_algebra)) \<in> borel_measurable borel"
  4.1247 +lemma%unimportant borel_measurable_of_real [measurable]: "(of_real :: _ \<Rightarrow> (_::real_normed_algebra)) \<in> borel_measurable borel"
  4.1248    by (intro borel_measurable_continuous_on1 continuous_intros)
  4.1249  
  4.1250 -lemma borel_measurable_sin [measurable]: "(sin :: _ \<Rightarrow> (_::{real_normed_field,banach})) \<in> borel_measurable borel"
  4.1251 +lemma%unimportant borel_measurable_sin [measurable]: "(sin :: _ \<Rightarrow> (_::{real_normed_field,banach})) \<in> borel_measurable borel"
  4.1252    by (intro borel_measurable_continuous_on1 continuous_intros)
  4.1253  
  4.1254 -lemma borel_measurable_cos [measurable]: "(cos :: _ \<Rightarrow> (_::{real_normed_field,banach})) \<in> borel_measurable borel"
  4.1255 +lemma%unimportant borel_measurable_cos [measurable]: "(cos :: _ \<Rightarrow> (_::{real_normed_field,banach})) \<in> borel_measurable borel"
  4.1256    by (intro borel_measurable_continuous_on1 continuous_intros)
  4.1257  
  4.1258 -lemma borel_measurable_arctan [measurable]: "arctan \<in> borel_measurable borel"
  4.1259 +lemma%unimportant borel_measurable_arctan [measurable]: "arctan \<in> borel_measurable borel"
  4.1260    by (intro borel_measurable_continuous_on1 continuous_intros)
  4.1261  
  4.1262 -lemma borel_measurable_complex_iff:
  4.1263 +lemma%important borel_measurable_complex_iff:
  4.1264    "f \<in> borel_measurable M \<longleftrightarrow>
  4.1265      (\<lambda>x. Re (f x)) \<in> borel_measurable M \<and> (\<lambda>x. Im (f x)) \<in> borel_measurable M"
  4.1266    apply auto
  4.1267 @@ -1520,21 +1520,21 @@
  4.1268    apply auto
  4.1269    done
  4.1270  
  4.1271 -lemma powr_real_measurable [measurable]:
  4.1272 +lemma%important powr_real_measurable [measurable]:
  4.1273    assumes "f \<in> measurable M borel" "g \<in> measurable M borel"
  4.1274    shows   "(\<lambda>x. f x powr g x :: real) \<in> measurable M borel"
  4.1275 -  using assms by (simp_all add: powr_def)
  4.1276 +  using%unimportant assms by (simp_all add: powr_def)
  4.1277  
  4.1278 -lemma measurable_of_bool[measurable]: "of_bool \<in> count_space UNIV \<rightarrow>\<^sub>M borel"
  4.1279 +lemma%unimportant measurable_of_bool[measurable]: "of_bool \<in> count_space UNIV \<rightarrow>\<^sub>M borel"
  4.1280    by simp
  4.1281  
  4.1282 -subsection "Borel space on the extended reals"
  4.1283 +subsection%important "Borel space on the extended reals"
  4.1284  
  4.1285 -lemma borel_measurable_ereal[measurable (raw)]:
  4.1286 +lemma%unimportant borel_measurable_ereal[measurable (raw)]:
  4.1287    assumes f: "f \<in> borel_measurable M" shows "(\<lambda>x. ereal (f x)) \<in> borel_measurable M"
  4.1288    using continuous_on_ereal f by (rule borel_measurable_continuous_on) (rule continuous_on_id)
  4.1289  
  4.1290 -lemma borel_measurable_real_of_ereal[measurable (raw)]:
  4.1291 +lemma%unimportant borel_measurable_real_of_ereal[measurable (raw)]:
  4.1292    fixes f :: "'a \<Rightarrow> ereal"
  4.1293    assumes f: "f \<in> borel_measurable M"
  4.1294    shows "(\<lambda>x. real_of_ereal (f x)) \<in> borel_measurable M"
  4.1295 @@ -1543,7 +1543,7 @@
  4.1296    apply (auto intro: continuous_on_real simp: Compl_eq_Diff_UNIV)
  4.1297    done
  4.1298  
  4.1299 -lemma borel_measurable_ereal_cases:
  4.1300 +lemma%unimportant borel_measurable_ereal_cases:
  4.1301    fixes f :: "'a \<Rightarrow> ereal"
  4.1302    assumes f: "f \<in> borel_measurable M"
  4.1303    assumes H: "(\<lambda>x. H (ereal (real_of_ereal (f x)))) \<in> borel_measurable M"
  4.1304 @@ -1554,20 +1554,20 @@
  4.1305    with f H show ?thesis by simp
  4.1306  qed
  4.1307  
  4.1308 -lemma
  4.1309 +lemma%unimportant (*FIX ME needs a name *)
  4.1310    fixes f :: "'a \<Rightarrow> ereal" assumes f[measurable]: "f \<in> borel_measurable M"
  4.1311    shows borel_measurable_ereal_abs[measurable(raw)]: "(\<lambda>x. \<bar>f x\<bar>) \<in> borel_measurable M"
  4.1312      and borel_measurable_ereal_inverse[measurable(raw)]: "(\<lambda>x. inverse (f x) :: ereal) \<in> borel_measurable M"
  4.1313      and borel_measurable_uminus_ereal[measurable(raw)]: "(\<lambda>x. - f x :: ereal) \<in> borel_measurable M"
  4.1314    by (auto simp del: abs_real_of_ereal simp: borel_measurable_ereal_cases[OF f] measurable_If)
  4.1315  
  4.1316 -lemma borel_measurable_uminus_eq_ereal[simp]:
  4.1317 +lemma%unimportant borel_measurable_uminus_eq_ereal[simp]:
  4.1318    "(\<lambda>x. - f x :: ereal) \<in> borel_measurable M \<longleftrightarrow> f \<in> borel_measurable M" (is "?l = ?r")
  4.1319  proof
  4.1320    assume ?l from borel_measurable_uminus_ereal[OF this] show ?r by simp
  4.1321  qed auto
  4.1322  
  4.1323 -lemma set_Collect_ereal2:
  4.1324 +lemma%important set_Collect_ereal2:
  4.1325    fixes f g :: "'a \<Rightarrow> ereal"
  4.1326    assumes f: "f \<in> borel_measurable M"
  4.1327    assumes g: "g \<in> borel_measurable M"
  4.1328 @@ -1577,7 +1577,7 @@
  4.1329      "{x \<in> space borel. H (ereal x) (-\<infinity>)} \<in> sets borel"
  4.1330      "{x \<in> space borel. H (ereal x) (\<infinity>)} \<in> sets borel"
  4.1331    shows "{x \<in> space M. H (f x) (g x)} \<in> sets M"
  4.1332 -proof -
  4.1333 +proof%unimportant -
  4.1334    let ?G = "\<lambda>y x. if g x = \<infinity> then H y \<infinity> else if g x = -\<infinity> then H y (-\<infinity>) else H y (ereal (real_of_ereal (g x)))"
  4.1335    let ?F = "\<lambda>x. if f x = \<infinity> then ?G \<infinity> x else if f x = -\<infinity> then ?G (-\<infinity>) x else ?G (ereal (real_of_ereal (f x))) x"
  4.1336    { fix x have "H (f x) (g x) = ?F x" by (cases "f x" "g x" rule: ereal2_cases) auto }
  4.1337 @@ -1586,7 +1586,7 @@
  4.1338      by (subst *) (simp del: space_borel split del: if_split)
  4.1339  qed
  4.1340  
  4.1341 -lemma borel_measurable_ereal_iff:
  4.1342 +lemma%unimportant borel_measurable_ereal_iff:
  4.1343    shows "(\<lambda>x. ereal (f x)) \<in> borel_measurable M \<longleftrightarrow> f \<in> borel_measurable M"
  4.1344  proof
  4.1345    assume "(\<lambda>x. ereal (f x)) \<in> borel_measurable M"
  4.1346 @@ -1594,15 +1594,15 @@
  4.1347    show "f \<in> borel_measurable M" by auto
  4.1348  qed auto
  4.1349  
  4.1350 -lemma borel_measurable_erealD[measurable_dest]:
  4.1351 +lemma%unimportant borel_measurable_erealD[measurable_dest]:
  4.1352    "(\<lambda>x. ereal (f x)) \<in> borel_measurable M \<Longrightarrow> g \<in> measurable N M \<Longrightarrow> (\<lambda>x. f (g x)) \<in> borel_measurable N"
  4.1353    unfolding borel_measurable_ereal_iff by simp
  4.1354  
  4.1355 -lemma borel_measurable_ereal_iff_real:
  4.1356 +lemma%important borel_measurable_ereal_iff_real:
  4.1357    fixes f :: "'a \<Rightarrow> ereal"
  4.1358    shows "f \<in> borel_measurable M \<longleftrightarrow>
  4.1359      ((\<lambda>x. real_of_ereal (f x)) \<in> borel_measurable M \<and> f -` {\<infinity>} \<inter> space M \<in> sets M \<and> f -` {-\<infinity>} \<inter> space M \<in> sets M)"
  4.1360 -proof safe
  4.1361 +proof%unimportant safe
  4.1362    assume *: "(\<lambda>x. real_of_ereal (f x)) \<in> borel_measurable M" "f -` {\<infinity>} \<inter> space M \<in> sets M" "f -` {-\<infinity>} \<inter> space M \<in> sets M"
  4.1363    have "f -` {\<infinity>} \<inter> space M = {x\<in>space M. f x = \<infinity>}" "f -` {-\<infinity>} \<inter> space M = {x\<in>space M. f x = -\<infinity>}" by auto
  4.1364    with * have **: "{x\<in>space M. f x = \<infinity>} \<in> sets M" "{x\<in>space M. f x = -\<infinity>} \<in> sets M" by simp_all
  4.1365 @@ -1612,15 +1612,15 @@
  4.1366    finally show "f \<in> borel_measurable M" .
  4.1367  qed simp_all
  4.1368  
  4.1369 -lemma borel_measurable_ereal_iff_Iio:
  4.1370 +lemma%unimportant borel_measurable_ereal_iff_Iio:
  4.1371    "(f::'a \<Rightarrow> ereal) \<in> borel_measurable M \<longleftrightarrow> (\<forall>a. f -` {..< a} \<inter> space M \<in> sets M)"
  4.1372    by (auto simp: borel_Iio measurable_iff_measure_of)
  4.1373  
  4.1374 -lemma borel_measurable_ereal_iff_Ioi:
  4.1375 +lemma%unimportant borel_measurable_ereal_iff_Ioi:
  4.1376    "(f::'a \<Rightarrow> ereal) \<in> borel_measurable M \<longleftrightarrow> (\<forall>a. f -` {a <..} \<inter> space M \<in> sets M)"
  4.1377    by (auto simp: borel_Ioi measurable_iff_measure_of)
  4.1378  
  4.1379 -lemma vimage_sets_compl_iff:
  4.1380 +lemma%unimportant vimage_sets_compl_iff:
  4.1381    "f -` A \<inter> space M \<in> sets M \<longleftrightarrow> f -` (- A) \<inter> space M \<in> sets M"
  4.1382  proof -
  4.1383    { fix A assume "f -` A \<inter> space M \<in> sets M"
  4.1384 @@ -1630,15 +1630,15 @@
  4.1385      by (metis double_complement)
  4.1386  qed
  4.1387  
  4.1388 -lemma borel_measurable_iff_Iic_ereal:
  4.1389 +lemma%unimportant borel_measurable_iff_Iic_ereal:
  4.1390    "(f::'a\<Rightarrow>ereal) \<in> borel_measurable M \<longleftrightarrow> (\<forall>a. f -` {..a} \<inter> space M \<in> sets M)"
  4.1391    unfolding borel_measurable_ereal_iff_Ioi vimage_sets_compl_iff[where A="{a <..}" for a] by simp
  4.1392  
  4.1393 -lemma borel_measurable_iff_Ici_ereal:
  4.1394 +lemma%unimportant borel_measurable_iff_Ici_ereal:
  4.1395    "(f::'a \<Rightarrow> ereal) \<in> borel_measurable M \<longleftrightarrow> (\<forall>a. f -` {a..} \<inter> space M \<in> sets M)"
  4.1396    unfolding borel_measurable_ereal_iff_Iio vimage_sets_compl_iff[where A="{..< a}" for a] by simp
  4.1397  
  4.1398 -lemma borel_measurable_ereal2:
  4.1399 +lemma%important borel_measurable_ereal2:
  4.1400    fixes f g :: "'a \<Rightarrow> ereal"
  4.1401    assumes f: "f \<in> borel_measurable M"
  4.1402    assumes g: "g \<in> borel_measurable M"
  4.1403 @@ -1648,7 +1648,7 @@
  4.1404      "(\<lambda>x. H (ereal (real_of_ereal (f x))) (-\<infinity>)) \<in> borel_measurable M"
  4.1405      "(\<lambda>x. H (ereal (real_of_ereal (f x))) (\<infinity>)) \<in> borel_measurable M"
  4.1406    shows "(\<lambda>x. H (f x) (g x)) \<in> borel_measurable M"
  4.1407 -proof -
  4.1408 +proof%unimportant -
  4.1409    let ?G = "\<lambda>y x. if g x = \<infinity> then H y \<infinity> else if g x = - \<infinity> then H y (-\<infinity>) else H y (ereal (real_of_ereal (g x)))"
  4.1410    let ?F = "\<lambda>x. if f x = \<infinity> then ?G \<infinity> x else if f x = - \<infinity> then ?G (-\<infinity>) x else ?G (ereal (real_of_ereal (f x))) x"
  4.1411    { fix x have "H (f x) (g x) = ?F x" by (cases "f x" "g x" rule: ereal2_cases) auto }
  4.1412 @@ -1656,14 +1656,14 @@
  4.1413    from assms show ?thesis unfolding * by simp
  4.1414  qed
  4.1415  
  4.1416 -lemma [measurable(raw)]:
  4.1417 +lemma%unimportant [measurable(raw)]:
  4.1418    fixes f :: "'a \<Rightarrow> ereal"
  4.1419    assumes [measurable]: "f \<in> borel_measurable M" "g \<in> borel_measurable M"
  4.1420    shows borel_measurable_ereal_add: "(\<lambda>x. f x + g x) \<in> borel_measurable M"
  4.1421      and borel_measurable_ereal_times: "(\<lambda>x. f x * g x) \<in> borel_measurable M"
  4.1422    by (simp_all add: borel_measurable_ereal2)
  4.1423  
  4.1424 -lemma [measurable(raw)]:
  4.1425 +lemma%unimportant [measurable(raw)]:
  4.1426    fixes f g :: "'a \<Rightarrow> ereal"
  4.1427    assumes "f \<in> borel_measurable M"
  4.1428    assumes "g \<in> borel_measurable M"
  4.1429 @@ -1671,42 +1671,42 @@
  4.1430      and borel_measurable_ereal_divide: "(\<lambda>x. f x / g x) \<in> borel_measurable M"
  4.1431    using assms by (simp_all add: minus_ereal_def divide_ereal_def)
  4.1432  
  4.1433 -lemma borel_measurable_ereal_sum[measurable (raw)]:
  4.1434 +lemma%unimportant borel_measurable_ereal_sum[measurable (raw)]:
  4.1435    fixes f :: "'c \<Rightarrow> 'a \<Rightarrow> ereal"
  4.1436    assumes "\<And>i. i \<in> S \<Longrightarrow> f i \<in> borel_measurable M"
  4.1437    shows "(\<lambda>x. \<Sum>i\<in>S. f i x) \<in> borel_measurable M"
  4.1438    using assms by (induction S rule: infinite_finite_induct) auto
  4.1439  
  4.1440 -lemma borel_measurable_ereal_prod[measurable (raw)]:
  4.1441 +lemma%unimportant borel_measurable_ereal_prod[measurable (raw)]:
  4.1442    fixes f :: "'c \<Rightarrow> 'a \<Rightarrow> ereal"
  4.1443    assumes "\<And>i. i \<in> S \<Longrightarrow> f i \<in> borel_measurable M"
  4.1444    shows "(\<lambda>x. \<Prod>i\<in>S. f i x) \<in> borel_measurable M"
  4.1445    using assms by (induction S rule: infinite_finite_induct) auto
  4.1446  
  4.1447 -lemma borel_measurable_extreal_suminf[measurable (raw)]:
  4.1448 +lemma%unimportant borel_measurable_extreal_suminf[measurable (raw)]:
  4.1449    fixes f :: "nat \<Rightarrow> 'a \<Rightarrow> ereal"
  4.1450    assumes [measurable]: "\<And>i. f i \<in> borel_measurable M"
  4.1451    shows "(\<lambda>x. (\<Sum>i. f i x)) \<in> borel_measurable M"
  4.1452    unfolding suminf_def sums_def[abs_def] lim_def[symmetric] by simp
  4.1453  
  4.1454 -subsection "Borel space on the extended non-negative reals"
  4.1455 +subsection%important "Borel space on the extended non-negative reals"
  4.1456  
  4.1457  text \<open> @{type ennreal} is a topological monoid, so no rules for plus are required, also all order
  4.1458    statements are usually done on type classes. \<close>
  4.1459  
  4.1460 -lemma measurable_enn2ereal[measurable]: "enn2ereal \<in> borel \<rightarrow>\<^sub>M borel"
  4.1461 +lemma%unimportant measurable_enn2ereal[measurable]: "enn2ereal \<in> borel \<rightarrow>\<^sub>M borel"
  4.1462    by (intro borel_measurable_continuous_on1 continuous_on_enn2ereal)
  4.1463  
  4.1464 -lemma measurable_e2ennreal[measurable]: "e2ennreal \<in> borel \<rightarrow>\<^sub>M borel"
  4.1465 +lemma%unimportant measurable_e2ennreal[measurable]: "e2ennreal \<in> borel \<rightarrow>\<^sub>M borel"
  4.1466    by (intro borel_measurable_continuous_on1 continuous_on_e2ennreal)
  4.1467  
  4.1468 -lemma borel_measurable_enn2real[measurable (raw)]:
  4.1469 +lemma%unimportant borel_measurable_enn2real[measurable (raw)]:
  4.1470    "f \<in> M \<rightarrow>\<^sub>M borel \<Longrightarrow> (\<lambda>x. enn2real (f x)) \<in> M \<rightarrow>\<^sub>M borel"
  4.1471    unfolding enn2real_def[abs_def] by measurable
  4.1472  
  4.1473 -definition [simp]: "is_borel f M \<longleftrightarrow> f \<in> borel_measurable M"
  4.1474 +definition%important [simp]: "is_borel f M \<longleftrightarrow> f \<in> borel_measurable M"
  4.1475  
  4.1476 -lemma is_borel_transfer[transfer_rule]: "rel_fun (rel_fun (=) pcr_ennreal) (=) is_borel is_borel"
  4.1477 +lemma%unimportant is_borel_transfer[transfer_rule]: "rel_fun (rel_fun (=) pcr_ennreal) (=) is_borel is_borel"
  4.1478    unfolding is_borel_def[abs_def]
  4.1479  proof (safe intro!: rel_funI ext dest!: rel_fun_eq_pcr_ennreal[THEN iffD1])
  4.1480    fix f and M :: "'a measure"
  4.1481 @@ -1718,14 +1718,14 @@
  4.1482    includes ennreal.lifting
  4.1483  begin
  4.1484  
  4.1485 -lemma measurable_ennreal[measurable]: "ennreal \<in> borel \<rightarrow>\<^sub>M borel"
  4.1486 +lemma%unimportant measurable_ennreal[measurable]: "ennreal \<in> borel \<rightarrow>\<^sub>M borel"
  4.1487    unfolding is_borel_def[symmetric]
  4.1488    by transfer simp
  4.1489  
  4.1490 -lemma borel_measurable_ennreal_iff[simp]:
  4.1491 +lemma%important borel_measurable_ennreal_iff[simp]:
  4.1492    assumes [simp]: "\<And>x. x \<in> space M \<Longrightarrow> 0 \<le> f x"
  4.1493    shows "(\<lambda>x. ennreal (f x)) \<in> M \<rightarrow>\<^sub>M borel \<longleftrightarrow> f \<in> M \<rightarrow>\<^sub>M borel"
  4.1494 -proof safe
  4.1495 +proof%unimportant safe
  4.1496    assume "(\<lambda>x. ennreal (f x)) \<in> M \<rightarrow>\<^sub>M borel"
  4.1497    then have "(\<lambda>x. enn2real (ennreal (f x))) \<in> M \<rightarrow>\<^sub>M borel"
  4.1498      by measurable
  4.1499 @@ -1733,44 +1733,44 @@
  4.1500      by (rule measurable_cong[THEN iffD1, rotated]) auto
  4.1501  qed measurable
  4.1502  
  4.1503 -lemma borel_measurable_times_ennreal[measurable (raw)]:
  4.1504 +lemma%unimportant borel_measurable_times_ennreal[measurable (raw)]:
  4.1505    fixes f g :: "'a \<Rightarrow> ennreal"
  4.1506    shows "f \<in> M \<rightarrow>\<^sub>M borel \<Longrightarrow> g \<in> M \<rightarrow>\<^sub>M borel \<Longrightarrow> (\<lambda>x. f x * g x) \<in> M \<rightarrow>\<^sub>M borel"
  4.1507    unfolding is_borel_def[symmetric] by transfer simp
  4.1508  
  4.1509 -lemma borel_measurable_inverse_ennreal[measurable (raw)]:
  4.1510 +lemma%unimportant borel_measurable_inverse_ennreal[measurable (raw)]:
  4.1511    fixes f :: "'a \<Rightarrow> ennreal"
  4.1512    shows "f \<in> M \<rightarrow>\<^sub>M borel \<Longrightarrow> (\<lambda>x. inverse (f x)) \<in> M \<rightarrow>\<^sub>M borel"
  4.1513    unfolding is_borel_def[symmetric] by transfer simp
  4.1514  
  4.1515 -lemma borel_measurable_divide_ennreal[measurable (raw)]:
  4.1516 +lemma%unimportant borel_measurable_divide_ennreal[measurable (raw)]:
  4.1517    fixes f :: "'a \<Rightarrow> ennreal"
  4.1518    shows "f \<in> M \<rightarrow>\<^sub>M borel \<Longrightarrow> g \<in> M \<rightarrow>\<^sub>M borel \<Longrightarrow> (\<lambda>x. f x / g x) \<in> M \<rightarrow>\<^sub>M borel"
  4.1519    unfolding divide_ennreal_def by simp
  4.1520  
  4.1521 -lemma borel_measurable_minus_ennreal[measurable (raw)]:
  4.1522 +lemma%unimportant borel_measurable_minus_ennreal[measurable (raw)]:
  4.1523    fixes f :: "'a \<Rightarrow> ennreal"
  4.1524    shows "f \<in> M \<rightarrow>\<^sub>M borel \<Longrightarrow> g \<in> M \<rightarrow>\<^sub>M borel \<Longrightarrow> (\<lambda>x. f x - g x) \<in> M \<rightarrow>\<^sub>M borel"
  4.1525    unfolding is_borel_def[symmetric] by transfer simp
  4.1526  
  4.1527 -lemma borel_measurable_prod_ennreal[measurable (raw)]:
  4.1528 +lemma%important borel_measurable_prod_ennreal[measurable (raw)]:
  4.1529    fixes f :: "'c \<Rightarrow> 'a \<Rightarrow> ennreal"
  4.1530    assumes "\<And>i. i \<in> S \<Longrightarrow> f i \<in> borel_measurable M"
  4.1531    shows "(\<lambda>x. \<Prod>i\<in>S. f i x) \<in> borel_measurable M"
  4.1532 -  using assms by (induction S rule: infinite_finite_induct) auto
  4.1533 +  using%unimportant assms by (induction S rule: infinite_finite_induct) auto
  4.1534  
  4.1535  end
  4.1536  
  4.1537  hide_const (open) is_borel
  4.1538  
  4.1539 -subsection \<open>LIMSEQ is borel measurable\<close>
  4.1540 +subsection%important \<open>LIMSEQ is borel measurable\<close>
  4.1541  
  4.1542 -lemma borel_measurable_LIMSEQ_real:
  4.1543 +lemma%important borel_measurable_LIMSEQ_real:
  4.1544    fixes u :: "nat \<Rightarrow> 'a \<Rightarrow> real"
  4.1545    assumes u': "\<And>x. x \<in> space M \<Longrightarrow> (\<lambda>i. u i x) \<longlonglongrightarrow> u' x"
  4.1546    and u: "\<And>i. u i \<in> borel_measurable M"
  4.1547    shows "u' \<in> borel_measurable M"
  4.1548 -proof -
  4.1549 +proof%unimportant -
  4.1550    have "\<And>x. x \<in> space M \<Longrightarrow> liminf (\<lambda>n. ereal (u n x)) = ereal (u' x)"
  4.1551      using u' by (simp add: lim_imp_Liminf)
  4.1552    moreover from u have "(\<lambda>x. liminf (\<lambda>n. ereal (u n x))) \<in> borel_measurable M"
  4.1553 @@ -1778,13 +1778,13 @@
  4.1554    ultimately show ?thesis by (simp cong: measurable_cong add: borel_measurable_ereal_iff)
  4.1555  qed
  4.1556  
  4.1557 -lemma borel_measurable_LIMSEQ_metric:
  4.1558 +lemma%important borel_measurable_LIMSEQ_metric:
  4.1559    fixes f :: "nat \<Rightarrow> 'a \<Rightarrow> 'b :: metric_space"
  4.1560    assumes [measurable]: "\<And>i. f i \<in> borel_measurable M"
  4.1561    assumes lim: "\<And>x. x \<in> space M \<Longrightarrow> (\<lambda>i. f i x) \<longlonglongrightarrow> g x"
  4.1562    shows "g \<in> borel_measurable M"
  4.1563    unfolding borel_eq_closed
  4.1564 -proof (safe intro!: measurable_measure_of)
  4.1565 +proof%unimportant (safe intro!: measurable_measure_of)
  4.1566    fix A :: "'b set" assume "closed A"
  4.1567  
  4.1568    have [measurable]: "(\<lambda>x. infdist (g x) A) \<in> borel_measurable M"
  4.1569 @@ -1809,13 +1809,13 @@
  4.1570    qed simp
  4.1571  qed auto
  4.1572  
  4.1573 -lemma sets_Collect_Cauchy[measurable]:
  4.1574 +lemma%important sets_Collect_Cauchy[measurable]:
  4.1575    fixes f :: "nat \<Rightarrow> 'a => 'b::{metric_space, second_countable_topology}"
  4.1576    assumes f[measurable]: "\<And>i. f i \<in> borel_measurable M"
  4.1577    shows "{x\<in>space M. Cauchy (\<lambda>i. f i x)} \<in> sets M"
  4.1578    unfolding metric_Cauchy_iff2 using f by auto
  4.1579  
  4.1580 -lemma borel_measurable_lim_metric[measurable (raw)]:
  4.1581 +lemma%unimportant borel_measurable_lim_metric[measurable (raw)]:
  4.1582    fixes f :: "nat \<Rightarrow> 'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  4.1583    assumes f[measurable]: "\<And>i. f i \<in> borel_measurable M"
  4.1584    shows "(\<lambda>x. lim (\<lambda>i. f i x)) \<in> borel_measurable M"
  4.1585 @@ -1837,17 +1837,17 @@
  4.1586      unfolding * by measurable
  4.1587  qed
  4.1588  
  4.1589 -lemma borel_measurable_suminf[measurable (raw)]:
  4.1590 +lemma%unimportant borel_measurable_suminf[measurable (raw)]:
  4.1591    fixes f :: "nat \<Rightarrow> 'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  4.1592    assumes f[measurable]: "\<And>i. f i \<in> borel_measurable M"
  4.1593    shows "(\<lambda>x. suminf (\<lambda>i. f i x)) \<in> borel_measurable M"
  4.1594    unfolding suminf_def sums_def[abs_def] lim_def[symmetric] by simp
  4.1595  
  4.1596 -lemma Collect_closed_imp_pred_borel: "closed {x. P x} \<Longrightarrow> Measurable.pred borel P"
  4.1597 +lemma%unimportant Collect_closed_imp_pred_borel: "closed {x. P x} \<Longrightarrow> Measurable.pred borel P"
  4.1598    by (simp add: pred_def)
  4.1599  
  4.1600  (* Proof by Jeremy Avigad and Luke Serafin *)
  4.1601 -lemma isCont_borel_pred[measurable]:
  4.1602 +lemma%unimportant isCont_borel_pred[measurable]:
  4.1603    fixes f :: "'b::metric_space \<Rightarrow> 'a::metric_space"
  4.1604    shows "Measurable.pred borel (isCont f)"
  4.1605  proof (subst measurable_cong)
  4.1606 @@ -1898,21 +1898,21 @@
  4.1607  qed (intro pred_intros_countable closed_Collect_all closed_Collect_le open_Collect_less
  4.1608             Collect_closed_imp_pred_borel closed_Collect_imp open_Collect_conj continuous_intros)
  4.1609  
  4.1610 -lemma isCont_borel:
  4.1611 +lemma%unimportant isCont_borel:
  4.1612    fixes f :: "'b::metric_space \<Rightarrow> 'a::metric_space"
  4.1613    shows "{x. isCont f x} \<in> sets borel"
  4.1614    by simp
  4.1615  
  4.1616 -lemma is_real_interval:
  4.1617 +lemma%important is_real_interval:
  4.1618    assumes S: "is_interval S"
  4.1619    shows "\<exists>a b::real. S = {} \<or> S = UNIV \<or> S = {..<b} \<or> S = {..b} \<or> S = {a<..} \<or> S = {a..} \<or>
  4.1620      S = {a<..<b} \<or> S = {a<..b} \<or> S = {a..<b} \<or> S = {a..b}"
  4.1621    using S unfolding is_interval_1 by (blast intro: interval_cases)
  4.1622  
  4.1623 -lemma real_interval_borel_measurable:
  4.1624 +lemma%important real_interval_borel_measurable:
  4.1625    assumes "is_interval (S::real set)"
  4.1626    shows "S \<in> sets borel"
  4.1627 -proof -
  4.1628 +proof%unimportant -
  4.1629    from assms is_real_interval have "\<exists>a b::real. S = {} \<or> S = UNIV \<or> S = {..<b} \<or> S = {..b} \<or>
  4.1630      S = {a<..} \<or> S = {a..} \<or> S = {a<..<b} \<or> S = {a<..b} \<or> S = {a..<b} \<or> S = {a..b}" by auto
  4.1631    then guess a ..
  4.1632 @@ -1924,7 +1924,7 @@
  4.1633  text \<open>The next lemmas hold in any second countable linorder (including ennreal or ereal for instance),
  4.1634  but in the current state they are restricted to reals.\<close>
  4.1635  
  4.1636 -lemma borel_measurable_mono_on_fnc:
  4.1637 +lemma%important borel_measurable_mono_on_fnc:
  4.1638    fixes f :: "real \<Rightarrow> real" and A :: "real set"
  4.1639    assumes "mono_on f A"
  4.1640    shows "f \<in> borel_measurable (restrict_space borel A)"
  4.1641 @@ -1935,18 +1935,18 @@
  4.1642                intro!: borel_measurable_continuous_on_restrict intro: continuous_within_subset)
  4.1643    done
  4.1644  
  4.1645 -lemma borel_measurable_piecewise_mono:
  4.1646 +lemma%unimportant borel_measurable_piecewise_mono:
  4.1647    fixes f::"real \<Rightarrow> real" and C::"real set set"
  4.1648    assumes "countable C" "\<And>c. c \<in> C \<Longrightarrow> c \<in> sets borel" "\<And>c. c \<in> C \<Longrightarrow> mono_on f c" "(\<Union>C) = UNIV"
  4.1649    shows "f \<in> borel_measurable borel"
  4.1650 -by (rule measurable_piecewise_restrict[of C], auto intro: borel_measurable_mono_on_fnc simp: assms)
  4.1651 +  by (rule measurable_piecewise_restrict[of C], auto intro: borel_measurable_mono_on_fnc simp: assms)
  4.1652  
  4.1653 -lemma borel_measurable_mono:
  4.1654 +lemma%unimportant borel_measurable_mono:
  4.1655    fixes f :: "real \<Rightarrow> real"
  4.1656    shows "mono f \<Longrightarrow> f \<in> borel_measurable borel"
  4.1657    using borel_measurable_mono_on_fnc[of f UNIV] by (simp add: mono_def mono_on_def)
  4.1658  
  4.1659 -lemma measurable_bdd_below_real[measurable (raw)]:
  4.1660 +lemma%unimportant measurable_bdd_below_real[measurable (raw)]:
  4.1661    fixes F :: "'a \<Rightarrow> 'i \<Rightarrow> real"
  4.1662    assumes [simp]: "countable I" and [measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> M \<rightarrow>\<^sub>M borel"
  4.1663    shows "Measurable.pred M (\<lambda>x. bdd_below ((\<lambda>i. F i x)`I))"
  4.1664 @@ -1957,12 +1957,12 @@
  4.1665      using countable_int by measurable
  4.1666  qed
  4.1667  
  4.1668 -lemma borel_measurable_cINF_real[measurable (raw)]:
  4.1669 +lemma%important borel_measurable_cINF_real[measurable (raw)]:
  4.1670    fixes F :: "_ \<Rightarrow> _ \<Rightarrow> real"
  4.1671    assumes [simp]: "countable I"
  4.1672    assumes F[measurable]: "\<And>i. i \<in> I \<Longrightarrow> F i \<in> borel_measurable M"
  4.1673    shows "(\<lambda>x. INF i:I. F i x) \<in> borel_measurable M"
  4.1674 -proof (rule measurable_piecewise_restrict)
  4.1675 +proof%unimportant (rule measurable_piecewise_restrict)
  4.1676    let ?\<Omega> = "{x\<in>space M. bdd_below ((\<lambda>i. F i x)`I)}"
  4.1677    show "countable {?\<Omega>, - ?\<Omega>}" "space M \<subseteq> \<Union>{?\<Omega>, - ?\<Omega>}" "\<And>X. X \<in> {?\<Omega>, - ?\<Omega>} \<Longrightarrow> X \<inter> space M \<in> sets M"
  4.1678      by auto
  4.1679 @@ -1982,7 +1982,7 @@
  4.1680    qed
  4.1681  qed
  4.1682  
  4.1683 -lemma borel_Ici: "borel = sigma UNIV (range (\<lambda>x::real. {x ..}))"
  4.1684 +lemma%unimportant borel_Ici: "borel = sigma UNIV (range (\<lambda>x::real. {x ..}))"
  4.1685  proof (safe intro!: borel_eq_sigmaI1[OF borel_Iio])
  4.1686    fix x :: real
  4.1687    have eq: "{..<x} = space (sigma UNIV (range atLeast)) - {x ..}"
  4.1688 @@ -1991,7 +1991,7 @@
  4.1689      unfolding eq by (intro sets.compl_sets) auto
  4.1690  qed auto
  4.1691  
  4.1692 -lemma borel_measurable_pred_less[measurable (raw)]:
  4.1693 +lemma%unimportant borel_measurable_pred_less[measurable (raw)]:
  4.1694    fixes f :: "'a \<Rightarrow> 'b::{second_countable_topology, linorder_topology}"
  4.1695    shows "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> Measurable.pred M (\<lambda>w. f w < g w)"
  4.1696    unfolding Measurable.pred_def by (rule borel_measurable_less)
  4.1697 @@ -1999,19 +1999,19 @@
  4.1698  no_notation
  4.1699    eucl_less (infix "<e" 50)
  4.1700  
  4.1701 -lemma borel_measurable_Max2[measurable (raw)]:
  4.1702 +lemma%important borel_measurable_Max2[measurable (raw)]:
  4.1703    fixes f::"_ \<Rightarrow> _ \<Rightarrow> 'a::{second_countable_topology, dense_linorder, linorder_topology}"
  4.1704    assumes "finite I"
  4.1705      and [measurable]: "\<And>i. f i \<in> borel_measurable M"
  4.1706    shows "(\<lambda>x. Max{f i x |i. i \<in> I}) \<in> borel_measurable M"
  4.1707 -by (simp add: borel_measurable_Max[OF assms(1), where ?f=f and ?M=M] Setcompr_eq_image)
  4.1708 +by%unimportant (simp add: borel_measurable_Max[OF assms(1), where ?f=f and ?M=M] Setcompr_eq_image)
  4.1709  
  4.1710 -lemma measurable_compose_n [measurable (raw)]:
  4.1711 +lemma%unimportant measurable_compose_n [measurable (raw)]:
  4.1712    assumes "T \<in> measurable M M"
  4.1713    shows "(T^^n) \<in> measurable M M"
  4.1714  by (induction n, auto simp add: measurable_compose[OF _ assms])
  4.1715  
  4.1716 -lemma measurable_real_imp_nat:
  4.1717 +lemma%unimportant measurable_real_imp_nat:
  4.1718    fixes f::"'a \<Rightarrow> nat"
  4.1719    assumes [measurable]: "(\<lambda>x. real(f x)) \<in> borel_measurable M"
  4.1720    shows "f \<in> measurable M (count_space UNIV)"
  4.1721 @@ -2023,7 +2023,7 @@
  4.1722    then show ?thesis using measurable_count_space_eq2_countable by blast
  4.1723  qed
  4.1724  
  4.1725 -lemma measurable_equality_set [measurable]:
  4.1726 +lemma%unimportant measurable_equality_set [measurable]:
  4.1727    fixes f g::"_\<Rightarrow> 'a::{second_countable_topology, t2_space}"
  4.1728    assumes [measurable]: "f \<in> borel_measurable M" "g \<in> borel_measurable M"
  4.1729    shows "{x \<in> space M. f x = g x} \<in> sets M"
  4.1730 @@ -2038,7 +2038,7 @@
  4.1731    then show ?thesis unfolding A_def by simp
  4.1732  qed
  4.1733  
  4.1734 -lemma measurable_inequality_set [measurable]:
  4.1735 +lemma%unimportant measurable_inequality_set [measurable]:
  4.1736    fixes f g::"_ \<Rightarrow> 'a::{second_countable_topology, linorder_topology}"
  4.1737    assumes [measurable]: "f \<in> borel_measurable M" "g \<in> borel_measurable M"
  4.1738    shows "{x \<in> space M. f x \<le> g x} \<in> sets M"
  4.1739 @@ -2066,7 +2066,7 @@
  4.1740    ultimately show "{x \<in> space M. f x > g x} \<in> sets M" using * by (metis (mono_tags, lifting) measurable_sets)
  4.1741  qed
  4.1742  
  4.1743 -lemma measurable_limit [measurable]:
  4.1744 +lemma%unimportant measurable_limit [measurable]:
  4.1745    fixes f::"nat \<Rightarrow> 'a \<Rightarrow> 'b::first_countable_topology"
  4.1746    assumes [measurable]: "\<And>n::nat. f n \<in> borel_measurable M"
  4.1747    shows "Measurable.pred M (\<lambda>x. (\<lambda>n. f n x) \<longlonglongrightarrow> c)"
  4.1748 @@ -2106,11 +2106,11 @@
  4.1749    then show ?thesis by auto
  4.1750  qed
  4.1751  
  4.1752 -lemma measurable_limit2 [measurable]:
  4.1753 +lemma%important measurable_limit2 [measurable]:
  4.1754    fixes u::"nat \<Rightarrow> 'a \<Rightarrow> real"
  4.1755    assumes [measurable]: "\<And>n. u n \<in> borel_measurable M" "v \<in> borel_measurable M"
  4.1756    shows "Measurable.pred M (\<lambda>x. (\<lambda>n. u n x) \<longlonglongrightarrow> v x)"
  4.1757 -proof -
  4.1758 +proof%unimportant -
  4.1759    define w where "w = (\<lambda>n x. u n x - v x)"
  4.1760    have [measurable]: "w n \<in> borel_measurable M" for n unfolding w_def by auto
  4.1761    have "((\<lambda>n. u n x) \<longlonglongrightarrow> v x) \<longleftrightarrow> ((\<lambda>n. w n x) \<longlonglongrightarrow> 0)" for x
  4.1762 @@ -2118,7 +2118,7 @@
  4.1763    then show ?thesis using measurable_limit by auto
  4.1764  qed
  4.1765  
  4.1766 -lemma measurable_P_restriction [measurable (raw)]:
  4.1767 +lemma%unimportant measurable_P_restriction [measurable (raw)]:
  4.1768    assumes [measurable]: "Measurable.pred M P" "A \<in> sets M"
  4.1769    shows "{x \<in> A. P x} \<in> sets M"
  4.1770  proof -
  4.1771 @@ -2127,7 +2127,7 @@
  4.1772    then show ?thesis by auto
  4.1773  qed
  4.1774  
  4.1775 -lemma measurable_sum_nat [measurable (raw)]:
  4.1776 +lemma%unimportant measurable_sum_nat [measurable (raw)]:
  4.1777    fixes f :: "'c \<Rightarrow> 'a \<Rightarrow> nat"
  4.1778    assumes "\<And>i. i \<in> S \<Longrightarrow> f i \<in> measurable M (count_space UNIV)"
  4.1779    shows "(\<lambda>x. \<Sum>i\<in>S. f i x) \<in> measurable M (count_space UNIV)"
  4.1780 @@ -2137,7 +2137,7 @@
  4.1781  qed simp
  4.1782  
  4.1783  
  4.1784 -lemma measurable_abs_powr [measurable]:
  4.1785 +lemma%unimportant measurable_abs_powr [measurable]:
  4.1786    fixes p::real
  4.1787    assumes [measurable]: "f \<in> borel_measurable M"
  4.1788    shows "(\<lambda>x. \<bar>f x\<bar> powr p) \<in> borel_measurable M"
  4.1789 @@ -2145,7 +2145,7 @@
  4.1790  
  4.1791  text \<open>The next one is a variation around \verb+measurable_restrict_space+.\<close>
  4.1792  
  4.1793 -lemma measurable_restrict_space3:
  4.1794 +lemma%unimportant measurable_restrict_space3:
  4.1795    assumes "f \<in> measurable M N" and
  4.1796            "f \<in> A \<rightarrow> B"
  4.1797    shows "f \<in> measurable (restrict_space M A) (restrict_space N B)"
  4.1798 @@ -2157,12 +2157,12 @@
  4.1799  
  4.1800  text \<open>The next one is a variation around \verb+measurable_piecewise_restrict+.\<close>
  4.1801  
  4.1802 -lemma measurable_piecewise_restrict2:
  4.1803 +lemma%important measurable_piecewise_restrict2:
  4.1804    assumes [measurable]: "\<And>n. A n \<in> sets M"
  4.1805        and "space M = (\<Union>(n::nat). A n)"
  4.1806            "\<And>n. \<exists>h \<in> measurable M N. (\<forall>x \<in> A n. f x = h x)"
  4.1807    shows "f \<in> measurable M N"
  4.1808 -proof (rule measurableI)
  4.1809 +proof%unimportant (rule measurableI)
  4.1810    fix B assume [measurable]: "B \<in> sets N"
  4.1811    {
  4.1812      fix n::nat
     5.1 --- a/src/HOL/Analysis/Caratheodory.thy	Mon Aug 27 22:58:36 2018 +0200
     5.2 +++ b/src/HOL/Analysis/Caratheodory.thy	Tue Aug 28 13:28:39 2018 +0100
     5.3 @@ -3,7 +3,7 @@
     5.4      Author:     Johannes Hölzl, TU München
     5.5  *)
     5.6  
     5.7 -section \<open>Caratheodory Extension Theorem\<close>
     5.8 +section%important \<open>Caratheodory Extension Theorem\<close>
     5.9  
    5.10  theory Caratheodory
    5.11    imports Measure_Space
    5.12 @@ -13,7 +13,7 @@
    5.13    Originally from the Hurd/Coble measure theory development, translated by Lawrence Paulson.
    5.14  \<close>
    5.15  
    5.16 -lemma suminf_ennreal_2dimen:
    5.17 +lemma%unimportant suminf_ennreal_2dimen:
    5.18    fixes f:: "nat \<times> nat \<Rightarrow> ennreal"
    5.19    assumes "\<And>m. g m = (\<Sum>n. f (m,n))"
    5.20    shows "(\<Sum>i. f (prod_decode i)) = suminf g"
    5.21 @@ -49,18 +49,18 @@
    5.22      by (simp add: suminf_eq_SUP)
    5.23  qed
    5.24  
    5.25 -subsection \<open>Characterizations of Measures\<close>
    5.26 +subsection%important \<open>Characterizations of Measures\<close>
    5.27  
    5.28 -definition outer_measure_space where
    5.29 +definition%important outer_measure_space where
    5.30    "outer_measure_space M f \<longleftrightarrow> positive M f \<and> increasing M f \<and> countably_subadditive M f"
    5.31  
    5.32 -subsubsection \<open>Lambda Systems\<close>
    5.33 +subsubsection%important \<open>Lambda Systems\<close>
    5.34  
    5.35 -definition lambda_system :: "'a set \<Rightarrow> 'a set set \<Rightarrow> ('a set \<Rightarrow> ennreal) \<Rightarrow> 'a set set"
    5.36 +definition%important lambda_system :: "'a set \<Rightarrow> 'a set set \<Rightarrow> ('a set \<Rightarrow> ennreal) \<Rightarrow> 'a set set"
    5.37  where
    5.38    "lambda_system \<Omega> M f = {l \<in> M. \<forall>x \<in> M. f (l \<inter> x) + f ((\<Omega> - l) \<inter> x) = f x}"
    5.39  
    5.40 -lemma (in algebra) lambda_system_eq:
    5.41 +lemma%unimportant (in algebra) lambda_system_eq:
    5.42    "lambda_system \<Omega> M f = {l \<in> M. \<forall>x \<in> M. f (x \<inter> l) + f (x - l) = f x}"
    5.43  proof -
    5.44    have [simp]: "\<And>l x. l \<in> M \<Longrightarrow> x \<in> M \<Longrightarrow> (\<Omega> - l) \<inter> x = x - l"
    5.45 @@ -69,13 +69,13 @@
    5.46      by (auto simp add: lambda_system_def) (metis Int_commute)+
    5.47  qed
    5.48  
    5.49 -lemma (in algebra) lambda_system_empty: "positive M f \<Longrightarrow> {} \<in> lambda_system \<Omega> M f"
    5.50 +lemma%unimportant (in algebra) lambda_system_empty: "positive M f \<Longrightarrow> {} \<in> lambda_system \<Omega> M f"
    5.51    by (auto simp add: positive_def lambda_system_eq)
    5.52  
    5.53 -lemma lambda_system_sets: "x \<in> lambda_system \<Omega> M f \<Longrightarrow> x \<in> M"
    5.54 +lemma%unimportant lambda_system_sets: "x \<in> lambda_system \<Omega> M f \<Longrightarrow> x \<in> M"
    5.55    by (simp add: lambda_system_def)
    5.56  
    5.57 -lemma (in algebra) lambda_system_Compl:
    5.58 +lemma%unimportant (in algebra) lambda_system_Compl:
    5.59    fixes f:: "'a set \<Rightarrow> ennreal"
    5.60    assumes x: "x \<in> lambda_system \<Omega> M f"
    5.61    shows "\<Omega> - x \<in> lambda_system \<Omega> M f"
    5.62 @@ -88,7 +88,7 @@
    5.63      by (force simp add: lambda_system_def ac_simps)
    5.64  qed
    5.65  
    5.66 -lemma (in algebra) lambda_system_Int:
    5.67 +lemma%unimportant (in algebra) lambda_system_Int:
    5.68    fixes f:: "'a set \<Rightarrow> ennreal"
    5.69    assumes xl: "x \<in> lambda_system \<Omega> M f" and yl: "y \<in> lambda_system \<Omega> M f"
    5.70    shows "x \<inter> y \<in> lambda_system \<Omega> M f"
    5.71 @@ -122,7 +122,7 @@
    5.72    qed
    5.73  qed
    5.74  
    5.75 -lemma (in algebra) lambda_system_Un:
    5.76 +lemma%unimportant (in algebra) lambda_system_Un:
    5.77    fixes f:: "'a set \<Rightarrow> ennreal"
    5.78    assumes xl: "x \<in> lambda_system \<Omega> M f" and yl: "y \<in> lambda_system \<Omega> M f"
    5.79    shows "x \<union> y \<in> lambda_system \<Omega> M f"
    5.80 @@ -136,7 +136,7 @@
    5.81      by (metis lambda_system_Compl lambda_system_Int xl yl)
    5.82  qed
    5.83  
    5.84 -lemma (in algebra) lambda_system_algebra:
    5.85 +lemma%unimportant (in algebra) lambda_system_algebra:
    5.86    "positive M f \<Longrightarrow> algebra \<Omega> (lambda_system \<Omega> M f)"
    5.87    apply (auto simp add: algebra_iff_Un)
    5.88    apply (metis lambda_system_sets set_mp sets_into_space)
    5.89 @@ -145,7 +145,7 @@
    5.90    apply (metis lambda_system_Un)
    5.91    done
    5.92  
    5.93 -lemma (in algebra) lambda_system_strong_additive:
    5.94 +lemma%unimportant (in algebra) lambda_system_strong_additive:
    5.95    assumes z: "z \<in> M" and disj: "x \<inter> y = {}"
    5.96        and xl: "x \<in> lambda_system \<Omega> M f" and yl: "y \<in> lambda_system \<Omega> M f"
    5.97    shows "f (z \<inter> (x \<union> y)) = f (z \<inter> x) + f (z \<inter> y)"
    5.98 @@ -160,7 +160,7 @@
    5.99      by (simp add: lambda_system_eq)
   5.100  qed
   5.101  
   5.102 -lemma (in algebra) lambda_system_additive: "additive (lambda_system \<Omega> M f) f"
   5.103 +lemma%unimportant (in algebra) lambda_system_additive: "additive (lambda_system \<Omega> M f) f"
   5.104  proof (auto simp add: additive_def)
   5.105    fix x and y
   5.106    assume disj: "x \<inter> y = {}"
   5.107 @@ -171,13 +171,13 @@
   5.108      by (simp add: Un)
   5.109  qed
   5.110  
   5.111 -lemma lambda_system_increasing: "increasing M f \<Longrightarrow> increasing (lambda_system \<Omega> M f) f"
   5.112 +lemma%unimportant lambda_system_increasing: "increasing M f \<Longrightarrow> increasing (lambda_system \<Omega> M f) f"
   5.113    by (simp add: increasing_def lambda_system_def)
   5.114  
   5.115 -lemma lambda_system_positive: "positive M f \<Longrightarrow> positive (lambda_system \<Omega> M f) f"
   5.116 +lemma%unimportant lambda_system_positive: "positive M f \<Longrightarrow> positive (lambda_system \<Omega> M f) f"
   5.117    by (simp add: positive_def lambda_system_def)
   5.118  
   5.119 -lemma (in algebra) lambda_system_strong_sum:
   5.120 +lemma%unimportant (in algebra) lambda_system_strong_sum:
   5.121    fixes A:: "nat \<Rightarrow> 'a set" and f :: "'a set \<Rightarrow> ennreal"
   5.122    assumes f: "positive M f" and a: "a \<in> M"
   5.123        and A: "range A \<subseteq> lambda_system \<Omega> M f"
   5.124 @@ -199,12 +199,12 @@
   5.125      by (simp add: atLeastLessThanSuc lambda_system_strong_additive [OF a 2 3 4])
   5.126  qed
   5.127  
   5.128 -lemma (in sigma_algebra) lambda_system_caratheodory:
   5.129 +lemma%important (in sigma_algebra) lambda_system_caratheodory:
   5.130    assumes oms: "outer_measure_space M f"
   5.131        and A: "range A \<subseteq> lambda_system \<Omega> M f"
   5.132        and disj: "disjoint_family A"
   5.133    shows  "(\<Union>i. A i) \<in> lambda_system \<Omega> M f \<and> (\<Sum>i. f (A i)) = f (\<Union>i. A i)"
   5.134 -proof -
   5.135 +proof%unimportant -
   5.136    have pos: "positive M f" and inc: "increasing M f"
   5.137     and csa: "countably_subadditive M f"
   5.138      by (metis oms outer_measure_space_def)+
   5.139 @@ -274,11 +274,11 @@
   5.140      by (simp add: lambda_system_eq sums_iff U_eq U_in)
   5.141  qed
   5.142  
   5.143 -lemma (in sigma_algebra) caratheodory_lemma:
   5.144 +lemma%important (in sigma_algebra) caratheodory_lemma:
   5.145    assumes oms: "outer_measure_space M f"
   5.146    defines "L \<equiv> lambda_system \<Omega> M f"
   5.147    shows "measure_space \<Omega> L f"
   5.148 -proof -
   5.149 +proof%unimportant -
   5.150    have pos: "positive M f"
   5.151      by (metis oms outer_measure_space_def)
   5.152    have alg: "algebra \<Omega> L"
   5.153 @@ -297,11 +297,11 @@
   5.154      using pos by (simp add: measure_space_def)
   5.155  qed
   5.156  
   5.157 -definition outer_measure :: "'a set set \<Rightarrow> ('a set \<Rightarrow> ennreal) \<Rightarrow> 'a set \<Rightarrow> ennreal" where
   5.158 +definition%important outer_measure :: "'a set set \<Rightarrow> ('a set \<Rightarrow> ennreal) \<Rightarrow> 'a set \<Rightarrow> ennreal" where
   5.159     "outer_measure M f X =
   5.160       (INF A:{A. range A \<subseteq> M \<and> disjoint_family A \<and> X \<subseteq> (\<Union>i. A i)}. \<Sum>i. f (A i))"
   5.161  
   5.162 -lemma (in ring_of_sets) outer_measure_agrees:
   5.163 +lemma%unimportant (in ring_of_sets) outer_measure_agrees:
   5.164    assumes posf: "positive M f" and ca: "countably_additive M f" and s: "s \<in> M"
   5.165    shows "outer_measure M f s = f s"
   5.166    unfolding outer_measure_def
   5.167 @@ -326,19 +326,19 @@
   5.168         (auto simp: disjoint_family_on_def)
   5.169  qed
   5.170  
   5.171 -lemma outer_measure_empty:
   5.172 +lemma%unimportant outer_measure_empty:
   5.173    "positive M f \<Longrightarrow> {} \<in> M \<Longrightarrow> outer_measure M f {} = 0"
   5.174    unfolding outer_measure_def
   5.175    by (intro antisym INF_lower2[of  "\<lambda>_. {}"]) (auto simp: disjoint_family_on_def positive_def)
   5.176  
   5.177 -lemma (in ring_of_sets) positive_outer_measure:
   5.178 +lemma%unimportant (in ring_of_sets) positive_outer_measure:
   5.179    assumes "positive M f" shows "positive (Pow \<Omega>) (outer_measure M f)"
   5.180    unfolding positive_def by (auto simp: assms outer_measure_empty)
   5.181  
   5.182 -lemma (in ring_of_sets) increasing_outer_measure: "increasing (Pow \<Omega>) (outer_measure M f)"
   5.183 +lemma%unimportant (in ring_of_sets) increasing_outer_measure: "increasing (Pow \<Omega>) (outer_measure M f)"
   5.184    by (force simp: increasing_def outer_measure_def intro!: INF_greatest intro: INF_lower)
   5.185  
   5.186 -lemma (in ring_of_sets) outer_measure_le:
   5.187 +lemma%unimportant (in ring_of_sets) outer_measure_le:
   5.188    assumes pos: "positive M f" and inc: "increasing M f" and A: "range A \<subseteq> M" and X: "X \<subseteq> (\<Union>i. A i)"
   5.189    shows "outer_measure M f X \<le> (\<Sum>i. f (A i))"
   5.190    unfolding outer_measure_def
   5.191 @@ -351,11 +351,11 @@
   5.192      by (blast intro!: suminf_le)
   5.193  qed (auto simp: X UN_disjointed_eq disjoint_family_disjointed)
   5.194  
   5.195 -lemma (in ring_of_sets) outer_measure_close:
   5.196 +lemma%unimportant (in ring_of_sets) outer_measure_close:
   5.197    "outer_measure M f X < e \<Longrightarrow> \<exists>A. range A \<subseteq> M \<and> disjoint_family A \<and> X \<subseteq> (\<Union>i. A i) \<and> (\<Sum>i. f (A i)) < e"
   5.198    unfolding outer_measure_def INF_less_iff by auto
   5.199  
   5.200 -lemma (in ring_of_sets) countably_subadditive_outer_measure:
   5.201 +lemma%unimportant (in ring_of_sets) countably_subadditive_outer_measure:
   5.202    assumes posf: "positive M f" and inc: "increasing M f"
   5.203    shows "countably_subadditive (Pow \<Omega>) (outer_measure M f)"
   5.204  proof (simp add: countably_subadditive_def, safe)
   5.205 @@ -398,12 +398,12 @@
   5.206    qed
   5.207  qed
   5.208  
   5.209 -lemma (in ring_of_sets) outer_measure_space_outer_measure:
   5.210 +lemma%unimportant (in ring_of_sets) outer_measure_space_outer_measure:
   5.211    "positive M f \<Longrightarrow> increasing M f \<Longrightarrow> outer_measure_space (Pow \<Omega>) (outer_measure M f)"
   5.212    by (simp add: outer_measure_space_def
   5.213      positive_outer_measure increasing_outer_measure countably_subadditive_outer_measure)
   5.214  
   5.215 -lemma (in ring_of_sets) algebra_subset_lambda_system:
   5.216 +lemma%unimportant (in ring_of_sets) algebra_subset_lambda_system:
   5.217    assumes posf: "positive M f" and inc: "increasing M f"
   5.218        and add: "additive M f"
   5.219    shows "M \<subseteq> lambda_system \<Omega> (Pow \<Omega>) (outer_measure M f)"
   5.220 @@ -457,15 +457,15 @@
   5.221      by (rule order_antisym)
   5.222  qed
   5.223  
   5.224 -lemma measure_down: "measure_space \<Omega> N \<mu> \<Longrightarrow> sigma_algebra \<Omega> M \<Longrightarrow> M \<subseteq> N \<Longrightarrow> measure_space \<Omega> M \<mu>"
   5.225 +lemma%unimportant measure_down: "measure_space \<Omega> N \<mu> \<Longrightarrow> sigma_algebra \<Omega> M \<Longrightarrow> M \<subseteq> N \<Longrightarrow> measure_space \<Omega> M \<mu>"
   5.226    by (auto simp add: measure_space_def positive_def countably_additive_def subset_eq)
   5.227  
   5.228 -subsection \<open>Caratheodory's theorem\<close>
   5.229 +subsection%important \<open>Caratheodory's theorem\<close>
   5.230  
   5.231 -theorem (in ring_of_sets) caratheodory':
   5.232 +theorem%important (in ring_of_sets) caratheodory':
   5.233    assumes posf: "positive M f" and ca: "countably_additive M f"
   5.234    shows "\<exists>\<mu> :: 'a set \<Rightarrow> ennreal. (\<forall>s \<in> M. \<mu> s = f s) \<and> measure_space \<Omega> (sigma_sets \<Omega> M) \<mu>"
   5.235 -proof -
   5.236 +proof%unimportant -
   5.237    have inc: "increasing M f"
   5.238      by (metis additive_increasing ca countably_additive_additive posf)
   5.239    let ?O = "outer_measure M f"
   5.240 @@ -489,37 +489,37 @@
   5.241      by (intro exI[of _ ?O]) auto
   5.242  qed
   5.243  
   5.244 -lemma (in ring_of_sets) caratheodory_empty_continuous:
   5.245 +lemma%important (in ring_of_sets) caratheodory_empty_continuous:
   5.246    assumes f: "positive M f" "additive M f" and fin: "\<And>A. A \<in> M \<Longrightarrow> f A \<noteq> \<infinity>"
   5.247    assumes cont: "\<And>A. range A \<subseteq> M \<Longrightarrow> decseq A \<Longrightarrow> (\<Inter>i. A i) = {} \<Longrightarrow> (\<lambda>i. f (A i)) \<longlonglongrightarrow> 0"
   5.248    shows "\<exists>\<mu> :: 'a set \<Rightarrow> ennreal. (\<forall>s \<in> M. \<mu> s = f s) \<and> measure_space \<Omega> (sigma_sets \<Omega> M) \<mu>"
   5.249 -proof (intro caratheodory' empty_continuous_imp_countably_additive f)
   5.250 +proof%unimportant (intro caratheodory' empty_continuous_imp_countably_additive f)
   5.251    show "\<forall>A\<in>M. f A \<noteq> \<infinity>" using fin by auto
   5.252  qed (rule cont)
   5.253  
   5.254 -subsection \<open>Volumes\<close>
   5.255 +subsection%important \<open>Volumes\<close>
   5.256  
   5.257 -definition volume :: "'a set set \<Rightarrow> ('a set \<Rightarrow> ennreal) \<Rightarrow> bool" where
   5.258 +definition%important volume :: "'a set set \<Rightarrow> ('a set \<Rightarrow> ennreal) \<Rightarrow> bool" where
   5.259    "volume M f \<longleftrightarrow>
   5.260    (f {} = 0) \<and> (\<forall>a\<in>M. 0 \<le> f a) \<and>
   5.261    (\<forall>C\<subseteq>M. disjoint C \<longrightarrow> finite C \<longrightarrow> \<Union>C \<in> M \<longrightarrow> f (\<Union>C) = (\<Sum>c\<in>C. f c))"
   5.262  
   5.263 -lemma volumeI:
   5.264 +lemma%unimportant volumeI:
   5.265    assumes "f {} = 0"
   5.266    assumes "\<And>a. a \<in> M \<Longrightarrow> 0 \<le> f a"
   5.267    assumes "\<And>C. C \<subseteq> M \<Longrightarrow> disjoint C \<Longrightarrow> finite C \<Longrightarrow> \<Union>C \<in> M \<Longrightarrow> f (\<Union>C) = (\<Sum>c\<in>C. f c)"
   5.268    shows "volume M f"
   5.269    using assms by (auto simp: volume_def)
   5.270  
   5.271 -lemma volume_positive:
   5.272 +lemma%unimportant volume_positive:
   5.273    "volume M f \<Longrightarrow> a \<in> M \<Longrightarrow> 0 \<le> f a"
   5.274    by (auto simp: volume_def)
   5.275  
   5.276 -lemma volume_empty:
   5.277 +lemma%unimportant volume_empty:
   5.278    "volume M f \<Longrightarrow> f {} = 0"
   5.279    by (auto simp: volume_def)
   5.280  
   5.281 -lemma volume_finite_additive:
   5.282 +lemma%unimportant volume_finite_additive:
   5.283    assumes "volume M f"
   5.284    assumes A: "\<And>i. i \<in> I \<Longrightarrow> A i \<in> M" "disjoint_family_on A I" "finite I" "UNION I A \<in> M"
   5.285    shows "f (UNION I A) = (\<Sum>i\<in>I. f (A i))"
   5.286 @@ -540,7 +540,7 @@
   5.287      by simp
   5.288  qed
   5.289  
   5.290 -lemma (in ring_of_sets) volume_additiveI:
   5.291 +lemma%unimportant (in ring_of_sets) volume_additiveI:
   5.292    assumes pos: "\<And>a. a \<in> M \<Longrightarrow> 0 \<le> \<mu> a"
   5.293    assumes [simp]: "\<mu> {} = 0"
   5.294    assumes add: "\<And>a b. a \<in> M \<Longrightarrow> b \<in> M \<Longrightarrow> a \<inter> b = {} \<Longrightarrow> \<mu> (a \<union> b) = \<mu> a + \<mu> b"
   5.295 @@ -557,10 +557,10 @@
   5.296    qed simp
   5.297  qed fact+
   5.298  
   5.299 -lemma (in semiring_of_sets) extend_volume:
   5.300 +lemma%important (in semiring_of_sets) extend_volume:
   5.301    assumes "volume M \<mu>"
   5.302    shows "\<exists>\<mu>'. volume generated_ring \<mu>' \<and> (\<forall>a\<in>M. \<mu>' a = \<mu> a)"
   5.303 -proof -
   5.304 +proof%unimportant -
   5.305    let ?R = generated_ring
   5.306    have "\<forall>a\<in>?R. \<exists>m. \<exists>C\<subseteq>M. a = \<Union>C \<and> finite C \<and> disjoint C \<and> m = (\<Sum>c\<in>C. \<mu> c)"
   5.307      by (auto simp: generated_ring_def)
   5.308 @@ -635,12 +635,12 @@
   5.309    qed
   5.310  qed
   5.311  
   5.312 -subsubsection \<open>Caratheodory on semirings\<close>
   5.313 +subsubsection%important \<open>Caratheodory on semirings\<close>
   5.314  
   5.315 -theorem (in semiring_of_sets) caratheodory:
   5.316 +theorem%important (in semiring_of_sets) caratheodory:
   5.317    assumes pos: "positive M \<mu>" and ca: "countably_additive M \<mu>"
   5.318    shows "\<exists>\<mu>' :: 'a set \<Rightarrow> ennreal. (\<forall>s \<in> M. \<mu>' s = \<mu> s) \<and> measure_space \<Omega> (sigma_sets \<Omega> M) \<mu>'"
   5.319 -proof -
   5.320 +proof%unimportant -
   5.321    have "volume M \<mu>"
   5.322    proof (rule volumeI)
   5.323      { fix a assume "a \<in> M" then show "0 \<le> \<mu> a"
   5.324 @@ -816,7 +816,7 @@
   5.325      by (intro exI[of _ \<mu>']) (auto intro: generated_ringI_Basic)
   5.326  qed
   5.327  
   5.328 -lemma extend_measure_caratheodory:
   5.329 +lemma%important extend_measure_caratheodory:
   5.330    fixes G :: "'i \<Rightarrow> 'a set"
   5.331    assumes M: "M = extend_measure \<Omega> I G \<mu>"
   5.332    assumes "i \<in> I"
   5.333 @@ -827,7 +827,8 @@
   5.334    assumes add: "\<And>A::nat \<Rightarrow> 'i. \<And>j. A \<in> UNIV \<rightarrow> I \<Longrightarrow> j \<in> I \<Longrightarrow> disjoint_family (G \<circ> A) \<Longrightarrow>
   5.335      (\<Union>i. G (A i)) = G j \<Longrightarrow> (\<Sum>n. \<mu> (A n)) = \<mu> j"
   5.336    shows "emeasure M (G i) = \<mu> i"
   5.337 -proof -
   5.338 +
   5.339 +proof%unimportant -
   5.340    interpret semiring_of_sets \<Omega> "G ` I"
   5.341      by fact
   5.342    have "\<forall>g\<in>G`I. \<exists>i\<in>I. g = G i"
   5.343 @@ -860,7 +861,7 @@
   5.344    qed fact
   5.345  qed
   5.346  
   5.347 -lemma extend_measure_caratheodory_pair:
   5.348 +lemma%important extend_measure_caratheodory_pair:
   5.349    fixes G :: "'i \<Rightarrow> 'j \<Rightarrow> 'a set"
   5.350    assumes M: "M = extend_measure \<Omega> {(a, b). P a b} (\<lambda>(a, b). G a b) (\<lambda>(a, b). \<mu> a b)"
   5.351    assumes "P i j"
   5.352 @@ -872,7 +873,7 @@
   5.353      (\<And>n. P (A n) (B n)) \<Longrightarrow> P j k \<Longrightarrow> disjoint_family (\<lambda>n. G (A n) (B n)) \<Longrightarrow>
   5.354      (\<Union>i. G (A i) (B i)) = G j k \<Longrightarrow> (\<Sum>n. \<mu> (A n) (B n)) = \<mu> j k"
   5.355    shows "emeasure M (G i j) = \<mu> i j"
   5.356 -proof -
   5.357 +proof%unimportant -
   5.358    have "emeasure M ((\<lambda>(a, b). G a b) (i, j)) = (\<lambda>(a, b). \<mu> a b) (i, j)"
   5.359    proof (rule extend_measure_caratheodory[OF M])
   5.360      show "semiring_of_sets \<Omega> ((\<lambda>(a, b). G a b) ` {(a, b). P a b})"
     6.1 --- a/src/HOL/Analysis/Cartesian_Euclidean_Space.thy	Mon Aug 27 22:58:36 2018 +0200
     6.2 +++ b/src/HOL/Analysis/Cartesian_Euclidean_Space.thy	Tue Aug 28 13:28:39 2018 +0100
     6.3 @@ -2,19 +2,19 @@
     6.4     Some material by Jose Divasón, Tim Makarios and L C Paulson
     6.5  *)
     6.6  
     6.7 -section \<open>Instantiates the finite Cartesian product of Euclidean spaces as a Euclidean space\<close>
     6.8 +section%important \<open>Instantiates the finite Cartesian product of Euclidean spaces as a Euclidean space\<close>
     6.9  
    6.10  theory Cartesian_Euclidean_Space
    6.11  imports Cartesian_Space Derivative
    6.12  begin
    6.13  
    6.14 -lemma subspace_special_hyperplane: "subspace {x. x $ k = 0}"
    6.15 +lemma%unimportant subspace_special_hyperplane: "subspace {x. x $ k = 0}"
    6.16    by (simp add: subspace_def)
    6.17  
    6.18 -lemma sum_mult_product:
    6.19 +lemma%important sum_mult_product:
    6.20    "sum h {..<A * B :: nat} = (\<Sum>i\<in>{..<A}. \<Sum>j\<in>{..<B}. h (j + i * B))"
    6.21    unfolding sum_nat_group[of h B A, unfolded atLeast0LessThan, symmetric]
    6.22 -proof (rule sum.cong, simp, rule sum.reindex_cong)
    6.23 +proof%unimportant (rule sum.cong, simp, rule sum.reindex_cong)
    6.24    fix i
    6.25    show "inj_on (\<lambda>j. j + i * B) {..<B}" by (auto intro!: inj_onI)
    6.26    show "{i * B..<i * B + B} = (\<lambda>j. j + i * B) ` {..<B}"
    6.27 @@ -25,32 +25,32 @@
    6.28    qed simp
    6.29  qed simp
    6.30  
    6.31 -lemma interval_cbox_cart: "{a::real^'n..b} = cbox a b"
    6.32 +lemma%unimportant interval_cbox_cart: "{a::real^'n..b} = cbox a b"
    6.33    by (auto simp add: less_eq_vec_def mem_box Basis_vec_def inner_axis)
    6.34  
    6.35 -lemma differentiable_vec:
    6.36 +lemma%unimportant differentiable_vec:
    6.37    fixes S :: "'a::euclidean_space set"
    6.38    shows "vec differentiable_on S"
    6.39    by (simp add: linear_linear bounded_linear_imp_differentiable_on)
    6.40  
    6.41 -lemma continuous_vec [continuous_intros]:
    6.42 +lemma%unimportant continuous_vec [continuous_intros]:
    6.43    fixes x :: "'a::euclidean_space"
    6.44    shows "isCont vec x"
    6.45    apply (clarsimp simp add: continuous_def LIM_def dist_vec_def L2_set_def)
    6.46    apply (rule_tac x="r / sqrt (real CARD('b))" in exI)
    6.47    by (simp add: mult.commute pos_less_divide_eq real_sqrt_mult)
    6.48  
    6.49 -lemma box_vec_eq_empty [simp]:
    6.50 +lemma%unimportant box_vec_eq_empty [simp]:
    6.51    shows "cbox (vec a) (vec b) = {} \<longleftrightarrow> cbox a b = {}"
    6.52          "box (vec a) (vec b) = {} \<longleftrightarrow> box a b = {}"
    6.53    by (auto simp: Basis_vec_def mem_box box_eq_empty inner_axis)
    6.54  
    6.55 -subsection\<open>Closures and interiors of halfspaces\<close>
    6.56 +subsection%important\<open>Closures and interiors of halfspaces\<close>
    6.57  
    6.58 -lemma interior_halfspace_le [simp]:
    6.59 +lemma%important interior_halfspace_le [simp]:
    6.60    assumes "a \<noteq> 0"
    6.61      shows "interior {x. a \<bullet> x \<le> b} = {x. a \<bullet> x < b}"
    6.62 -proof -
    6.63 +proof%unimportant -
    6.64    have *: "a \<bullet> x < b" if x: "x \<in> S" and S: "S \<subseteq> {x. a \<bullet> x \<le> b}" and "open S" for S x
    6.65    proof -
    6.66      obtain e where "e>0" and e: "cball x e \<subseteq> S"
    6.67 @@ -70,15 +70,15 @@
    6.68      by (rule interior_unique) (auto simp: open_halfspace_lt *)
    6.69  qed
    6.70  
    6.71 -lemma interior_halfspace_ge [simp]:
    6.72 +lemma%unimportant interior_halfspace_ge [simp]:
    6.73     "a \<noteq> 0 \<Longrightarrow> interior {x. a \<bullet> x \<ge> b} = {x. a \<bullet> x > b}"
    6.74  using interior_halfspace_le [of "-a" "-b"] by simp
    6.75  
    6.76 -lemma interior_halfspace_component_le [simp]:
    6.77 +lemma%important interior_halfspace_component_le [simp]:
    6.78       "interior {x. x$k \<le> a} = {x :: (real^'n). x$k < a}" (is "?LE")
    6.79    and interior_halfspace_component_ge [simp]:
    6.80       "interior {x. x$k \<ge> a} = {x :: (real^'n). x$k > a}" (is "?GE")
    6.81 -proof -
    6.82 +proof%unimportant -
    6.83    have "axis k (1::real) \<noteq> 0"
    6.84      by (simp add: axis_def vec_eq_iff)
    6.85    moreover have "axis k (1::real) \<bullet> x = x$k" for x
    6.86 @@ -88,7 +88,7 @@
    6.87            interior_halfspace_ge [of "axis k (1::real)" a] by auto
    6.88  qed
    6.89  
    6.90 -lemma closure_halfspace_lt [simp]:
    6.91 +lemma%unimportant closure_halfspace_lt [simp]:
    6.92    assumes "a \<noteq> 0"
    6.93      shows "closure {x. a \<bullet> x < b} = {x. a \<bullet> x \<le> b}"
    6.94  proof -
    6.95 @@ -99,15 +99,15 @@
    6.96      by (force simp: closure_interior)
    6.97  qed
    6.98  
    6.99 -lemma closure_halfspace_gt [simp]:
   6.100 +lemma%unimportant closure_halfspace_gt [simp]:
   6.101     "a \<noteq> 0 \<Longrightarrow> closure {x. a \<bullet> x > b} = {x. a \<bullet> x \<ge> b}"
   6.102  using closure_halfspace_lt [of "-a" "-b"] by simp
   6.103  
   6.104 -lemma closure_halfspace_component_lt [simp]:
   6.105 +lemma%important closure_halfspace_component_lt [simp]:
   6.106       "closure {x. x$k < a} = {x :: (real^'n). x$k \<le> a}" (is "?LE")
   6.107    and closure_halfspace_component_gt [simp]:
   6.108       "closure {x. x$k > a} = {x :: (real^'n). x$k \<ge> a}" (is "?GE")
   6.109 -proof -
   6.110 +proof%unimportant -
   6.111    have "axis k (1::real) \<noteq> 0"
   6.112      by (simp add: axis_def vec_eq_iff)
   6.113    moreover have "axis k (1::real) \<bullet> x = x$k" for x
   6.114 @@ -117,17 +117,17 @@
   6.115            closure_halfspace_gt [of "axis k (1::real)" a] by auto
   6.116  qed
   6.117  
   6.118 -lemma interior_hyperplane [simp]:
   6.119 +lemma%unimportant interior_hyperplane [simp]:
   6.120    assumes "a \<noteq> 0"
   6.121      shows "interior {x. a \<bullet> x = b} = {}"
   6.122 -proof -
   6.123 +proof%unimportant -
   6.124    have [simp]: "{x. a \<bullet> x = b} = {x. a \<bullet> x \<le> b} \<inter> {x. a \<bullet> x \<ge> b}"
   6.125      by (force simp:)
   6.126    then show ?thesis
   6.127      by (auto simp: assms)
   6.128  qed
   6.129  
   6.130 -lemma frontier_halfspace_le:
   6.131 +lemma%unimportant frontier_halfspace_le:
   6.132    assumes "a \<noteq> 0 \<or> b \<noteq> 0"
   6.133      shows "frontier {x. a \<bullet> x \<le> b} = {x. a \<bullet> x = b}"
   6.134  proof (cases "a = 0")
   6.135 @@ -137,7 +137,7 @@
   6.136      by (force simp: frontier_def closed_halfspace_le)
   6.137  qed
   6.138  
   6.139 -lemma frontier_halfspace_ge:
   6.140 +lemma%unimportant frontier_halfspace_ge:
   6.141    assumes "a \<noteq> 0 \<or> b \<noteq> 0"
   6.142      shows "frontier {x. a \<bullet> x \<ge> b} = {x. a \<bullet> x = b}"
   6.143  proof (cases "a = 0")
   6.144 @@ -147,7 +147,7 @@
   6.145      by (force simp: frontier_def closed_halfspace_ge)
   6.146  qed
   6.147  
   6.148 -lemma frontier_halfspace_lt:
   6.149 +lemma%unimportant frontier_halfspace_lt:
   6.150    assumes "a \<noteq> 0 \<or> b \<noteq> 0"
   6.151      shows "frontier {x. a \<bullet> x < b} = {x. a \<bullet> x = b}"
   6.152  proof (cases "a = 0")
   6.153 @@ -157,19 +157,19 @@
   6.154      by (force simp: frontier_def interior_open open_halfspace_lt)
   6.155  qed
   6.156  
   6.157 -lemma frontier_halfspace_gt:
   6.158 +lemma%important frontier_halfspace_gt:
   6.159    assumes "a \<noteq> 0 \<or> b \<noteq> 0"
   6.160      shows "frontier {x. a \<bullet> x > b} = {x. a \<bullet> x = b}"
   6.161 -proof (cases "a = 0")
   6.162 +proof%unimportant (cases "a = 0")
   6.163    case True with assms show ?thesis by simp
   6.164  next
   6.165    case False then show ?thesis
   6.166      by (force simp: frontier_def interior_open open_halfspace_gt)
   6.167  qed
   6.168  
   6.169 -lemma interior_standard_hyperplane:
   6.170 +lemma%important interior_standard_hyperplane:
   6.171     "interior {x :: (real^'n). x$k = a} = {}"
   6.172 -proof -
   6.173 +proof%unimportant -
   6.174    have "axis k (1::real) \<noteq> 0"
   6.175      by (simp add: axis_def vec_eq_iff)
   6.176    moreover have "axis k (1::real) \<bullet> x = x$k" for x
   6.177 @@ -179,20 +179,20 @@
   6.178      by force
   6.179  qed
   6.180  
   6.181 -lemma matrix_mult_transpose_dot_column:
   6.182 +lemma%unimportant matrix_mult_transpose_dot_column:
   6.183    shows "transpose A ** A = (\<chi> i j. inner (column i A) (column j A))"
   6.184    by (simp add: matrix_matrix_mult_def vec_eq_iff transpose_def column_def inner_vec_def)
   6.185  
   6.186 -lemma matrix_mult_transpose_dot_row:
   6.187 +lemma%unimportant matrix_mult_transpose_dot_row:
   6.188    shows "A ** transpose A = (\<chi> i j. inner (row i A) (row j A))"
   6.189    by (simp add: matrix_matrix_mult_def vec_eq_iff transpose_def row_def inner_vec_def)
   6.190  
   6.191  text\<open>Two sometimes fruitful ways of looking at matrix-vector multiplication.\<close>
   6.192  
   6.193 -lemma matrix_mult_dot: "A *v x = (\<chi> i. inner (A$i) x)"
   6.194 +lemma%important matrix_mult_dot: "A *v x = (\<chi> i. inner (A$i) x)"
   6.195    by (simp add: matrix_vector_mult_def inner_vec_def)
   6.196  
   6.197 -lemma adjoint_matrix: "adjoint(\<lambda>x. (A::real^'n^'m) *v x) = (\<lambda>x. transpose A *v x)"
   6.198 +lemma%unimportant adjoint_matrix: "adjoint(\<lambda>x. (A::real^'n^'m) *v x) = (\<lambda>x. transpose A *v x)"
   6.199    apply (rule adjoint_unique)
   6.200    apply (simp add: transpose_def inner_vec_def matrix_vector_mult_def
   6.201      sum_distrib_right sum_distrib_left)
   6.202 @@ -200,9 +200,9 @@
   6.203    apply (simp add:  ac_simps)
   6.204    done
   6.205  
   6.206 -lemma matrix_adjoint: assumes lf: "linear (f :: real^'n \<Rightarrow> real ^'m)"
   6.207 +lemma%important matrix_adjoint: assumes lf: "linear (f :: real^'n \<Rightarrow> real ^'m)"
   6.208    shows "matrix(adjoint f) = transpose(matrix f)"
   6.209 -proof -
   6.210 +proof%unimportant -
   6.211    have "matrix(adjoint f) = matrix(adjoint (( *v) (matrix f)))"
   6.212      by (simp add: lf)
   6.213    also have "\<dots> = transpose(matrix f)"
   6.214 @@ -212,17 +212,17 @@
   6.215    finally show ?thesis .
   6.216  qed
   6.217  
   6.218 -lemma matrix_vector_mul_bounded_linear[intro, simp]: "bounded_linear (( *v) A)" for A :: "'a::{euclidean_space,real_algebra_1}^'n^'m"
   6.219 +lemma%unimportant matrix_vector_mul_bounded_linear[intro, simp]: "bounded_linear (( *v) A)" for A :: "'a::{euclidean_space,real_algebra_1}^'n^'m"
   6.220    using matrix_vector_mul_linear[of A]
   6.221    by (simp add: linear_conv_bounded_linear linear_matrix_vector_mul_eq)
   6.222  
   6.223 -lemma
   6.224 +lemma%unimportant (* FIX ME needs name*)
   6.225    fixes A :: "'a::{euclidean_space,real_algebra_1}^'n^'m"
   6.226    shows matrix_vector_mult_linear_continuous_at [continuous_intros]: "isCont (( *v) A) z"
   6.227      and matrix_vector_mult_linear_continuous_on [continuous_intros]: "continuous_on S (( *v) A)"
   6.228    by (simp_all add: linear_continuous_at linear_continuous_on)
   6.229  
   6.230 -lemma scalar_invertible:
   6.231 +lemma%unimportant scalar_invertible:
   6.232    fixes A :: "('a::real_algebra_1)^'m^'n"
   6.233    assumes "k \<noteq> 0" and "invertible A"
   6.234    shows "invertible (k *\<^sub>R A)"
   6.235 @@ -236,50 +236,50 @@
   6.236      unfolding invertible_def by auto
   6.237  qed
   6.238  
   6.239 -lemma scalar_invertible_iff:
   6.240 +lemma%unimportant scalar_invertible_iff:
   6.241    fixes A :: "('a::real_algebra_1)^'m^'n"
   6.242    assumes "k \<noteq> 0" and "invertible A"
   6.243    shows "invertible (k *\<^sub>R A) \<longleftrightarrow> k \<noteq> 0 \<and> invertible A"
   6.244    by (simp add: assms scalar_invertible)
   6.245  
   6.246 -lemma vector_transpose_matrix [simp]: "x v* transpose A = A *v x"
   6.247 +lemma%unimportant vector_transpose_matrix [simp]: "x v* transpose A = A *v x"
   6.248    unfolding transpose_def vector_matrix_mult_def matrix_vector_mult_def
   6.249    by simp
   6.250  
   6.251 -lemma transpose_matrix_vector [simp]: "transpose A *v x = x v* A"
   6.252 +lemma%unimportant transpose_matrix_vector [simp]: "transpose A *v x = x v* A"
   6.253    unfolding transpose_def vector_matrix_mult_def matrix_vector_mult_def
   6.254    by simp
   6.255  
   6.256 -lemma vector_scalar_commute:
   6.257 +lemma%unimportant vector_scalar_commute:
   6.258    fixes A :: "'a::{field}^'m^'n"
   6.259    shows "A *v (c *s x) = c *s (A *v x)"
   6.260    by (simp add: vector_scalar_mult_def matrix_vector_mult_def mult_ac sum_distrib_left)
   6.261  
   6.262 -lemma scalar_vector_matrix_assoc:
   6.263 +lemma%unimportant scalar_vector_matrix_assoc:
   6.264    fixes k :: "'a::{field}" and x :: "'a::{field}^'n" and A :: "'a^'m^'n"
   6.265    shows "(k *s x) v* A = k *s (x v* A)"
   6.266    by (metis transpose_matrix_vector vector_scalar_commute)
   6.267   
   6.268 -lemma vector_matrix_mult_0 [simp]: "0 v* A = 0"
   6.269 +lemma%unimportant vector_matrix_mult_0 [simp]: "0 v* A = 0"
   6.270    unfolding vector_matrix_mult_def by (simp add: zero_vec_def)
   6.271  
   6.272 -lemma vector_matrix_mult_0_right [simp]: "x v* 0 = 0"
   6.273 +lemma%unimportant vector_matrix_mult_0_right [simp]: "x v* 0 = 0"
   6.274    unfolding vector_matrix_mult_def by (simp add: zero_vec_def)
   6.275  
   6.276 -lemma vector_matrix_mul_rid [simp]:
   6.277 +lemma%unimportant vector_matrix_mul_rid [simp]:
   6.278    fixes v :: "('a::semiring_1)^'n"
   6.279    shows "v v* mat 1 = v"
   6.280    by (metis matrix_vector_mul_lid transpose_mat vector_transpose_matrix)
   6.281  
   6.282 -lemma scaleR_vector_matrix_assoc:
   6.283 +lemma%unimportant scaleR_vector_matrix_assoc:
   6.284    fixes k :: real and x :: "real^'n" and A :: "real^'m^'n"
   6.285    shows "(k *\<^sub>R x) v* A = k *\<^sub>R (x v* A)"
   6.286    by (metis matrix_vector_mult_scaleR transpose_matrix_vector)
   6.287  
   6.288 -lemma vector_scaleR_matrix_ac:
   6.289 +lemma%important vector_scaleR_matrix_ac:
   6.290    fixes k :: real and x :: "real^'n" and A :: "real^'m^'n"
   6.291    shows "x v* (k *\<^sub>R A) = k *\<^sub>R (x v* A)"
   6.292 -proof -
   6.293 +proof%unimportant -
   6.294    have "x v* (k *\<^sub>R A) = (k *\<^sub>R x) v* A"
   6.295      unfolding vector_matrix_mult_def
   6.296      by (simp add: algebra_simps)
   6.297 @@ -289,12 +289,12 @@
   6.298  qed
   6.299  
   6.300  
   6.301 -subsection\<open>Some bounds on components etc. relative to operator norm\<close>
   6.302 +subsection%important\<open>Some bounds on components etc. relative to operator norm\<close>
   6.303  
   6.304 -lemma norm_column_le_onorm:
   6.305 +lemma%important norm_column_le_onorm:
   6.306    fixes A :: "real^'n^'m"
   6.307    shows "norm(column i A) \<le> onorm(( *v) A)"
   6.308 -proof -
   6.309 +proof%unimportant -
   6.310    have "norm (\<chi> j. A $ j $ i) \<le> norm (A *v axis i 1)"
   6.311      by (simp add: matrix_mult_dot cart_eq_inner_axis)
   6.312    also have "\<dots> \<le> onorm (( *v) A)"
   6.313 @@ -304,10 +304,10 @@
   6.314      unfolding column_def .
   6.315  qed
   6.316  
   6.317 -lemma matrix_component_le_onorm:
   6.318 +lemma%important matrix_component_le_onorm:
   6.319    fixes A :: "real^'n^'m"
   6.320    shows "\<bar>A $ i $ j\<bar> \<le> onorm(( *v) A)"
   6.321 -proof -
   6.322 +proof%unimportant -
   6.323    have "\<bar>A $ i $ j\<bar> \<le> norm (\<chi> n. (A $ n $ j))"
   6.324      by (metis (full_types, lifting) component_le_norm_cart vec_lambda_beta)
   6.325    also have "\<dots> \<le> onorm (( *v) A)"
   6.326 @@ -315,15 +315,15 @@
   6.327    finally show ?thesis .
   6.328  qed
   6.329  
   6.330 -lemma component_le_onorm:
   6.331 +lemma%unimportant component_le_onorm:
   6.332    fixes f :: "real^'m \<Rightarrow> real^'n"
   6.333    shows "linear f \<Longrightarrow> \<bar>matrix f $ i $ j\<bar> \<le> onorm f"
   6.334    by (metis linear_matrix_vector_mul_eq matrix_component_le_onorm matrix_vector_mul)
   6.335  
   6.336 -lemma onorm_le_matrix_component_sum:
   6.337 +lemma%important onorm_le_matrix_component_sum:
   6.338    fixes A :: "real^'n^'m"
   6.339    shows "onorm(( *v) A) \<le> (\<Sum>i\<in>UNIV. \<Sum>j\<in>UNIV. \<bar>A $ i $ j\<bar>)"
   6.340 -proof (rule onorm_le)
   6.341 +proof%unimportant (rule onorm_le)
   6.342    fix x
   6.343    have "norm (A *v x) \<le> (\<Sum>i\<in>UNIV. \<bar>(A *v x) $ i\<bar>)"
   6.344      by (rule norm_le_l1_cart)
   6.345 @@ -342,11 +342,11 @@
   6.346      by (simp add: sum_distrib_right)
   6.347  qed
   6.348  
   6.349 -lemma onorm_le_matrix_component:
   6.350 +lemma%important onorm_le_matrix_component:
   6.351    fixes A :: "real^'n^'m"
   6.352    assumes "\<And>i j. abs(A$i$j) \<le> B"
   6.353    shows "onorm(( *v) A) \<le> real (CARD('m)) * real (CARD('n)) * B"
   6.354 -proof (rule onorm_le)
   6.355 +proof%unimportant (rule onorm_le)
   6.356    fix x :: "real^'n::_"
   6.357    have "norm (A *v x) \<le> (\<Sum>i\<in>UNIV. \<bar>(A *v x) $ i\<bar>)"
   6.358      by (rule norm_le_l1_cart)
   6.359 @@ -366,11 +366,11 @@
   6.360    finally show "norm (A *v x) \<le> CARD('m) * real (CARD('n)) * B * norm x" .
   6.361  qed
   6.362  
   6.363 -subsection \<open>lambda skolemization on cartesian products\<close>
   6.364 +subsection%important \<open>lambda skolemization on cartesian products\<close>
   6.365  
   6.366 -lemma lambda_skolem: "(\<forall>i. \<exists>x. P i x) \<longleftrightarrow>
   6.367 +lemma%important lambda_skolem: "(\<forall>i. \<exists>x. P i x) \<longleftrightarrow>
   6.368     (\<exists>x::'a ^ 'n. \<forall>i. P i (x $ i))" (is "?lhs \<longleftrightarrow> ?rhs")
   6.369 -proof -
   6.370 +proof%unimportant -
   6.371    let ?S = "(UNIV :: 'n set)"
   6.372    { assume H: "?rhs"
   6.373      then have ?lhs by auto }
   6.374 @@ -387,16 +387,16 @@
   6.375    ultimately show ?thesis by metis
   6.376  qed
   6.377  
   6.378 -lemma rational_approximation:
   6.379 +lemma%unimportant rational_approximation:
   6.380    assumes "e > 0"
   6.381    obtains r::real where "r \<in> \<rat>" "\<bar>r - x\<bar> < e"
   6.382    using Rats_dense_in_real [of "x - e/2" "x + e/2"] assms by auto
   6.383  
   6.384 -lemma matrix_rational_approximation:
   6.385 +lemma%important matrix_rational_approximation:
   6.386    fixes A :: "real^'n^'m"
   6.387    assumes "e > 0"
   6.388    obtains B where "\<And>i j. B$i$j \<in> \<rat>" "onorm(\<lambda>x. (A - B) *v x) < e"
   6.389 -proof -
   6.390 +proof%unimportant -
   6.391    have "\<forall>i j. \<exists>q \<in> \<rat>. \<bar>q - A $ i $ j\<bar> < e / (2 * CARD('m) * CARD('n))"
   6.392      using assms by (force intro: rational_approximation [of "e / (2 * CARD('m) * CARD('n))"])
   6.393    then obtain B where B: "\<And>i j. B$i$j \<in> \<rat>" and Bclo: "\<And>i j. \<bar>B$i$j - A $ i $ j\<bar> < e / (2 * CARD('m) * CARD('n))"
   6.394 @@ -413,7 +413,7 @@
   6.395    qed (use B in auto)
   6.396  qed
   6.397  
   6.398 -lemma vector_sub_project_orthogonal_cart: "(b::real^'n) \<bullet> (x - ((b \<bullet> x) / (b \<bullet> b)) *s b) = 0"
   6.399 +lemma%unimportant vector_sub_project_orthogonal_cart: "(b::real^'n) \<bullet> (x - ((b \<bullet> x) / (b \<bullet> b)) *s b) = 0"
   6.400    unfolding inner_simps scalar_mult_eq_scaleR by auto
   6.401  
   6.402  
   6.403 @@ -422,51 +422,51 @@
   6.404  
   6.405  text \<open>Considering an n-element vector as an n-by-1 or 1-by-n matrix.\<close>
   6.406  
   6.407 -definition "rowvector v = (\<chi> i j. (v$j))"
   6.408 +definition%unimportant "rowvector v = (\<chi> i j. (v$j))"
   6.409  
   6.410 -definition "columnvector v = (\<chi> i j. (v$i))"
   6.411 +definition%unimportant "columnvector v = (\<chi> i j. (v$i))"
   6.412  
   6.413 -lemma transpose_columnvector: "transpose(columnvector v) = rowvector v"
   6.414 +lemma%unimportant transpose_columnvector: "transpose(columnvector v) = rowvector v"
   6.415    by (simp add: transpose_def rowvector_def columnvector_def vec_eq_iff)
   6.416  
   6.417 -lemma transpose_rowvector: "transpose(rowvector v) = columnvector v"
   6.418 +lemma%unimportant transpose_rowvector: "transpose(rowvector v) = columnvector v"
   6.419    by (simp add: transpose_def columnvector_def rowvector_def vec_eq_iff)
   6.420  
   6.421 -lemma dot_rowvector_columnvector: "columnvector (A *v v) = A ** columnvector v"
   6.422 +lemma%unimportant dot_rowvector_columnvector: "columnvector (A *v v) = A ** columnvector v"
   6.423    by (vector columnvector_def matrix_matrix_mult_def matrix_vector_mult_def)
   6.424  
   6.425 -lemma dot_matrix_product:
   6.426 +lemma%unimportant dot_matrix_product:
   6.427    "(x::real^'n) \<bullet> y = (((rowvector x ::real^'n^1) ** (columnvector y :: real^1^'n))$1)$1"
   6.428    by (vector matrix_matrix_mult_def rowvector_def columnvector_def inner_vec_def)
   6.429  
   6.430 -lemma dot_matrix_vector_mul:
   6.431 +lemma%unimportant dot_matrix_vector_mul:
   6.432    fixes A B :: "real ^'n ^'n" and x y :: "real ^'n"
   6.433    shows "(A *v x) \<bullet> (B *v y) =
   6.434        (((rowvector x :: real^'n^1) ** ((transpose A ** B) ** (columnvector y :: real ^1^'n)))$1)$1"
   6.435    unfolding dot_matrix_product transpose_columnvector[symmetric]
   6.436      dot_rowvector_columnvector matrix_transpose_mul matrix_mul_assoc ..
   6.437  
   6.438 -lemma infnorm_cart:"infnorm (x::real^'n) = Sup {\<bar>x$i\<bar> |i. i\<in>UNIV}"
   6.439 +lemma%unimportant infnorm_cart:"infnorm (x::real^'n) = Sup {\<bar>x$i\<bar> |i. i\<in>UNIV}"
   6.440    by (simp add: infnorm_def inner_axis Basis_vec_def) (metis (lifting) inner_axis real_inner_1_right)
   6.441  
   6.442 -lemma component_le_infnorm_cart: "\<bar>x$i\<bar> \<le> infnorm (x::real^'n)"
   6.443 +lemma%unimportant component_le_infnorm_cart: "\<bar>x$i\<bar> \<le> infnorm (x::real^'n)"
   6.444    using Basis_le_infnorm[of "axis i 1" x]
   6.445    by (simp add: Basis_vec_def axis_eq_axis inner_axis)
   6.446  
   6.447 -lemma continuous_component[continuous_intros]: "continuous F f \<Longrightarrow> continuous F (\<lambda>x. f x $ i)"
   6.448 +lemma%unimportant continuous_component[continuous_intros]: "continuous F f \<Longrightarrow> continuous F (\<lambda>x. f x $ i)"
   6.449    unfolding continuous_def by (rule tendsto_vec_nth)
   6.450  
   6.451 -lemma continuous_on_component[continuous_intros]: "continuous_on s f \<Longrightarrow> continuous_on s (\<lambda>x. f x $ i)"
   6.452 +lemma%unimportant continuous_on_component[continuous_intros]: "continuous_on s f \<Longrightarrow> continuous_on s (\<lambda>x. f x $ i)"
   6.453    unfolding continuous_on_def by (fast intro: tendsto_vec_nth)
   6.454  
   6.455 -lemma continuous_on_vec_lambda[continuous_intros]:
   6.456 +lemma%unimportant continuous_on_vec_lambda[continuous_intros]:
   6.457    "(\<And>i. continuous_on S (f i)) \<Longrightarrow> continuous_on S (\<lambda>x. \<chi> i. f i x)"
   6.458    unfolding continuous_on_def by (auto intro: tendsto_vec_lambda)
   6.459  
   6.460 -lemma closed_positive_orthant: "closed {x::real^'n. \<forall>i. 0 \<le>x$i}"
   6.461 +lemma%unimportant closed_positive_orthant: "closed {x::real^'n. \<forall>i. 0 \<le>x$i}"
   6.462    by (simp add: Collect_all_eq closed_INT closed_Collect_le continuous_on_const continuous_on_id continuous_on_component)
   6.463  
   6.464 -lemma bounded_component_cart: "bounded s \<Longrightarrow> bounded ((\<lambda>x. x $ i) ` s)"
   6.465 +lemma%unimportant bounded_component_cart: "bounded s \<Longrightarrow> bounded ((\<lambda>x. x $ i) ` s)"
   6.466    unfolding bounded_def
   6.467    apply clarify
   6.468    apply (rule_tac x="x $ i" in exI)
   6.469 @@ -475,13 +475,13 @@
   6.470    apply (rule order_trans [OF dist_vec_nth_le], simp)
   6.471    done
   6.472  
   6.473 -lemma compact_lemma_cart:
   6.474 +lemma%important compact_lemma_cart:
   6.475    fixes f :: "nat \<Rightarrow> 'a::heine_borel ^ 'n"
   6.476    assumes f: "bounded (range f)"
   6.477    shows "\<exists>l r. strict_mono r \<and>
   6.478          (\<forall>e>0. eventually (\<lambda>n. \<forall>i\<in>d. dist (f (r n) $ i) (l $ i) < e) sequentially)"
   6.479      (is "?th d")
   6.480 -proof -
   6.481 +proof%unimportant -
   6.482    have "\<forall>d' \<subseteq> d. ?th d'"
   6.483      by (rule compact_lemma_general[where unproj=vec_lambda])
   6.484        (auto intro!: f bounded_component_cart simp: vec_lambda_eta)
   6.485 @@ -517,19 +517,19 @@
   6.486    with r show "\<exists>l r. strict_mono r \<and> ((f \<circ> r) \<longlongrightarrow> l) sequentially" by auto
   6.487  qed
   6.488  
   6.489 -lemma interval_cart:
   6.490 +lemma%unimportant interval_cart:
   6.491    fixes a :: "real^'n"
   6.492    shows "box a b = {x::real^'n. \<forall>i. a$i < x$i \<and> x$i < b$i}"
   6.493      and "cbox a b = {x::real^'n. \<forall>i. a$i \<le> x$i \<and> x$i \<le> b$i}"
   6.494    by (auto simp add: set_eq_iff less_vec_def less_eq_vec_def mem_box Basis_vec_def inner_axis)
   6.495  
   6.496 -lemma mem_box_cart:
   6.497 +lemma%unimportant mem_box_cart:
   6.498    fixes a :: "real^'n"
   6.499    shows "x \<in> box a b \<longleftrightarrow> (\<forall>i. a$i < x$i \<and> x$i < b$i)"
   6.500      and "x \<in> cbox a b \<longleftrightarrow> (\<forall>i. a$i \<le> x$i \<and> x$i \<le> b$i)"
   6.501    using interval_cart[of a b] by (auto simp add: set_eq_iff less_vec_def less_eq_vec_def)
   6.502  
   6.503 -lemma interval_eq_empty_cart:
   6.504 +lemma%unimportant interval_eq_empty_cart:
   6.505    fixes a :: "real^'n"
   6.506    shows "(box a b = {} \<longleftrightarrow> (\<exists>i. b$i \<le> a$i))" (is ?th1)
   6.507      and "(cbox a b = {} \<longleftrightarrow> (\<exists>i. b$i < a$i))" (is ?th2)
   6.508 @@ -565,14 +565,14 @@
   6.509    ultimately show ?th2 by blast
   6.510  qed
   6.511  
   6.512 -lemma interval_ne_empty_cart:
   6.513 +lemma%unimportant interval_ne_empty_cart:
   6.514    fixes a :: "real^'n"
   6.515    shows "cbox a b \<noteq> {} \<longleftrightarrow> (\<forall>i. a$i \<le> b$i)"
   6.516      and "box a b \<noteq> {} \<longleftrightarrow> (\<forall>i. a$i < b$i)"
   6.517    unfolding interval_eq_empty_cart[of a b] by (auto simp add: not_less not_le)
   6.518      (* BH: Why doesn't just "auto" work here? *)
   6.519  
   6.520 -lemma subset_interval_imp_cart:
   6.521 +lemma%unimportant subset_interval_imp_cart:
   6.522    fixes a :: "real^'n"
   6.523    shows "(\<forall>i. a$i \<le> c$i \<and> d$i \<le> b$i) \<Longrightarrow> cbox c d \<subseteq> cbox a b"
   6.524      and "(\<forall>i. a$i < c$i \<and> d$i < b$i) \<Longrightarrow> cbox c d \<subseteq> box a b"
   6.525 @@ -581,13 +581,13 @@
   6.526    unfolding subset_eq[unfolded Ball_def] unfolding mem_box_cart
   6.527    by (auto intro: order_trans less_le_trans le_less_trans less_imp_le) (* BH: Why doesn't just "auto" work here? *)
   6.528  
   6.529 -lemma interval_sing:
   6.530 +lemma%unimportant interval_sing:
   6.531    fixes a :: "'a::linorder^'n"
   6.532    shows "{a .. a} = {a} \<and> {a<..<a} = {}"
   6.533    apply (auto simp add: set_eq_iff less_vec_def less_eq_vec_def vec_eq_iff)
   6.534    done
   6.535  
   6.536 -lemma subset_interval_cart:
   6.537 +lemma%unimportant subset_interval_cart:
   6.538    fixes a :: "real^'n"
   6.539    shows "cbox c d \<subseteq> cbox a b \<longleftrightarrow> (\<forall>i. c$i \<le> d$i) --> (\<forall>i. a$i \<le> c$i \<and> d$i \<le> b$i)" (is ?th1)
   6.540      and "cbox c d \<subseteq> box a b \<longleftrightarrow> (\<forall>i. c$i \<le> d$i) --> (\<forall>i. a$i < c$i \<and> d$i < b$i)" (is ?th2)
   6.541 @@ -595,7 +595,7 @@
   6.542      and "box c d \<subseteq> box a b \<longleftrightarrow> (\<forall>i. c$i < d$i) --> (\<forall>i. a$i \<le> c$i \<and> d$i \<le> b$i)" (is ?th4)
   6.543    using subset_box[of c d a b] by (simp_all add: Basis_vec_def inner_axis)
   6.544  
   6.545 -lemma disjoint_interval_cart:
   6.546 +lemma%unimportant disjoint_interval_cart:
   6.547    fixes a::"real^'n"
   6.548    shows "cbox a b \<inter> cbox c d = {} \<longleftrightarrow> (\<exists>i. (b$i < a$i \<or> d$i < c$i \<or> b$i < c$i \<or> d$i < a$i))" (is ?th1)
   6.549      and "cbox a b \<inter> box c d = {} \<longleftrightarrow> (\<exists>i. (b$i < a$i \<or> d$i \<le> c$i \<or> b$i \<le> c$i \<or> d$i \<le> a$i))" (is ?th2)
   6.550 @@ -603,53 +603,53 @@
   6.551      and "box a b \<inter> box c d = {} \<longleftrightarrow> (\<exists>i. (b$i \<le> a$i \<or> d$i \<le> c$i \<or> b$i \<le> c$i \<or> d$i \<le> a$i))" (is ?th4)
   6.552    using disjoint_interval[of a b c d] by (simp_all add: Basis_vec_def inner_axis)
   6.553  
   6.554 -lemma Int_interval_cart:
   6.555 +lemma%unimportant Int_interval_cart:
   6.556    fixes a :: "real^'n"
   6.557    shows "cbox a b \<inter> cbox c d =  {(\<chi> i. max (a$i) (c$i)) .. (\<chi> i. min (b$i) (d$i))}"
   6.558    unfolding Int_interval
   6.559    by (auto simp: mem_box less_eq_vec_def)
   6.560      (auto simp: Basis_vec_def inner_axis)
   6.561  
   6.562 -lemma closed_interval_left_cart:
   6.563 +lemma%unimportant closed_interval_left_cart:
   6.564    fixes b :: "real^'n"
   6.565    shows "closed {x::real^'n. \<forall>i. x$i \<le> b$i}"
   6.566    by (simp add: Collect_all_eq closed_INT closed_Collect_le continuous_on_const continuous_on_id continuous_on_component)
   6.567  
   6.568 -lemma closed_interval_right_cart:
   6.569 +lemma%unimportant closed_interval_right_cart:
   6.570    fixes a::"real^'n"
   6.571    shows "closed {x::real^'n. \<forall>i. a$i \<le> x$i}"
   6.572    by (simp add: Collect_all_eq closed_INT closed_Collect_le continuous_on_const continuous_on_id continuous_on_component)
   6.573  
   6.574 -lemma is_interval_cart:
   6.575 +lemma%unimportant is_interval_cart:
   6.576    "is_interval (s::(real^'n) set) \<longleftrightarrow>
   6.577      (\<forall>a\<in>s. \<forall>b\<in>s. \<forall>x. (\<forall>i. ((a$i \<le> x$i \<and> x$i \<le> b$i) \<or> (b$i \<le> x$i \<and> x$i \<le> a$i))) \<longrightarrow> x \<in> s)"
   6.578    by (simp add: is_interval_def Ball_def Basis_vec_def inner_axis imp_ex)
   6.579  
   6.580 -lemma closed_halfspace_component_le_cart: "closed {x::real^'n. x$i \<le> a}"
   6.581 +lemma%unimportant closed_halfspace_component_le_cart: "closed {x::real^'n. x$i \<le> a}"
   6.582    by (simp add: closed_Collect_le continuous_on_const continuous_on_id continuous_on_component)
   6.583  
   6.584 -lemma closed_halfspace_component_ge_cart: "closed {x::real^'n. x$i \<ge> a}"
   6.585 +lemma%unimportant closed_halfspace_component_ge_cart: "closed {x::real^'n. x$i \<ge> a}"
   6.586    by (simp add: closed_Collect_le continuous_on_const continuous_on_id continuous_on_component)
   6.587  
   6.588 -lemma open_halfspace_component_lt_cart: "open {x::real^'n. x$i < a}"
   6.589 +lemma%unimportant open_halfspace_component_lt_cart: "open {x::real^'n. x$i < a}"
   6.590    by (simp add: open_Collect_less continuous_on_const continuous_on_id continuous_on_component)
   6.591  
   6.592 -lemma open_halfspace_component_gt_cart: "open {x::real^'n. x$i  > a}"
   6.593 +lemma%unimportant open_halfspace_component_gt_cart: "open {x::real^'n. x$i  > a}"
   6.594    by (simp add: open_Collect_less continuous_on_const continuous_on_id continuous_on_component)
   6.595  
   6.596 -lemma Lim_component_le_cart:
   6.597 +lemma%unimportant Lim_component_le_cart:
   6.598    fixes f :: "'a \<Rightarrow> real^'n"
   6.599    assumes "(f \<longlongrightarrow> l) net" "\<not> (trivial_limit net)"  "eventually (\<lambda>x. f x $i \<le> b) net"
   6.600    shows "l$i \<le> b"
   6.601    by (rule tendsto_le[OF assms(2) tendsto_const tendsto_vec_nth, OF assms(1, 3)])
   6.602  
   6.603 -lemma Lim_component_ge_cart:
   6.604 +lemma%unimportant Lim_component_ge_cart:
   6.605    fixes f :: "'a \<Rightarrow> real^'n"
   6.606    assumes "(f \<longlongrightarrow> l) net"  "\<not> (trivial_limit net)"  "eventually (\<lambda>x. b \<le> (f x)$i) net"
   6.607    shows "b \<le> l$i"
   6.608    by (rule tendsto_le[OF assms(2) tendsto_vec_nth tendsto_const, OF assms(1, 3)])
   6.609  
   6.610 -lemma Lim_component_eq_cart:
   6.611 +lemma%unimportant Lim_component_eq_cart:
   6.612    fixes f :: "'a \<Rightarrow> real^'n"
   6.613    assumes net: "(f \<longlongrightarrow> l) net" "~(trivial_limit net)" and ev:"eventually (\<lambda>x. f(x)$i = b) net"
   6.614    shows "l$i = b"
   6.615 @@ -657,18 +657,18 @@
   6.616      Lim_component_ge_cart[OF net, of b i] and
   6.617      Lim_component_le_cart[OF net, of i b] by auto
   6.618  
   6.619 -lemma connected_ivt_component_cart:
   6.620 +lemma%unimportant connected_ivt_component_cart:
   6.621    fixes x :: "real^'n"
   6.622    shows "connected s \<Longrightarrow> x \<in> s \<Longrightarrow> y \<in> s \<Longrightarrow> x$k \<le> a \<Longrightarrow> a \<le> y$k \<Longrightarrow> (\<exists>z\<in>s.  z$k = a)"
   6.623    using connected_ivt_hyperplane[of s x y "axis k 1" a]
   6.624    by (auto simp add: inner_axis inner_commute)
   6.625  
   6.626 -lemma subspace_substandard_cart: "vec.subspace {x. (\<forall>i. P i \<longrightarrow> x$i = 0)}"
   6.627 +lemma%unimportant subspace_substandard_cart: "vec.subspace {x. (\<forall>i. P i \<longrightarrow> x$i = 0)}"
   6.628    unfolding vec.subspace_def by auto
   6.629  
   6.630 -lemma closed_substandard_cart:
   6.631 +lemma%important closed_substandard_cart:
   6.632    "closed {x::'a::real_normed_vector ^ 'n. \<forall>i. P i \<longrightarrow> x$i = 0}"
   6.633 -proof -
   6.634 +proof%unimportant -
   6.635    { fix i::'n
   6.636      have "closed {x::'a ^ 'n. P i \<longrightarrow> x$i = 0}"
   6.637        by (cases "P i") (simp_all add: closed_Collect_eq continuous_on_const continuous_on_id continuous_on_component) }
   6.638 @@ -676,9 +676,9 @@
   6.639      unfolding Collect_all_eq by (simp add: closed_INT)
   6.640  qed
   6.641  
   6.642 -lemma dim_substandard_cart: "vec.dim {x::'a::field^'n. \<forall>i. i \<notin> d \<longrightarrow> x$i = 0} = card d"
   6.643 +lemma%important dim_substandard_cart: "vec.dim {x::'a::field^'n. \<forall>i. i \<notin> d \<longrightarrow> x$i = 0} = card d"
   6.644    (is "vec.dim ?A = _")
   6.645 -proof (rule vec.dim_unique)
   6.646 +proof%unimportant (rule vec.dim_unique)
   6.647    let ?B = "((\<lambda>x. axis x 1) ` d)"
   6.648    have subset_basis: "?B \<subseteq> cart_basis"
   6.649      by (auto simp: cart_basis_def)
   6.650 @@ -703,27 +703,27 @@
   6.651    then show "?A \<subseteq> vec.span ?B" by auto
   6.652  qed (simp add: card_image inj_on_def axis_eq_axis)
   6.653  
   6.654 -lemma dim_subset_UNIV_cart_gen:
   6.655 +lemma%unimportant dim_subset_UNIV_cart_gen:
   6.656    fixes S :: "('a::field^'n) set"
   6.657    shows "vec.dim S \<le> CARD('n)"
   6.658    by (metis vec.dim_eq_full vec.dim_subset_UNIV vec.span_UNIV vec_dim_card)
   6.659  
   6.660 -lemma dim_subset_UNIV_cart:
   6.661 +lemma%unimportant dim_subset_UNIV_cart:
   6.662    fixes S :: "(real^'n) set"
   6.663    shows "dim S \<le> CARD('n)"
   6.664    using dim_subset_UNIV_cart_gen[of S] by (simp add: dim_vec_eq)
   6.665  
   6.666 -lemma affinity_inverses:
   6.667 +lemma%unimportant affinity_inverses:
   6.668    assumes m0: "m \<noteq> (0::'a::field)"
   6.669    shows "(\<lambda>x. m *s x + c) \<circ> (\<lambda>x. inverse(m) *s x + (-(inverse(m) *s c))) = id"
   6.670    "(\<lambda>x. inverse(m) *s x + (-(inverse(m) *s c))) \<circ> (\<lambda>x. m *s x + c) = id"
   6.671    using m0
   6.672    by (auto simp add: fun_eq_iff vector_add_ldistrib diff_conv_add_uminus simp del: add_uminus_conv_diff)
   6.673  
   6.674 -lemma vector_affinity_eq:
   6.675 +lemma%important vector_affinity_eq:
   6.676    assumes m0: "(m::'a::field) \<noteq> 0"
   6.677    shows "m *s x + c = y \<longleftrightarrow> x = inverse m *s y + -(inverse m *s c)"
   6.678 -proof
   6.679 +proof%unimportant
   6.680    assume h: "m *s x + c = y"
   6.681    hence "m *s x = y - c" by (simp add: field_simps)
   6.682    hence "inverse m *s (m *s x) = inverse m *s (y - c)" by simp
   6.683 @@ -735,48 +735,48 @@
   6.684      using m0 by (simp add: vector_smult_assoc vector_ssub_ldistrib)
   6.685  qed
   6.686  
   6.687 -lemma vector_eq_affinity:
   6.688 +lemma%unimportant vector_eq_affinity:
   6.689      "(m::'a::field) \<noteq> 0 ==> (y = m *s x + c \<longleftrightarrow> inverse(m) *s y + -(inverse(m) *s c) = x)"
   6.690    using vector_affinity_eq[where m=m and x=x and y=y and c=c]
   6.691    by metis
   6.692  
   6.693 -lemma vector_cart:
   6.694 +lemma%unimportant vector_cart:
   6.695    fixes f :: "real^'n \<Rightarrow> real"
   6.696    shows "(\<chi> i. f (axis i 1)) = (\<Sum>i\<in>Basis. f i *\<^sub>R i)"
   6.697    unfolding euclidean_eq_iff[where 'a="real^'n"]
   6.698    by simp (simp add: Basis_vec_def inner_axis)
   6.699  
   6.700 -lemma const_vector_cart:"((\<chi> i. d)::real^'n) = (\<Sum>i\<in>Basis. d *\<^sub>R i)"
   6.701 +lemma%unimportant const_vector_cart:"((\<chi> i. d)::real^'n) = (\<Sum>i\<in>Basis. d *\<^sub>R i)"
   6.702    by (rule vector_cart)
   6.703  
   6.704 -subsection "Convex Euclidean Space"
   6.705 +subsection%important "Convex Euclidean Space"
   6.706  
   6.707 -lemma Cart_1:"(1::real^'n) = \<Sum>Basis"
   6.708 +lemma%unimportant Cart_1:"(1::real^'n) = \<Sum>Basis"
   6.709    using const_vector_cart[of 1] by (simp add: one_vec_def)
   6.710  
   6.711  declare vector_add_ldistrib[simp] vector_ssub_ldistrib[simp] vector_smult_assoc[simp] vector_smult_rneg[simp]
   6.712  declare vector_sadd_rdistrib[simp] vector_sub_rdistrib[simp]
   6.713  
   6.714 -lemmas vector_component_simps = vector_minus_component vector_smult_component vector_add_component less_eq_vec_def vec_lambda_beta vector_uminus_component
   6.715 +lemmas%unimportant vector_component_simps = vector_minus_component vector_smult_component vector_add_component less_eq_vec_def vec_lambda_beta vector_uminus_component
   6.716  
   6.717 -lemma convex_box_cart:
   6.718 +lemma%unimportant convex_box_cart:
   6.719    assumes "\<And>i. convex {x. P i x}"
   6.720    shows "convex {x. \<forall>i. P i (x$i)}"
   6.721    using assms unfolding convex_def by auto
   6.722  
   6.723 -lemma convex_positive_orthant_cart: "convex {x::real^'n. (\<forall>i. 0 \<le> x$i)}"
   6.724 +lemma%unimportant convex_positive_orthant_cart: "convex {x::real^'n. (\<forall>i. 0 \<le> x$i)}"
   6.725    by (rule convex_box_cart) (simp add: atLeast_def[symmetric])
   6.726  
   6.727 -lemma unit_interval_convex_hull_cart:
   6.728 +lemma%unimportant unit_interval_convex_hull_cart:
   6.729    "cbox (0::real^'n) 1 = convex hull {x. \<forall>i. (x$i = 0) \<or> (x$i = 1)}"
   6.730    unfolding Cart_1 unit_interval_convex_hull[where 'a="real^'n"] box_real[symmetric]
   6.731    by (rule arg_cong[where f="\<lambda>x. convex hull x"]) (simp add: Basis_vec_def inner_axis)
   6.732  
   6.733 -lemma cube_convex_hull_cart:
   6.734 +lemma%important cube_convex_hull_cart:
   6.735    assumes "0 < d"
   6.736    obtains s::"(real^'n) set"
   6.737      where "finite s" "cbox (x - (\<chi> i. d)) (x + (\<chi> i. d)) = convex hull s"
   6.738 -proof -
   6.739 +proof%unimportant -
   6.740    from assms obtain s where "finite s"
   6.741      and "cbox (x - sum (( *\<^sub>R) d) Basis) (x + sum (( *\<^sub>R) d) Basis) = convex hull s"
   6.742      by (rule cube_convex_hull)
   6.743 @@ -785,14 +785,14 @@
   6.744  qed
   6.745  
   6.746  
   6.747 -subsection "Derivative"
   6.748 +subsection%important "Derivative"
   6.749  
   6.750 -definition "jacobian f net = matrix(frechet_derivative f net)"
   6.751 +definition%important "jacobian f net = matrix(frechet_derivative f net)"
   6.752  
   6.753 -lemma jacobian_works:
   6.754 +lemma%important jacobian_works:
   6.755    "(f::(real^'a) \<Rightarrow> (real^'b)) differentiable net \<longleftrightarrow>
   6.756      (f has_derivative (\<lambda>h. (jacobian f net) *v h)) net" (is "?lhs = ?rhs")
   6.757 -proof
   6.758 +proof%unimportant
   6.759    assume ?lhs then show ?rhs
   6.760      by (simp add: frechet_derivative_works has_derivative_linear jacobian_def)
   6.761  next
   6.762 @@ -801,10 +801,10 @@
   6.763  qed
   6.764  
   6.765  
   6.766 -subsection \<open>Component of the differential must be zero if it exists at a local
   6.767 +subsection%important \<open>Component of the differential must be zero if it exists at a local
   6.768    maximum or minimum for that corresponding component\<close>
   6.769  
   6.770 -lemma differential_zero_maxmin_cart:
   6.771 +lemma%important differential_zero_maxmin_cart:
   6.772    fixes f::"real^'a \<Rightarrow> real^'b"
   6.773    assumes "0 < e" "((\<forall>y \<in> ball x e. (f y)$k \<le> (f x)$k) \<or> (\<forall>y\<in>ball x e. (f x)$k \<le> (f y)$k))"
   6.774      "f differentiable (at x)"
   6.775 @@ -813,7 +813,7 @@
   6.776      vector_cart[of "\<lambda>j. frechet_derivative f (at x) j $ k"]
   6.777    by (simp add: Basis_vec_def axis_eq_axis inner_axis jacobian_def matrix_def)
   6.778  
   6.779 -subsection \<open>Lemmas for working on @{typ "real^1"}\<close>
   6.780 +subsection%unimportant \<open>Lemmas for working on @{typ "real^1"}\<close>
   6.781  
   6.782  lemma forall_1[simp]: "(\<forall>i::1. P i) \<longleftrightarrow> P 1"
   6.783    by (metis (full_types) num1_eq_iff)
   6.784 @@ -893,7 +893,7 @@
   6.785  instance num1 :: wellorder
   6.786    by intro_classes (auto simp: less_eq_num1_def less_num1_def)
   6.787  
   6.788 -subsection\<open>The collapse of the general concepts to dimension one\<close>
   6.789 +subsection%unimportant\<open>The collapse of the general concepts to dimension one\<close>
   6.790  
   6.791  lemma vector_one: "(x::'a ^1) = (\<chi> i. (x$1))"
   6.792    by (simp add: vec_eq_iff)
   6.793 @@ -918,11 +918,11 @@
   6.794  lemma dist_real: "dist(x::real ^ 1) y = \<bar>(x$1) - (y$1)\<bar>"
   6.795    by (auto simp add: norm_real dist_norm)
   6.796  
   6.797 -subsection\<open> Rank of a matrix\<close>
   6.798 +subsection%important\<open> Rank of a matrix\<close>
   6.799  
   6.800  text\<open>Equivalence of row and column rank is taken from George Mackiw's paper, Mathematics Magazine 1995, p. 285.\<close>
   6.801  
   6.802 -lemma matrix_vector_mult_in_columnspace_gen:
   6.803 +lemma%unimportant matrix_vector_mult_in_columnspace_gen:
   6.804    fixes A :: "'a::field^'n^'m"
   6.805    shows "(A *v x) \<in> vec.span(columns A)"
   6.806    apply (simp add: matrix_vector_column columns_def transpose_def column_def)
   6.807 @@ -930,17 +930,17 @@
   6.808    apply (force intro: vec.span_base)
   6.809    done
   6.810  
   6.811 -lemma matrix_vector_mult_in_columnspace:
   6.812 +lemma%unimportant matrix_vector_mult_in_columnspace:
   6.813    fixes A :: "real^'n^'m"
   6.814    shows "(A *v x) \<in> span(columns A)"
   6.815    using matrix_vector_mult_in_columnspace_gen[of A x] by (simp add: span_vec_eq)
   6.816  
   6.817 -lemma orthogonal_nullspace_rowspace:
   6.818 +lemma%important orthogonal_nullspace_rowspace:
   6.819    fixes A :: "real^'n^'m"
   6.820    assumes 0: "A *v x = 0" and y: "y \<in> span(rows A)"
   6.821    shows "orthogonal x y"
   6.822    using y
   6.823 -proof (induction rule: span_induct)
   6.824 +proof%unimportant (induction rule: span_induct)
   6.825    case base
   6.826    then show ?case
   6.827      by (simp add: subspace_orthogonal_to_vector)
   6.828 @@ -953,28 +953,28 @@
   6.829      by (simp add: mult.commute) (metis (no_types) vec_lambda_beta zero_index)
   6.830  qed
   6.831  
   6.832 -lemma nullspace_inter_rowspace:
   6.833 +lemma%unimportant nullspace_inter_rowspace:
   6.834    fixes A :: "real^'n^'m"
   6.835    shows "A *v x = 0 \<and> x \<in> span(rows A) \<longleftrightarrow> x = 0"
   6.836    using orthogonal_nullspace_rowspace orthogonal_self span_zero matrix_vector_mult_0_right
   6.837    by blast
   6.838  
   6.839 -lemma matrix_vector_mul_injective_on_rowspace:
   6.840 +lemma%unimportant matrix_vector_mul_injective_on_rowspace:
   6.841    fixes A :: "real^'n^'m"
   6.842    shows "\<lbrakk>A *v x = A *v y; x \<in> span(rows A); y \<in> span(rows A)\<rbrakk> \<Longrightarrow> x = y"
   6.843    using nullspace_inter_rowspace [of A "x-y"]
   6.844    by (metis diff_eq_diff_eq diff_self matrix_vector_mult_diff_distrib span_diff)
   6.845  
   6.846 -definition rank :: "'a::field^'n^'m=>nat"
   6.847 +definition%important rank :: "'a::field^'n^'m=>nat"
   6.848    where row_rank_def_gen: "rank A \<equiv> vec.dim(rows A)"
   6.849  
   6.850 -lemma row_rank_def: "rank A = dim (rows A)" for A::"real^'n^'m"
   6.851 -  by (auto simp: row_rank_def_gen dim_vec_eq)
   6.852 +lemma%important row_rank_def: "rank A = dim (rows A)" for A::"real^'n^'m"
   6.853 +  by%unimportant (auto simp: row_rank_def_gen dim_vec_eq)
   6.854  
   6.855 -lemma dim_rows_le_dim_columns:
   6.856 +lemma%important dim_rows_le_dim_columns:
   6.857    fixes A :: "real^'n^'m"
   6.858    shows "dim(rows A) \<le> dim(columns A)"
   6.859 -proof -
   6.860 +proof%unimportant -
   6.861    have "dim (span (rows A)) \<le> dim (span (columns A))"
   6.862    proof -
   6.863      obtain B where "independent B" "span(rows A) \<subseteq> span B"
   6.864 @@ -999,32 +999,32 @@
   6.865      by (simp add: dim_span)
   6.866  qed
   6.867  
   6.868 -lemma column_rank_def:
   6.869 +lemma%unimportant column_rank_def:
   6.870    fixes A :: "real^'n^'m"
   6.871    shows "rank A = dim(columns A)"
   6.872    unfolding row_rank_def
   6.873    by (metis columns_transpose dim_rows_le_dim_columns le_antisym rows_transpose)
   6.874  
   6.875 -lemma rank_transpose:
   6.876 +lemma%unimportant rank_transpose:
   6.877    fixes A :: "real^'n^'m"
   6.878    shows "rank(transpose A) = rank A"
   6.879    by (metis column_rank_def row_rank_def rows_transpose)
   6.880  
   6.881 -lemma matrix_vector_mult_basis:
   6.882 +lemma%unimportant matrix_vector_mult_basis:
   6.883    fixes A :: "real^'n^'m"
   6.884    shows "A *v (axis k 1) = column k A"
   6.885    by (simp add: cart_eq_inner_axis column_def matrix_mult_dot)
   6.886  
   6.887 -lemma columns_image_basis:
   6.888 +lemma%unimportant columns_image_basis:
   6.889    fixes A :: "real^'n^'m"
   6.890    shows "columns A = ( *v) A ` (range (\<lambda>i. axis i 1))"
   6.891    by (force simp: columns_def matrix_vector_mult_basis [symmetric])
   6.892  
   6.893 -lemma rank_dim_range:
   6.894 +lemma%important rank_dim_range:
   6.895    fixes A :: "real^'n^'m"
   6.896    shows "rank A = dim(range (\<lambda>x. A *v x))"
   6.897    unfolding column_rank_def
   6.898 -proof (rule span_eq_dim)
   6.899 +proof%unimportant (rule span_eq_dim)
   6.900    have "span (columns A) \<subseteq> span (range (( *v) A))" (is "?l \<subseteq> ?r")
   6.901      by (simp add: columns_image_basis image_subsetI span_mono)
   6.902    then show "?l = ?r"
   6.903 @@ -1032,45 +1032,45 @@
   6.904          span_eq span_span)
   6.905  qed
   6.906  
   6.907 -lemma rank_bound:
   6.908 +lemma%unimportant rank_bound:
   6.909    fixes A :: "real^'n^'m"
   6.910    shows "rank A \<le> min CARD('m) (CARD('n))"
   6.911    by (metis (mono_tags, lifting) dim_subset_UNIV_cart min.bounded_iff
   6.912        column_rank_def row_rank_def)
   6.913  
   6.914 -lemma full_rank_injective:
   6.915 +lemma%unimportant full_rank_injective:
   6.916    fixes A :: "real^'n^'m"
   6.917    shows "rank A = CARD('n) \<longleftrightarrow> inj (( *v) A)"
   6.918    by (simp add: matrix_left_invertible_injective [symmetric] matrix_left_invertible_span_rows row_rank_def
   6.919        dim_eq_full [symmetric] card_cart_basis vec.dimension_def)
   6.920  
   6.921 -lemma full_rank_surjective:
   6.922 +lemma%unimportant full_rank_surjective:
   6.923    fixes A :: "real^'n^'m"
   6.924    shows "rank A = CARD('m) \<longleftrightarrow> surj (( *v) A)"
   6.925    by (simp add: matrix_right_invertible_surjective [symmetric] left_invertible_transpose [symmetric]
   6.926                  matrix_left_invertible_injective full_rank_injective [symmetric] rank_transpose)
   6.927  
   6.928 -lemma rank_I: "rank(mat 1::real^'n^'n) = CARD('n)"
   6.929 +lemma%unimportant rank_I: "rank(mat 1::real^'n^'n) = CARD('n)"
   6.930    by (simp add: full_rank_injective inj_on_def)
   6.931  
   6.932 -lemma less_rank_noninjective:
   6.933 +lemma%unimportant less_rank_noninjective:
   6.934    fixes A :: "real^'n^'m"
   6.935    shows "rank A < CARD('n) \<longleftrightarrow> \<not> inj (( *v) A)"
   6.936  using less_le rank_bound by (auto simp: full_rank_injective [symmetric])
   6.937  
   6.938 -lemma matrix_nonfull_linear_equations_eq:
   6.939 +lemma%unimportant matrix_nonfull_linear_equations_eq:
   6.940    fixes A :: "real^'n^'m"
   6.941    shows "(\<exists>x. (x \<noteq> 0) \<and> A *v x = 0) \<longleftrightarrow> ~(rank A = CARD('n))"
   6.942    by (meson matrix_left_invertible_injective full_rank_injective matrix_left_invertible_ker)
   6.943  
   6.944 -lemma rank_eq_0: "rank A = 0 \<longleftrightarrow> A = 0" and rank_0 [simp]: "rank (0::real^'n^'m) = 0"
   6.945 +lemma%unimportant rank_eq_0: "rank A = 0 \<longleftrightarrow> A = 0" and rank_0 [simp]: "rank (0::real^'n^'m) = 0"
   6.946    for A :: "real^'n^'m"
   6.947    by (auto simp: rank_dim_range matrix_eq)
   6.948  
   6.949 -lemma rank_mul_le_right:
   6.950 +lemma%important rank_mul_le_right:
   6.951    fixes A :: "real^'n^'m" and B :: "real^'p^'n"
   6.952    shows "rank(A ** B) \<le> rank B"
   6.953 -proof -
   6.954 +proof%unimportant -
   6.955    have "rank(A ** B) \<le> dim (( *v) A ` range (( *v) B))"
   6.956      by (auto simp: rank_dim_range image_comp o_def matrix_vector_mul_assoc)
   6.957    also have "\<dots> \<le> rank B"
   6.958 @@ -1078,12 +1078,12 @@
   6.959    finally show ?thesis .
   6.960  qed
   6.961  
   6.962 -lemma rank_mul_le_left:
   6.963 +lemma%unimportant rank_mul_le_left:
   6.964    fixes A :: "real^'n^'m" and B :: "real^'p^'n"
   6.965    shows "rank(A ** B) \<le> rank A"
   6.966    by (metis matrix_transpose_mul rank_mul_le_right rank_transpose)
   6.967  
   6.968 -subsection\<open>Routine results connecting the types @{typ "real^1"} and @{typ real}\<close>
   6.969 +subsection%unimportant\<open>Routine results connecting the types @{typ "real^1"} and @{typ real}\<close>
   6.970  
   6.971  lemma vector_one_nth [simp]:
   6.972    fixes x :: "'a^1" shows "vec (x $ 1) = x"
   6.973 @@ -1146,7 +1146,7 @@
   6.974      done
   6.975  
   6.976  
   6.977 -subsection\<open>Explicit vector construction from lists\<close>
   6.978 +subsection%unimportant\<open>Explicit vector construction from lists\<close>
   6.979  
   6.980  definition "vector l = (\<chi> i. foldr (\<lambda>x f n. fun_upd (f (n+1)) n x) l (\<lambda>n x. 0) 1 i)"
   6.981  
     7.1 --- a/src/HOL/Analysis/Cartesian_Space.thy	Mon Aug 27 22:58:36 2018 +0200
     7.2 +++ b/src/HOL/Analysis/Cartesian_Space.thy	Tue Aug 28 13:28:39 2018 +0100
     7.3 @@ -11,19 +11,19 @@
     7.4      Finite_Cartesian_Product Linear_Algebra
     7.5  begin
     7.6  
     7.7 -definition "cart_basis = {axis i 1 | i. i\<in>UNIV}"
     7.8 +definition%unimportant "cart_basis = {axis i 1 | i. i\<in>UNIV}"
     7.9  
    7.10 -lemma finite_cart_basis: "finite (cart_basis)" unfolding cart_basis_def
    7.11 +lemma%unimportant finite_cart_basis: "finite (cart_basis)" unfolding cart_basis_def
    7.12    using finite_Atleast_Atmost_nat by fastforce
    7.13  
    7.14 -lemma card_cart_basis: "card (cart_basis::('a::zero_neq_one^'i) set) = CARD('i)"
    7.15 +lemma%unimportant card_cart_basis: "card (cart_basis::('a::zero_neq_one^'i) set) = CARD('i)"
    7.16    unfolding cart_basis_def Setcompr_eq_image
    7.17    by (rule card_image) (auto simp: inj_on_def axis_eq_axis)
    7.18  
    7.19  interpretation vec: vector_space "( *s) "
    7.20    by unfold_locales (vector algebra_simps)+
    7.21  
    7.22 -lemma independent_cart_basis:
    7.23 +lemma%unimportant independent_cart_basis:
    7.24    "vec.independent (cart_basis)"
    7.25  proof (rule vec.independent_if_scalars_zero)
    7.26    show "finite (cart_basis)" using finite_cart_basis .
    7.27 @@ -48,7 +48,7 @@
    7.28    finally show "f x = 0" ..
    7.29  qed
    7.30  
    7.31 -lemma span_cart_basis:
    7.32 +lemma%unimportant span_cart_basis:
    7.33    "vec.span (cart_basis) = UNIV"
    7.34  proof (auto)
    7.35    fix x::"('a, 'b) vec"
    7.36 @@ -93,12 +93,12 @@
    7.37  interpretation vec: finite_dimensional_vector_space "( *s)" "cart_basis"
    7.38    by (unfold_locales, auto simp add: finite_cart_basis independent_cart_basis span_cart_basis)
    7.39  
    7.40 -lemma matrix_vector_mul_linear_gen[intro, simp]:
    7.41 +lemma%unimportant matrix_vector_mul_linear_gen[intro, simp]:
    7.42    "Vector_Spaces.linear ( *s) ( *s) (( *v) A)"
    7.43    by unfold_locales
    7.44      (vector matrix_vector_mult_def sum.distrib algebra_simps)+
    7.45  
    7.46 -lemma span_vec_eq: "vec.span X = span X"
    7.47 +lemma%important span_vec_eq: "vec.span X = span X"
    7.48    and dim_vec_eq: "vec.dim X = dim X"
    7.49    and dependent_vec_eq: "vec.dependent X = dependent X"
    7.50    and subspace_vec_eq: "vec.subspace X = subspace X"
    7.51 @@ -106,11 +106,11 @@
    7.52    unfolding span_raw_def dim_raw_def dependent_raw_def subspace_raw_def
    7.53    by (auto simp: scalar_mult_eq_scaleR)
    7.54  
    7.55 -lemma linear_componentwise:
    7.56 +lemma%important linear_componentwise:
    7.57    fixes f:: "'a::field ^'m \<Rightarrow> 'a ^ 'n"
    7.58    assumes lf: "Vector_Spaces.linear ( *s) ( *s) f"
    7.59    shows "(f x)$j = sum (\<lambda>i. (x$i) * (f (axis i 1)$j)) (UNIV :: 'm set)" (is "?lhs = ?rhs")
    7.60 -proof -
    7.61 +proof%unimportant -
    7.62    interpret lf: Vector_Spaces.linear "( *s)" "( *s)" f
    7.63      using lf .
    7.64    let ?M = "(UNIV :: 'm set)"
    7.65 @@ -128,7 +128,7 @@
    7.66  
    7.67  interpretation vec: finite_dimensional_vector_space_pair "( *s)" cart_basis "( *s)" cart_basis ..
    7.68  
    7.69 -lemma matrix_works:
    7.70 +lemma%unimportant matrix_works:
    7.71    assumes lf: "Vector_Spaces.linear ( *s) ( *s) f"
    7.72    shows "matrix f *v x = f (x::'a::field ^ 'n)"
    7.73    apply (simp add: matrix_def matrix_vector_mult_def vec_eq_iff mult.commute)
    7.74 @@ -136,45 +136,45 @@
    7.75    apply (rule linear_componentwise[OF lf, symmetric])
    7.76    done
    7.77  
    7.78 -lemma matrix_of_matrix_vector_mul[simp]: "matrix(\<lambda>x. A *v (x :: 'a::field ^ 'n)) = A"
    7.79 +lemma%unimportant matrix_of_matrix_vector_mul[simp]: "matrix(\<lambda>x. A *v (x :: 'a::field ^ 'n)) = A"
    7.80    by (simp add: matrix_eq matrix_works)
    7.81  
    7.82 -lemma matrix_compose_gen:
    7.83 +lemma%unimportant matrix_compose_gen:
    7.84    assumes lf: "Vector_Spaces.linear ( *s) ( *s) (f::'a::{field}^'n \<Rightarrow> 'a^'m)"
    7.85      and lg: "Vector_Spaces.linear ( *s) ( *s) (g::'a^'m \<Rightarrow> 'a^_)"
    7.86    shows "matrix (g o f) = matrix g ** matrix f"
    7.87    using lf lg Vector_Spaces.linear_compose[OF lf lg] matrix_works[OF Vector_Spaces.linear_compose[OF lf lg]]
    7.88    by (simp add: matrix_eq matrix_works matrix_vector_mul_assoc[symmetric] o_def)
    7.89  
    7.90 -lemma matrix_compose:
    7.91 +lemma%unimportant matrix_compose:
    7.92    assumes "linear (f::real^'n \<Rightarrow> real^'m)" "linear (g::real^'m \<Rightarrow> real^_)"
    7.93    shows "matrix (g o f) = matrix g ** matrix f"
    7.94    using matrix_compose_gen[of f g] assms
    7.95    by (simp add: linear_def scalar_mult_eq_scaleR)
    7.96  
    7.97 -lemma left_invertible_transpose:
    7.98 +lemma%unimportant left_invertible_transpose:
    7.99    "(\<exists>(B). B ** transpose (A) = mat (1::'a::comm_semiring_1)) \<longleftrightarrow> (\<exists>(B). A ** B = mat 1)"
   7.100    by (metis matrix_transpose_mul transpose_mat transpose_transpose)
   7.101  
   7.102 -lemma right_invertible_transpose:
   7.103 +lemma%unimportant right_invertible_transpose:
   7.104    "(\<exists>(B). transpose (A) ** B = mat (1::'a::comm_semiring_1)) \<longleftrightarrow> (\<exists>(B). B ** A = mat 1)"
   7.105    by (metis matrix_transpose_mul transpose_mat transpose_transpose)
   7.106  
   7.107 -lemma linear_matrix_vector_mul_eq:
   7.108 +lemma%unimportant linear_matrix_vector_mul_eq:
   7.109    "Vector_Spaces.linear ( *s) ( *s) f \<longleftrightarrow> linear (f :: real^'n \<Rightarrow> real ^'m)"
   7.110    by (simp add: scalar_mult_eq_scaleR linear_def)
   7.111  
   7.112 -lemma matrix_vector_mul[simp]:
   7.113 +lemma%unimportant matrix_vector_mul[simp]:
   7.114    "Vector_Spaces.linear ( *s) ( *s) g \<Longrightarrow> (\<lambda>y. matrix g *v y) = g"
   7.115    "linear f \<Longrightarrow> (\<lambda>x. matrix f *v x) = f"
   7.116    "bounded_linear f \<Longrightarrow> (\<lambda>x. matrix f *v x) = f"
   7.117    for f :: "real^'n \<Rightarrow> real ^'m"
   7.118    by (simp_all add: ext matrix_works linear_matrix_vector_mul_eq linear_linear)
   7.119  
   7.120 -lemma matrix_left_invertible_injective:
   7.121 +lemma%important matrix_left_invertible_injective:
   7.122    fixes A :: "'a::field^'n^'m"
   7.123    shows "(\<exists>B. B ** A = mat 1) \<longleftrightarrow> inj (( *v) A)"
   7.124 -proof safe
   7.125 +proof%unimportant safe
   7.126    fix B
   7.127    assume B: "B ** A = mat 1"
   7.128    show "inj (( *v) A)"
   7.129 @@ -192,15 +192,15 @@
   7.130      by metis
   7.131  qed
   7.132  
   7.133 -lemma matrix_left_invertible_ker:
   7.134 +lemma%unimportant matrix_left_invertible_ker:
   7.135    "(\<exists>B. (B::'a::{field} ^'m^'n) ** (A::'a::{field}^'n^'m) = mat 1) \<longleftrightarrow> (\<forall>x. A *v x = 0 \<longrightarrow> x = 0)"
   7.136    unfolding matrix_left_invertible_injective
   7.137    using vec.inj_on_iff_eq_0[OF vec.subspace_UNIV, of A]
   7.138    by (simp add: inj_on_def)
   7.139  
   7.140 -lemma matrix_right_invertible_surjective:
   7.141 +lemma%important matrix_right_invertible_surjective:
   7.142    "(\<exists>B. (A::'a::field^'n^'m) ** (B::'a::field^'m^'n) = mat 1) \<longleftrightarrow> surj (\<lambda>x. A *v x)"
   7.143 -proof -
   7.144 +proof%unimportant -
   7.145    { fix B :: "'a ^'m^'n"
   7.146      assume AB: "A ** B = mat 1"
   7.147      { fix x :: "'a ^ 'm"
   7.148 @@ -223,12 +223,12 @@
   7.149    ultimately show ?thesis unfolding surj_def by blast
   7.150  qed
   7.151  
   7.152 -lemma matrix_left_invertible_independent_columns:
   7.153 +lemma%important matrix_left_invertible_independent_columns:
   7.154    fixes A :: "'a::{field}^'n^'m"
   7.155    shows "(\<exists>(B::'a ^'m^'n). B ** A = mat 1) \<longleftrightarrow>
   7.156        (\<forall>c. sum (\<lambda>i. c i *s column i A) (UNIV :: 'n set) = 0 \<longrightarrow> (\<forall>i. c i = 0))"
   7.157      (is "?lhs \<longleftrightarrow> ?rhs")
   7.158 -proof -
   7.159 +proof%unimportant -
   7.160    let ?U = "UNIV :: 'n set"
   7.161    { assume k: "\<forall>x. A *v x = 0 \<longrightarrow> x = 0"
   7.162      { fix c i
   7.163 @@ -250,7 +250,7 @@
   7.164    ultimately show ?thesis unfolding matrix_left_invertible_ker by auto
   7.165  qed
   7.166  
   7.167 -lemma matrix_right_invertible_independent_rows:
   7.168 +lemma%unimportant matrix_right_invertible_independent_rows:
   7.169    fixes A :: "'a::{field}^'n^'m"
   7.170    shows "(\<exists>(B::'a^'m^'n). A ** B = mat 1) \<longleftrightarrow>
   7.171      (\<forall>c. sum (\<lambda>i. c i *s row i A) (UNIV :: 'm set) = 0 \<longrightarrow> (\<forall>i. c i = 0))"
   7.172 @@ -258,10 +258,10 @@
   7.173      matrix_left_invertible_independent_columns
   7.174    by (simp add:)
   7.175  
   7.176 -lemma matrix_right_invertible_span_columns:
   7.177 +lemma%important matrix_right_invertible_span_columns:
   7.178    "(\<exists>(B::'a::field ^'n^'m). (A::'a ^'m^'n) ** B = mat 1) \<longleftrightarrow>
   7.179      vec.span (columns A) = UNIV" (is "?lhs = ?rhs")
   7.180 -proof -
   7.181 +proof%unimportant -
   7.182    let ?U = "UNIV :: 'm set"
   7.183    have fU: "finite ?U" by simp
   7.184    have lhseq: "?lhs \<longleftrightarrow> (\<forall>y. \<exists>(x::'a^'m). sum (\<lambda>i. (x$i) *s column i A) ?U = y)"
   7.185 @@ -322,21 +322,21 @@
   7.186    ultimately show ?thesis by blast
   7.187  qed
   7.188  
   7.189 -lemma matrix_left_invertible_span_rows_gen:
   7.190 +lemma%unimportant matrix_left_invertible_span_rows_gen:
   7.191    "(\<exists>(B::'a^'m^'n). B ** (A::'a::field^'n^'m) = mat 1) \<longleftrightarrow> vec.span (rows A) = UNIV"
   7.192    unfolding right_invertible_transpose[symmetric]
   7.193    unfolding columns_transpose[symmetric]
   7.194    unfolding matrix_right_invertible_span_columns
   7.195    ..
   7.196  
   7.197 -lemma matrix_left_invertible_span_rows:
   7.198 +lemma%unimportant matrix_left_invertible_span_rows:
   7.199    "(\<exists>(B::real^'m^'n). B ** (A::real^'n^'m) = mat 1) \<longleftrightarrow> span (rows A) = UNIV"
   7.200    using matrix_left_invertible_span_rows_gen[of A] by (simp add: span_vec_eq)
   7.201  
   7.202 -lemma matrix_left_right_inverse:
   7.203 +lemma%important matrix_left_right_inverse:
   7.204    fixes A A' :: "'a::{field}^'n^'n"
   7.205    shows "A ** A' = mat 1 \<longleftrightarrow> A' ** A = mat 1"
   7.206 -proof -
   7.207 +proof%unimportant -
   7.208    { fix A A' :: "'a ^'n^'n"
   7.209      assume AA': "A ** A' = mat 1"
   7.210      have sA: "surj (( *v) A)"
   7.211 @@ -356,21 +356,21 @@
   7.212    then show ?thesis by blast
   7.213  qed
   7.214  
   7.215 -lemma invertible_left_inverse:
   7.216 +lemma%unimportant invertible_left_inverse:
   7.217    fixes A :: "'a::{field}^'n^'n"
   7.218    shows "invertible A \<longleftrightarrow> (\<exists>(B::'a^'n^'n). B ** A = mat 1)"
   7.219    by (metis invertible_def matrix_left_right_inverse)
   7.220  
   7.221 -lemma invertible_right_inverse:
   7.222 +lemma%unimportant invertible_right_inverse:
   7.223    fixes A :: "'a::{field}^'n^'n"
   7.224    shows "invertible A \<longleftrightarrow> (\<exists>(B::'a^'n^'n). A** B = mat 1)"
   7.225    by (metis invertible_def matrix_left_right_inverse)
   7.226  
   7.227 -lemma invertible_mult:
   7.228 +lemma%important invertible_mult:
   7.229    assumes inv_A: "invertible A"
   7.230    and inv_B: "invertible B"
   7.231    shows "invertible (A**B)"
   7.232 -proof -
   7.233 +proof%unimportant -
   7.234    obtain A' where AA': "A ** A' = mat 1" and A'A: "A' ** A = mat 1" 
   7.235      using inv_A unfolding invertible_def by blast
   7.236    obtain B' where BB': "B ** B' = mat 1" and B'B: "B' ** B = mat 1" 
   7.237 @@ -393,28 +393,28 @@
   7.238    qed
   7.239  qed
   7.240  
   7.241 -lemma transpose_invertible:
   7.242 +lemma%unimportant transpose_invertible:
   7.243    fixes A :: "real^'n^'n"
   7.244    assumes "invertible A"
   7.245    shows "invertible (transpose A)"
   7.246    by (meson assms invertible_def matrix_left_right_inverse right_invertible_transpose)
   7.247  
   7.248 -lemma vector_matrix_mul_assoc:
   7.249 +lemma%important vector_matrix_mul_assoc:
   7.250    fixes v :: "('a::comm_semiring_1)^'n"
   7.251    shows "(v v* M) v* N = v v* (M ** N)"
   7.252 -proof -
   7.253 +proof%unimportant -
   7.254    from matrix_vector_mul_assoc
   7.255    have "transpose N *v (transpose M *v v) = (transpose N ** transpose M) *v v" by fast
   7.256    thus "(v v* M) v* N = v v* (M ** N)"
   7.257      by (simp add: matrix_transpose_mul [symmetric])
   7.258  qed
   7.259  
   7.260 -lemma matrix_scaleR_vector_ac:
   7.261 +lemma%unimportant matrix_scaleR_vector_ac:
   7.262    fixes A :: "real^('m::finite)^'n"
   7.263    shows "A *v (k *\<^sub>R v) = k *\<^sub>R A *v v"
   7.264    by (metis matrix_vector_mult_scaleR transpose_scalar vector_scaleR_matrix_ac vector_transpose_matrix)
   7.265  
   7.266 -lemma scaleR_matrix_vector_assoc:
   7.267 +lemma%unimportant scaleR_matrix_vector_assoc:
   7.268    fixes A :: "real^('m::finite)^'n"
   7.269    shows "k *\<^sub>R (A *v v) = k *\<^sub>R A *v v"
   7.270    by (metis matrix_scaleR_vector_ac matrix_vector_mult_scaleR)
   7.271 @@ -430,8 +430,8 @@
   7.272    and BasisB :: "('b set)"
   7.273    and f :: "('b=>'c)"
   7.274  
   7.275 -lemma vec_dim_card: "vec.dim (UNIV::('a::{field}^'n) set) = CARD ('n)"
   7.276 -proof -
   7.277 +lemma%important vec_dim_card: "vec.dim (UNIV::('a::{field}^'n) set) = CARD ('n)"
   7.278 +proof%unimportant -
   7.279    let ?f="\<lambda>i::'n. axis i (1::'a)"
   7.280    have "vec.dim (UNIV::('a::{field}^'n) set) = card (cart_basis::('a^'n) set)"
   7.281      unfolding vec.dim_UNIV ..
     8.1 --- a/src/HOL/Analysis/Change_Of_Vars.thy	Mon Aug 27 22:58:36 2018 +0200
     8.2 +++ b/src/HOL/Analysis/Change_Of_Vars.thy	Tue Aug 28 13:28:39 2018 +0100
     8.3 @@ -9,9 +9,9 @@
     8.4  
     8.5  begin
     8.6  
     8.7 -subsection\<open>Induction on matrix row operations\<close>
     8.8 +subsection%important\<open>Induction on matrix row operations\<close>
     8.9  
    8.10 -lemma induct_matrix_row_operations:
    8.11 +lemma%unimportant induct_matrix_row_operations:
    8.12    fixes P :: "real^'n^'n \<Rightarrow> bool"
    8.13    assumes zero_row: "\<And>A i. row i A = 0 \<Longrightarrow> P A"
    8.14      and diagonal: "\<And>A. (\<And>i j. i \<noteq> j \<Longrightarrow> A$i$j = 0) \<Longrightarrow> P A"
    8.15 @@ -120,7 +120,7 @@
    8.16      by blast
    8.17  qed
    8.18  
    8.19 -lemma induct_matrix_elementary:
    8.20 +lemma%unimportant induct_matrix_elementary:
    8.21    fixes P :: "real^'n^'n \<Rightarrow> bool"
    8.22    assumes mult: "\<And>A B. \<lbrakk>P A; P B\<rbrakk> \<Longrightarrow> P(A ** B)"
    8.23      and zero_row: "\<And>A i. row i A = 0 \<Longrightarrow> P A"
    8.24 @@ -151,7 +151,7 @@
    8.25      by (rule induct_matrix_row_operations [OF zero_row diagonal swap row])
    8.26  qed
    8.27  
    8.28 -lemma induct_matrix_elementary_alt:
    8.29 +lemma%unimportant induct_matrix_elementary_alt:
    8.30    fixes P :: "real^'n^'n \<Rightarrow> bool"
    8.31    assumes mult: "\<And>A B. \<lbrakk>P A; P B\<rbrakk> \<Longrightarrow> P(A ** B)"
    8.32      and zero_row: "\<And>A i. row i A = 0 \<Longrightarrow> P A"
    8.33 @@ -185,11 +185,11 @@
    8.34      by (rule induct_matrix_elementary) (auto intro: assms *)
    8.35  qed
    8.36  
    8.37 -lemma matrix_vector_mult_matrix_matrix_mult_compose:
    8.38 +lemma%unimportant matrix_vector_mult_matrix_matrix_mult_compose:
    8.39    "( *v) (A ** B) = ( *v) A \<circ> ( *v) B"
    8.40    by (auto simp: matrix_vector_mul_assoc)
    8.41  
    8.42 -lemma induct_linear_elementary:
    8.43 +lemma%unimportant induct_linear_elementary:
    8.44    fixes f :: "real^'n \<Rightarrow> real^'n"
    8.45    assumes "linear f"
    8.46      and comp: "\<And>f g. \<lbrakk>linear f; linear g; P f; P g\<rbrakk> \<Longrightarrow> P(f \<circ> g)"
    8.47 @@ -250,14 +250,14 @@
    8.48  qed
    8.49  
    8.50  
    8.51 -proposition
    8.52 +proposition%important
    8.53    fixes a :: "real^'n"
    8.54    assumes "m \<noteq> n" and ab_ne: "cbox a b \<noteq> {}" and an: "0 \<le> a$n"
    8.55    shows measurable_shear_interval: "(\<lambda>x. \<chi> i. if i = m then x$m + x$n else x$i) ` (cbox a b) \<in> lmeasurable"
    8.56         (is  "?f ` _ \<in> _")
    8.57     and measure_shear_interval: "measure lebesgue ((\<lambda>x. \<chi> i. if i = m then x$m + x$n else x$i) ` cbox a b)
    8.58                 = measure lebesgue (cbox a b)" (is "?Q")
    8.59 -proof -
    8.60 +proof%unimportant -
    8.61    have lin: "linear ?f"
    8.62      by (rule linearI) (auto simp: plus_vec_def scaleR_vec_def algebra_simps)
    8.63    show fab: "?f ` cbox a b \<in> lmeasurable"
    8.64 @@ -359,13 +359,13 @@
    8.65  qed
    8.66  
    8.67  
    8.68 -proposition
    8.69 +proposition%important
    8.70    fixes S :: "(real^'n) set"
    8.71    assumes "S \<in> lmeasurable"
    8.72    shows measurable_stretch: "((\<lambda>x. \<chi> k. m k * x$k) ` S) \<in> lmeasurable" (is  "?f ` S \<in> _")
    8.73      and measure_stretch: "measure lebesgue ((\<lambda>x. \<chi> k. m k * x$k) ` S) = \<bar>prod m UNIV\<bar> * measure lebesgue S"
    8.74      (is "?MEQ")
    8.75 -proof -
    8.76 +proof%unimportant -
    8.77    have "(?f ` S) \<in> lmeasurable \<and> ?MEQ"
    8.78    proof (cases "\<forall>k. m k \<noteq> 0")
    8.79      case True
    8.80 @@ -463,12 +463,12 @@
    8.81  qed
    8.82  
    8.83  
    8.84 -proposition
    8.85 +proposition%important
    8.86   fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real^'n::_"
    8.87    assumes "linear f" "S \<in> lmeasurable"
    8.88    shows measurable_linear_image: "(f ` S) \<in> lmeasurable"
    8.89      and measure_linear_image: "measure lebesgue (f ` S) = \<bar>det (matrix f)\<bar> * measure lebesgue S" (is "?Q f S")
    8.90 -proof -
    8.91 +proof%unimportant -
    8.92    have "\<forall>S \<in> lmeasurable. (f ` S) \<in> lmeasurable \<and> ?Q f S"
    8.93    proof (rule induct_linear_elementary [OF \<open>linear f\<close>]; intro ballI)
    8.94      fix f g and S :: "(real,'n) vec set"
    8.95 @@ -611,7 +611,7 @@
    8.96  qed
    8.97  
    8.98  
    8.99 -lemma
   8.100 +lemma%unimportant
   8.101   fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real^'n::_"
   8.102    assumes f: "orthogonal_transformation f" and S: "S \<in> lmeasurable"
   8.103    shows measurable_orthogonal_image: "f ` S \<in> lmeasurable"
   8.104 @@ -625,19 +625,19 @@
   8.105      by (simp add: measure_linear_image \<open>linear f\<close> S f)
   8.106  qed
   8.107  
   8.108 -subsection\<open>@{text F_sigma} and @{text G_delta} sets.\<close>
   8.109 +subsection%important\<open>@{text F_sigma} and @{text G_delta} sets.\<close>(*FIX ME mv *)
   8.110  
   8.111  (*https://en.wikipedia.org/wiki/F\<sigma>_set*)
   8.112 -inductive fsigma :: "'a::topological_space set \<Rightarrow> bool" where
   8.113 +inductive%important fsigma :: "'a::topological_space set \<Rightarrow> bool" where
   8.114    "(\<And>n::nat. closed (F n)) \<Longrightarrow> fsigma (UNION UNIV F)"
   8.115  
   8.116 -inductive gdelta :: "'a::topological_space set \<Rightarrow> bool" where
   8.117 +inductive%important gdelta :: "'a::topological_space set \<Rightarrow> bool" where
   8.118    "(\<And>n::nat. open (F n)) \<Longrightarrow> gdelta (INTER UNIV F)"
   8.119  
   8.120 -lemma fsigma_Union_compact:
   8.121 +lemma%important fsigma_Union_compact:
   8.122    fixes S :: "'a::{real_normed_vector,heine_borel} set"
   8.123    shows "fsigma S \<longleftrightarrow> (\<exists>F::nat \<Rightarrow> 'a set. range F \<subseteq> Collect compact \<and> S = UNION UNIV F)"
   8.124 -proof safe
   8.125 +proof%unimportant safe
   8.126    assume "fsigma S"
   8.127    then obtain F :: "nat \<Rightarrow> 'a set" where F: "range F \<subseteq> Collect closed" "S = UNION UNIV F"
   8.128      by (meson fsigma.cases image_subsetI mem_Collect_eq)
   8.129 @@ -668,7 +668,7 @@
   8.130      by (simp add: compact_imp_closed fsigma.intros image_subset_iff)
   8.131  qed
   8.132  
   8.133 -lemma gdelta_imp_fsigma: "gdelta S \<Longrightarrow> fsigma (- S)"
   8.134 +lemma%unimportant gdelta_imp_fsigma: "gdelta S \<Longrightarrow> fsigma (- S)"
   8.135  proof (induction rule: gdelta.induct)
   8.136    case (1 F)
   8.137    have "- INTER UNIV F = (\<Union>i. -(F i))"
   8.138 @@ -677,7 +677,7 @@
   8.139      by (simp add: fsigma.intros closed_Compl 1)
   8.140  qed
   8.141  
   8.142 -lemma fsigma_imp_gdelta: "fsigma S \<Longrightarrow> gdelta (- S)"
   8.143 +lemma%unimportant fsigma_imp_gdelta: "fsigma S \<Longrightarrow> gdelta (- S)"
   8.144  proof (induction rule: fsigma.induct)
   8.145    case (1 F)
   8.146    have "- UNION UNIV F = (\<Inter>i. -(F i))"
   8.147 @@ -686,11 +686,11 @@
   8.148      by (simp add: 1 gdelta.intros open_closed)
   8.149  qed
   8.150  
   8.151 -lemma gdelta_complement: "gdelta(- S) \<longleftrightarrow> fsigma S"
   8.152 +lemma%unimportant gdelta_complement: "gdelta(- S) \<longleftrightarrow> fsigma S"
   8.153    using fsigma_imp_gdelta gdelta_imp_fsigma by force
   8.154  
   8.155  text\<open>A Lebesgue set is almost an @{text F_sigma} or @{text G_delta}.\<close>
   8.156 -lemma lebesgue_set_almost_fsigma:
   8.157 +lemma%unimportant lebesgue_set_almost_fsigma:
   8.158    assumes "S \<in> sets lebesgue"
   8.159    obtains C T where "fsigma C" "negligible T" "C \<union> T = S" "disjnt C T"
   8.160  proof -
   8.161 @@ -725,7 +725,7 @@
   8.162    qed
   8.163  qed
   8.164  
   8.165 -lemma lebesgue_set_almost_gdelta:
   8.166 +lemma%unimportant lebesgue_set_almost_gdelta:
   8.167    assumes "S \<in> sets lebesgue"
   8.168    obtains C T where "gdelta C" "negligible T" "S \<union> T = C" "disjnt S T"
   8.169  proof -
   8.170 @@ -743,12 +743,12 @@
   8.171  qed
   8.172  
   8.173  
   8.174 -proposition measure_semicontinuous_with_hausdist_explicit:
   8.175 +proposition%important measure_semicontinuous_with_hausdist_explicit:
   8.176    assumes "bounded S" and neg: "negligible(frontier S)" and "e > 0"
   8.177    obtains d where "d > 0"
   8.178                    "\<And>T. \<lbrakk>T \<in> lmeasurable; \<And>y. y \<in> T \<Longrightarrow> \<exists>x. x \<in> S \<and> dist x y < d\<rbrakk>
   8.179                          \<Longrightarrow> measure lebesgue T < measure lebesgue S + e"
   8.180 -proof (cases "S = {}")
   8.181 +proof%unimportant (cases "S = {}")
   8.182    case True
   8.183    with that \<open>e > 0\<close> show ?thesis by force
   8.184  next
   8.185 @@ -812,10 +812,10 @@
   8.186    qed
   8.187  qed
   8.188  
   8.189 -proposition lebesgue_regular_inner:
   8.190 +proposition%important lebesgue_regular_inner:
   8.191   assumes "S \<in> sets lebesgue"
   8.192   obtains K C where "negligible K" "\<And>n::nat. compact(C n)" "S = (\<Union>n. C n) \<union> K"
   8.193 -proof -
   8.194 +proof%unimportant -
   8.195    have "\<exists>T. closed T \<and> T \<subseteq> S \<and> (S - T) \<in> lmeasurable \<and> measure lebesgue (S - T) < (1/2)^n" for n
   8.196      using sets_lebesgue_inner_closed assms
   8.197      by (metis sets_lebesgue_inner_closed zero_less_divide_1_iff zero_less_numeral zero_less_power)
   8.198 @@ -865,7 +865,7 @@
   8.199  qed
   8.200  
   8.201  
   8.202 -lemma sets_lebesgue_continuous_image:
   8.203 +lemma%unimportant sets_lebesgue_continuous_image:
   8.204    assumes T: "T \<in> sets lebesgue" and contf: "continuous_on S f"
   8.205      and negim: "\<And>T. \<lbrakk>negligible T; T \<subseteq> S\<rbrakk> \<Longrightarrow> negligible(f ` T)" and "T \<subseteq> S"
   8.206   shows "f ` T \<in> sets lebesgue"
   8.207 @@ -890,7 +890,7 @@
   8.208      by (simp add: Teq image_Un image_Union)
   8.209  qed
   8.210  
   8.211 -lemma differentiable_image_in_sets_lebesgue:
   8.212 +lemma%unimportant differentiable_image_in_sets_lebesgue:
   8.213    fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space"
   8.214    assumes S: "S \<in> sets lebesgue" and dim: "DIM('m) \<le> DIM('n)" and f: "f differentiable_on S"
   8.215    shows "f`S \<in> sets lebesgue"
   8.216 @@ -902,7 +902,7 @@
   8.217      by (auto simp: intro!: negligible_differentiable_image_negligible [OF dim])
   8.218  qed auto
   8.219  
   8.220 -lemma sets_lebesgue_on_continuous_image:
   8.221 +lemma%unimportant sets_lebesgue_on_continuous_image:
   8.222    assumes S: "S \<in> sets lebesgue" and X: "X \<in> sets (lebesgue_on S)" and contf: "continuous_on S f"
   8.223      and negim: "\<And>T. \<lbrakk>negligible T; T \<subseteq> S\<rbrakk> \<Longrightarrow> negligible(f ` T)"
   8.224    shows "f ` X \<in> sets (lebesgue_on (f ` S))"
   8.225 @@ -917,7 +917,7 @@
   8.226      by (auto simp: sets_restrict_space_iff)
   8.227  qed
   8.228  
   8.229 -lemma differentiable_image_in_sets_lebesgue_on:
   8.230 +lemma%unimportant differentiable_image_in_sets_lebesgue_on:
   8.231    fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space"
   8.232    assumes S: "S \<in> sets lebesgue" and X: "X \<in> sets (lebesgue_on S)" and dim: "DIM('m) \<le> DIM('n)"
   8.233         and f: "f differentiable_on S"
   8.234 @@ -931,7 +931,7 @@
   8.235  qed
   8.236  
   8.237  
   8.238 -proposition
   8.239 +proposition%important
   8.240   fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real^'n::_"
   8.241    assumes S: "S \<in> lmeasurable"
   8.242    and deriv: "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)"
   8.243 @@ -941,7 +941,7 @@
   8.244         "f ` S \<in> lmeasurable"
   8.245      and measure_bounded_differentiable_image:
   8.246         "measure lebesgue (f ` S) \<le> B * measure lebesgue S" (is "?M")
   8.247 -proof -
   8.248 +proof%unimportant -
   8.249    have "f ` S \<in> lmeasurable \<and> measure lebesgue (f ` S) \<le> B * measure lebesgue S"
   8.250    proof (cases "B < 0")
   8.251      case True
   8.252 @@ -1166,13 +1166,13 @@
   8.253    then show "f ` S \<in> lmeasurable" ?M by blast+
   8.254  qed
   8.255  
   8.256 -lemma
   8.257 +lemma%important
   8.258   fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real^'n::_"
   8.259    assumes S: "S \<in> lmeasurable"
   8.260      and deriv: "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)"
   8.261      and int: "(\<lambda>x. \<bar>det (matrix (f' x))\<bar>) integrable_on S"
   8.262    shows m_diff_image_weak: "f ` S \<in> lmeasurable \<and> measure lebesgue (f ` S) \<le> integral S (\<lambda>x. \<bar>det (matrix (f' x))\<bar>)"
   8.263 -proof -
   8.264 +proof%unimportant -
   8.265    let ?\<mu> = "measure lebesgue"
   8.266    have aint_S: "(\<lambda>x. \<bar>det (matrix (f' x))\<bar>) absolutely_integrable_on S"
   8.267      using int unfolding absolutely_integrable_on_def by auto
   8.268 @@ -1364,7 +1364,7 @@
   8.269  qed
   8.270  
   8.271  
   8.272 -theorem
   8.273 +theorem%important
   8.274   fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real^'n::_"
   8.275    assumes S: "S \<in> sets lebesgue"
   8.276      and deriv: "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)"
   8.277 @@ -1372,7 +1372,7 @@
   8.278    shows measurable_differentiable_image: "f ` S \<in> lmeasurable"
   8.279      and measure_differentiable_image:
   8.280         "measure lebesgue (f ` S) \<le> integral S (\<lambda>x. \<bar>det (matrix (f' x))\<bar>)" (is "?M")
   8.281 -proof -
   8.282 +proof%unimportant -
   8.283    let ?I = "\<lambda>n::nat. cbox (vec (-n)) (vec n) \<inter> S"
   8.284    let ?\<mu> = "measure lebesgue"
   8.285    have "x \<in> cbox (vec (- real (nat \<lceil>norm x\<rceil>))) (vec (real (nat \<lceil>norm x\<rceil>)))" for x :: "real^'n::_"
   8.286 @@ -1417,7 +1417,7 @@
   8.287  qed
   8.288  
   8.289  
   8.290 -lemma borel_measurable_simple_function_limit_increasing:
   8.291 +lemma%unimportant borel_measurable_simple_function_limit_increasing:
   8.292    fixes f :: "'a::euclidean_space \<Rightarrow> real"
   8.293    shows "(f \<in> borel_measurable lebesgue \<and> (\<forall>x. 0 \<le> f x)) \<longleftrightarrow>
   8.294           (\<exists>g. (\<forall>n x. 0 \<le> g n x \<and> g n x \<le> f x) \<and> (\<forall>n x. g n x \<le> (g(Suc n) x)) \<and>
   8.295 @@ -1614,9 +1614,9 @@
   8.296      by (blast intro: order_trans)
   8.297  qed
   8.298  
   8.299 -subsection\<open>Borel measurable Jacobian determinant\<close>
   8.300 +subsection%important\<open>Borel measurable Jacobian determinant\<close>
   8.301  
   8.302 -lemma lemma_partial_derivatives0:
   8.303 +lemma%unimportant lemma_partial_derivatives0:
   8.304    fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
   8.305    assumes "linear f" and lim0: "((\<lambda>x. f x /\<^sub>R norm x) \<longlongrightarrow> 0) (at 0 within S)"
   8.306      and lb: "\<And>v. v \<noteq> 0 \<Longrightarrow> (\<exists>k>0. \<forall>e>0. \<exists>x. x \<in> S - {0} \<and> norm x < e \<and> k * norm x \<le> \<bar>v \<bullet> x\<bar>)"
   8.307 @@ -1689,7 +1689,7 @@
   8.308          mem_Collect_eq module_hom_zero span_base span_raw_def)
   8.309  qed
   8.310  
   8.311 -lemma lemma_partial_derivatives:
   8.312 +lemma%unimportant lemma_partial_derivatives:
   8.313    fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
   8.314    assumes "linear f" and lim: "((\<lambda>x. f (x - a) /\<^sub>R norm (x - a)) \<longlongrightarrow> 0) (at a within S)"
   8.315      and lb: "\<And>v. v \<noteq> 0 \<Longrightarrow> (\<exists>k>0.  \<forall>e>0. \<exists>x \<in> S - {a}. norm(a - x) < e \<and> k * norm(a - x) \<le> \<bar>v \<bullet> (x - a)\<bar>)"
   8.316 @@ -1707,12 +1707,12 @@
   8.317  qed
   8.318  
   8.319  
   8.320 -proposition borel_measurable_partial_derivatives:
   8.321 +proposition%important borel_measurable_partial_derivatives:
   8.322    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n"
   8.323    assumes S: "S \<in> sets lebesgue"
   8.324      and f: "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)"
   8.325    shows "(\<lambda>x. (matrix(f' x)$m$n)) \<in> borel_measurable (lebesgue_on S)"
   8.326 -proof -
   8.327 +proof%unimportant -
   8.328    have contf: "continuous_on S f"
   8.329      using continuous_on_eq_continuous_within f has_derivative_continuous by blast
   8.330    have "{x \<in> S.  (matrix (f' x)$m$n) \<le> b} \<in> sets lebesgue" for b
   8.331 @@ -2298,21 +2298,21 @@
   8.332  qed
   8.333  
   8.334  
   8.335 -theorem borel_measurable_det_Jacobian:
   8.336 +theorem%important borel_measurable_det_Jacobian:
   8.337   fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real^'n::_"
   8.338    assumes S: "S \<in> sets lebesgue" and f: "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)"
   8.339    shows "(\<lambda>x. det(matrix(f' x))) \<in> borel_measurable (lebesgue_on S)"
   8.340    unfolding det_def
   8.341 -  by (intro measurable) (auto intro: f borel_measurable_partial_derivatives [OF S])
   8.342 +  by%unimportant (intro measurable) (auto intro: f borel_measurable_partial_derivatives [OF S])
   8.343  
   8.344  text\<open>The localisation wrt S uses the same argument for many similar results.\<close>
   8.345  (*See HOL Light's MEASURABLE_ON_LEBESGUE_MEASURABLE_PREIMAGE_BOREL, etc.*)
   8.346 -lemma borel_measurable_lebesgue_on_preimage_borel:
   8.347 +lemma%important borel_measurable_lebesgue_on_preimage_borel:
   8.348    fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
   8.349    assumes "S \<in> sets lebesgue"
   8.350    shows "f \<in> borel_measurable (lebesgue_on S) \<longleftrightarrow>
   8.351           (\<forall>T. T \<in> sets borel \<longrightarrow> {x \<in> S. f x \<in> T} \<in> sets lebesgue)"
   8.352 -proof -
   8.353 +proof%unimportant -
   8.354    have "{x. (if x \<in> S then f x else 0) \<in> T} \<in> sets lebesgue \<longleftrightarrow> {x \<in> S. f x \<in> T} \<in> sets lebesgue"
   8.355           if "T \<in> sets borel" for T
   8.356      proof (cases "0 \<in> T")
   8.357 @@ -2334,7 +2334,7 @@
   8.358        by blast
   8.359  qed
   8.360  
   8.361 -lemma sets_lebesgue_almost_borel:
   8.362 +lemma%unimportant sets_lebesgue_almost_borel:
   8.363    assumes "S \<in> sets lebesgue"
   8.364    obtains B N where "B \<in> sets borel" "negligible N" "B \<union> N = S"
   8.365  proof -
   8.366 @@ -2344,7 +2344,7 @@
   8.367      by (metis negligible_iff_null_sets negligible_subset null_sets_completionI that)
   8.368  qed
   8.369  
   8.370 -lemma double_lebesgue_sets:
   8.371 +lemma%unimportant double_lebesgue_sets:
   8.372   assumes S: "S \<in> sets lebesgue" and T: "T \<in> sets lebesgue" and fim: "f ` S \<subseteq> T"
   8.373   shows "(\<forall>U. U \<in> sets lebesgue \<and> U \<subseteq> T \<longrightarrow> {x \<in> S. f x \<in> U} \<in> sets lebesgue) \<longleftrightarrow>
   8.374            f \<in> borel_measurable (lebesgue_on S) \<and>
   8.375 @@ -2387,9 +2387,9 @@
   8.376  qed
   8.377  
   8.378  
   8.379 -subsection\<open>Simplest case of Sard's theorem (we don't need continuity of derivative)\<close>
   8.380 +subsection%important\<open>Simplest case of Sard's theorem (we don't need continuity of derivative)\<close>
   8.381  
   8.382 -lemma Sard_lemma00:
   8.383 +lemma%important Sard_lemma00:
   8.384    fixes P :: "'b::euclidean_space set"
   8.385    assumes "a \<ge> 0" and a: "a *\<^sub>R i \<noteq> 0" and i: "i \<in> Basis"
   8.386      and P: "P \<subseteq> {x. a *\<^sub>R i \<bullet> x = 0}"
   8.387 @@ -2397,7 +2397,7 @@
   8.388   obtains S where "S \<in> lmeasurable"
   8.389              and "{z. norm z \<le> m \<and> (\<exists>t \<in> P. norm(z - t) \<le> e)} \<subseteq> S"
   8.390              and "measure lebesgue S \<le> (2 * e) * (2 * m) ^ (DIM('b) - 1)"
   8.391 -proof -
   8.392 +proof%unimportant -
   8.393    have "a > 0"
   8.394      using assms by simp
   8.395    let ?v = "(\<Sum>j\<in>Basis. (if j = i then e else m) *\<^sub>R j)"
   8.396 @@ -2425,7 +2425,7 @@
   8.397  qed
   8.398  
   8.399  text\<open>As above, but reorienting the vector (HOL Light's @text{GEOM\_BASIS\_MULTIPLE\_TAC})\<close>
   8.400 -lemma Sard_lemma0:
   8.401 +lemma%unimportant Sard_lemma0:
   8.402    fixes P :: "(real^'n::{finite,wellorder}) set"
   8.403    assumes "a \<noteq> 0"
   8.404      and P: "P \<subseteq> {x. a \<bullet> x = 0}" and "0 \<le> m" "0 \<le> e"
   8.405 @@ -2485,13 +2485,13 @@
   8.406  qed
   8.407  
   8.408  text\<open>As above, but translating the sets (HOL Light's @text{GEN\_GEOM\_ORIGIN\_TAC})\<close>
   8.409 -lemma Sard_lemma1:
   8.410 +lemma%important Sard_lemma1:
   8.411    fixes P :: "(real^'n::{finite,wellorder}) set"
   8.412     assumes P: "dim P < CARD('n)" and "0 \<le> m" "0 \<le> e"
   8.413   obtains S where "S \<in> lmeasurable"
   8.414              and "{z. norm(z - w) \<le> m \<and> (\<exists>t \<in> P. norm(z - w - t) \<le> e)} \<subseteq> S"
   8.415              and "measure lebesgue S \<le> (2 * e) * (2 * m) ^ (CARD('n) - 1)"
   8.416 -proof -
   8.417 +proof%unimportant -
   8.418    obtain a where "a \<noteq> 0" "P \<subseteq> {x. a \<bullet> x = 0}"
   8.419      using lowdim_subset_hyperplane [of P] P span_base by auto
   8.420    then obtain S where S: "S \<in> lmeasurable"
   8.421 @@ -2509,7 +2509,7 @@
   8.422    qed
   8.423  qed
   8.424  
   8.425 -lemma Sard_lemma2:
   8.426 +lemma%important Sard_lemma2:
   8.427    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n::{finite,wellorder}"
   8.428    assumes mlen: "CARD('m) \<le> CARD('n)" (is "?m \<le> ?n")
   8.429      and "B > 0" "bounded S"
   8.430 @@ -2517,7 +2517,7 @@
   8.431      and rank: "\<And>x. x \<in> S \<Longrightarrow> rank(matrix(f' x)) < CARD('n)"
   8.432      and B: "\<And>x. x \<in> S \<Longrightarrow> onorm(f' x) \<le> B"
   8.433    shows "negligible(f ` S)"
   8.434 -proof -
   8.435 +proof%unimportant -
   8.436    have lin_f': "\<And>x. x \<in> S \<Longrightarrow> linear(f' x)"
   8.437      using derS has_derivative_linear by blast
   8.438    show ?thesis
   8.439 @@ -2724,13 +2724,13 @@
   8.440  qed
   8.441  
   8.442  
   8.443 -theorem baby_Sard:
   8.444 +theorem%important baby_Sard:
   8.445    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n::{finite,wellorder}"
   8.446    assumes mlen: "CARD('m) \<le> CARD('n)"
   8.447      and der: "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)"
   8.448      and rank: "\<And>x. x \<in> S \<Longrightarrow> rank(matrix(f' x)) < CARD('n)"
   8.449    shows "negligible(f ` S)"
   8.450 -proof -
   8.451 +proof%unimportant -
   8.452    let ?U = "\<lambda>n. {x \<in> S. norm(x) \<le> n \<and> onorm(f' x) \<le> real n}"
   8.453    have "\<And>x. x \<in> S \<Longrightarrow> \<exists>n. norm x \<le> real n \<and> onorm (f' x) \<le> real n"
   8.454      by (meson linear order_trans real_arch_simple)
   8.455 @@ -2750,9 +2750,9 @@
   8.456  qed
   8.457  
   8.458  
   8.459 -subsection\<open>A one-way version of change-of-variables not assuming injectivity. \<close>
   8.460 +subsection%important\<open>A one-way version of change-of-variables not assuming injectivity. \<close>
   8.461  
   8.462 -lemma integral_on_image_ubound_weak:
   8.463 +lemma%important integral_on_image_ubound_weak:
   8.464    fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real"
   8.465    assumes S: "S \<in> sets lebesgue"
   8.466        and f: "f \<in> borel_measurable (lebesgue_on (g ` S))"
   8.467 @@ -2763,7 +2763,7 @@
   8.468      shows "f integrable_on (g ` S) \<and>
   8.469             integral (g ` S) f \<le> integral S (\<lambda>x. \<bar>det (matrix (g' x))\<bar> * f(g x))"
   8.470           (is "_ \<and> _ \<le> ?b")
   8.471 -proof -
   8.472 +proof%unimportant -
   8.473    let ?D = "\<lambda>x. \<bar>det (matrix (g' x))\<bar>"
   8.474    have cont_g: "continuous_on S g"
   8.475      using der_g has_derivative_continuous_on by blast
   8.476 @@ -2941,14 +2941,14 @@
   8.477  qed
   8.478  
   8.479  
   8.480 -lemma integral_on_image_ubound_nonneg:
   8.481 +lemma%important integral_on_image_ubound_nonneg:
   8.482    fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real"
   8.483    assumes nonneg_fg: "\<And>x. x \<in> S \<Longrightarrow> 0 \<le> f(g x)"
   8.484        and der_g:   "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)"
   8.485        and intS: "(\<lambda>x. \<bar>det (matrix (g' x))\<bar> * f(g x)) integrable_on S"
   8.486    shows "f integrable_on (g ` S) \<and> integral (g ` S) f \<le> integral S (\<lambda>x. \<bar>det (matrix (g' x))\<bar> * f(g x))"
   8.487           (is "_ \<and> _ \<le> ?b")
   8.488 -proof -
   8.489 +proof%unimportant -
   8.490    let ?D = "\<lambda>x. det (matrix (g' x))"
   8.491    define S' where "S' \<equiv> {x \<in> S. ?D x * f(g x) \<noteq> 0}"
   8.492    then have der_gS': "\<And>x. x \<in> S' \<Longrightarrow> (g has_derivative g' x) (at x within S')"
   8.493 @@ -3071,7 +3071,7 @@
   8.494  qed
   8.495  
   8.496  
   8.497 -lemma absolutely_integrable_on_image_real:
   8.498 +lemma%unimportant absolutely_integrable_on_image_real:
   8.499    fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real" and g :: "real^'n::_ \<Rightarrow> real^'n::_"
   8.500    assumes der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)"
   8.501      and intS: "(\<lambda>x. \<bar>det (matrix (g' x))\<bar> * f(g x)) absolutely_integrable_on S"
   8.502 @@ -3146,29 +3146,29 @@
   8.503  qed
   8.504  
   8.505  
   8.506 -proposition absolutely_integrable_on_image:
   8.507 +proposition%important absolutely_integrable_on_image:
   8.508    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
   8.509    assumes der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)"
   8.510      and intS: "(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f(g x)) absolutely_integrable_on S"
   8.511    shows "f absolutely_integrable_on (g ` S)"
   8.512    apply (rule absolutely_integrable_componentwise [OF absolutely_integrable_on_image_real [OF der_g]])
   8.513 -  using absolutely_integrable_component [OF intS]  by auto
   8.514 +  using%unimportant absolutely_integrable_component [OF intS]  by%unimportant auto
   8.515  
   8.516 -proposition integral_on_image_ubound:
   8.517 +proposition%important integral_on_image_ubound:
   8.518    fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real" and g :: "real^'n::_ \<Rightarrow> real^'n::_"
   8.519    assumes"\<And>x. x \<in> S \<Longrightarrow> 0 \<le> f(g x)"
   8.520      and "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)"
   8.521      and "(\<lambda>x. \<bar>det (matrix (g' x))\<bar> * f(g x)) integrable_on S"
   8.522    shows "integral (g ` S) f \<le> integral S (\<lambda>x. \<bar>det (matrix (g' x))\<bar> * f(g x))"
   8.523 -  using integral_on_image_ubound_nonneg [OF assms] by simp
   8.524 +  using%unimportant integral_on_image_ubound_nonneg [OF assms] by%unimportant simp
   8.525  
   8.526  
   8.527 -subsection\<open>Change-of-variables theorem\<close>
   8.528 +subsection%important\<open>Change-of-variables theorem\<close>
   8.529  
   8.530  text\<open>The classic change-of-variables theorem. We have two versions with quite general hypotheses,
   8.531  the first that the transforming function has a continuous inverse, the second that the base set is
   8.532  Lebesgue measurable.\<close>
   8.533 -lemma cov_invertible_nonneg_le:
   8.534 +lemma%unimportant cov_invertible_nonneg_le:
   8.535    fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real" and g :: "real^'n::_ \<Rightarrow> real^'n::_"
   8.536    assumes der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)"
   8.537      and der_h: "\<And>y. y \<in> T \<Longrightarrow> (h has_derivative h' y) (at y within T)"
   8.538 @@ -3239,7 +3239,7 @@
   8.539  qed
   8.540  
   8.541  
   8.542 -lemma cov_invertible_nonneg_eq:
   8.543 +lemma%unimportant cov_invertible_nonneg_eq:
   8.544    fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real" and g :: "real^'n::_ \<Rightarrow> real^'n::_"
   8.545    assumes "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)"
   8.546        and "\<And>y. y \<in> T \<Longrightarrow> (h has_derivative h' y) (at y within T)"
   8.547 @@ -3252,7 +3252,7 @@
   8.548    by (simp add: has_integral_iff) (meson eq_iff)
   8.549  
   8.550  
   8.551 -lemma cov_invertible_real:
   8.552 +lemma%unimportant cov_invertible_real:
   8.553    fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real" and g :: "real^'n::_ \<Rightarrow> real^'n::_"
   8.554    assumes der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)"
   8.555        and der_h: "\<And>y. y \<in> T \<Longrightarrow> (h has_derivative h' y) (at y within T)"
   8.556 @@ -3418,7 +3418,7 @@
   8.557  qed
   8.558  
   8.559  
   8.560 -lemma cv_inv_version3:
   8.561 +lemma%unimportant cv_inv_version3:
   8.562    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
   8.563    assumes der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)"
   8.564      and der_h: "\<And>y. y \<in> T \<Longrightarrow> (h has_derivative h' y) (at y within T)"
   8.565 @@ -3444,7 +3444,7 @@
   8.566  qed
   8.567  
   8.568  
   8.569 -lemma cv_inv_version4:
   8.570 +lemma%unimportant cv_inv_version4:
   8.571    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
   8.572    assumes der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S) \<and> invertible(matrix(g' x))"
   8.573      and hg: "\<And>x. x \<in> S \<Longrightarrow> continuous_on (g ` S) h \<and> h(g x) = x"
   8.574 @@ -3469,7 +3469,7 @@
   8.575  qed
   8.576  
   8.577  
   8.578 -proposition has_absolute_integral_change_of_variables_invertible:
   8.579 +proposition%important has_absolute_integral_change_of_variables_invertible:
   8.580    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
   8.581    assumes der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)"
   8.582        and hg: "\<And>x. x \<in> S \<Longrightarrow> h(g x) = x"
   8.583 @@ -3477,7 +3477,7 @@
   8.584    shows "(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f(g x)) absolutely_integrable_on S \<and> integral S (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f(g x)) = b \<longleftrightarrow>
   8.585           f absolutely_integrable_on (g ` S) \<and> integral (g ` S) f = b"
   8.586      (is "?lhs = ?rhs")
   8.587 -proof -
   8.588 +proof%unimportant -
   8.589    let ?S = "{x \<in> S. invertible (matrix (g' x))}" and ?D = "\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f(g x)"
   8.590    have *: "?D absolutely_integrable_on ?S \<and> integral ?S ?D = b
   8.591             \<longleftrightarrow> f absolutely_integrable_on (g ` ?S) \<and> integral (g ` ?S) f = b"
   8.592 @@ -3513,7 +3513,7 @@
   8.593  
   8.594  
   8.595  
   8.596 -lemma has_absolute_integral_change_of_variables_compact:
   8.597 +lemma%unimportant has_absolute_integral_change_of_variables_compact:
   8.598    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
   8.599    assumes "compact S"
   8.600        and der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)"
   8.601 @@ -3531,7 +3531,7 @@
   8.602  qed
   8.603  
   8.604  
   8.605 -lemma has_absolute_integral_change_of_variables_compact_family:
   8.606 +lemma%unimportant has_absolute_integral_change_of_variables_compact_family:
   8.607    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
   8.608    assumes compact: "\<And>n::nat. compact (F n)"
   8.609        and der_g: "\<And>x. x \<in> (\<Union>n. F n) \<Longrightarrow> (g has_derivative g' x) (at x within (\<Union>n. F n))"
   8.610 @@ -3710,7 +3710,7 @@
   8.611  qed
   8.612  
   8.613  
   8.614 -proposition has_absolute_integral_change_of_variables:
   8.615 +proposition%important has_absolute_integral_change_of_variables:
   8.616    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
   8.617    assumes S: "S \<in> sets lebesgue"
   8.618      and der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)"
   8.619 @@ -3718,7 +3718,7 @@
   8.620    shows "(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f(g x)) absolutely_integrable_on S \<and>
   8.621             integral S (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f(g x)) = b
   8.622       \<longleftrightarrow> f absolutely_integrable_on (g ` S) \<and> integral (g ` S) f = b"
   8.623 -proof -
   8.624 +proof%unimportant -
   8.625    obtain C N where "fsigma C" "negligible N" and CNS: "C \<union> N = S" and "disjnt C N"
   8.626      using lebesgue_set_almost_fsigma [OF S] .
   8.627    then obtain F :: "nat \<Rightarrow> (real^'m::_) set"
   8.628 @@ -3772,16 +3772,16 @@
   8.629  qed
   8.630  
   8.631  
   8.632 -corollary absolutely_integrable_change_of_variables:
   8.633 +corollary%important absolutely_integrable_change_of_variables:
   8.634    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
   8.635    assumes "S \<in> sets lebesgue"
   8.636      and "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)"
   8.637      and "inj_on g S"
   8.638    shows "f absolutely_integrable_on (g ` S)
   8.639       \<longleftrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f(g x)) absolutely_integrable_on S"
   8.640 -  using assms has_absolute_integral_change_of_variables by blast
   8.641 +  using%unimportant assms has_absolute_integral_change_of_variables by%unimportant blast
   8.642  
   8.643 -corollary integral_change_of_variables:
   8.644 +corollary%important integral_change_of_variables:
   8.645    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
   8.646    assumes S: "S \<in> sets lebesgue"
   8.647      and der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)"
   8.648 @@ -3789,10 +3789,10 @@
   8.649      and disj: "(f absolutely_integrable_on (g ` S) \<or>
   8.650          (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f(g x)) absolutely_integrable_on S)"
   8.651    shows "integral (g ` S) f = integral S (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f(g x))"
   8.652 -  using has_absolute_integral_change_of_variables [OF S der_g inj] disj
   8.653 -  by blast
   8.654 +  using%unimportant has_absolute_integral_change_of_variables [OF S der_g inj] disj
   8.655 +  by%unimportant blast
   8.656  
   8.657 -lemma has_absolute_integral_change_of_variables_1:
   8.658 +lemma%unimportant has_absolute_integral_change_of_variables_1:
   8.659    fixes f :: "real \<Rightarrow> real^'n::{finite,wellorder}" and g :: "real \<Rightarrow> real"
   8.660    assumes S: "S \<in> sets lebesgue"
   8.661      and der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_vector_derivative g' x) (at x within S)"
   8.662 @@ -3831,19 +3831,19 @@
   8.663  qed
   8.664  
   8.665  
   8.666 -corollary absolutely_integrable_change_of_variables_1:
   8.667 +corollary%important absolutely_integrable_change_of_variables_1:
   8.668    fixes f :: "real \<Rightarrow> real^'n::{finite,wellorder}" and g :: "real \<Rightarrow> real"
   8.669    assumes S: "S \<in> sets lebesgue"
   8.670      and der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_vector_derivative g' x) (at x within S)"
   8.671      and inj: "inj_on g S"
   8.672    shows "(f absolutely_integrable_on g ` S \<longleftrightarrow>
   8.673               (\<lambda>x. \<bar>g' x\<bar> *\<^sub>R f(g x)) absolutely_integrable_on S)"
   8.674 -  using has_absolute_integral_change_of_variables_1 [OF assms] by auto
   8.675 +  using%unimportant has_absolute_integral_change_of_variables_1 [OF assms] by%unimportant auto
   8.676  
   8.677  
   8.678 -subsection\<open>Change of variables for integrals: special case of linear function\<close>
   8.679 +subsection%important\<open>Change of variables for integrals: special case of linear function\<close>
   8.680  
   8.681 -lemma has_absolute_integral_change_of_variables_linear:
   8.682 +lemma%unimportant has_absolute_integral_change_of_variables_linear:
   8.683    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
   8.684    assumes "linear g"
   8.685    shows "(\<lambda>x. \<bar>det (matrix g)\<bar> *\<^sub>R f(g x)) absolutely_integrable_on S \<and>
   8.686 @@ -3868,14 +3868,14 @@
   8.687    qed (use h in auto)
   8.688  qed
   8.689  
   8.690 -lemma absolutely_integrable_change_of_variables_linear:
   8.691 +lemma%unimportant absolutely_integrable_change_of_variables_linear:
   8.692    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
   8.693    assumes "linear g"
   8.694    shows "(\<lambda>x. \<bar>det (matrix g)\<bar> *\<^sub>R f(g x)) absolutely_integrable_on S
   8.695       \<longleftrightarrow> f absolutely_integrable_on (g ` S)"
   8.696    using assms has_absolute_integral_change_of_variables_linear by blast
   8.697  
   8.698 -lemma absolutely_integrable_on_linear_image:
   8.699 +lemma%unimportant absolutely_integrable_on_linear_image:
   8.700    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
   8.701    assumes "linear g"
   8.702    shows "f absolutely_integrable_on (g ` S)
   8.703 @@ -3883,12 +3883,12 @@
   8.704    unfolding assms absolutely_integrable_change_of_variables_linear [OF assms, symmetric] absolutely_integrable_on_scaleR_iff
   8.705    by (auto simp: set_integrable_def)
   8.706  
   8.707 -lemma integral_change_of_variables_linear:
   8.708 +lemma%important integral_change_of_variables_linear:
   8.709    fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
   8.710    assumes "linear g"
   8.711        and "f absolutely_integrable_on (g ` S) \<or> (f \<circ> g) absolutely_integrable_on S"
   8.712      shows "integral (g ` S) f = \<bar>det (matrix g)\<bar> *\<^sub>R integral S (f \<circ> g)"
   8.713 -proof -
   8.714 +proof%unimportant -
   8.715    have "((\<lambda>x. \<bar>det (matrix g)\<bar> *\<^sub>R f (g x)) absolutely_integrable_on S) \<or> (f absolutely_integrable_on g ` S)"
   8.716      using absolutely_integrable_on_linear_image assms by blast
   8.717    moreover
   8.718 @@ -3900,20 +3900,20 @@
   8.719      by blast
   8.720  qed
   8.721  
   8.722 -subsection\<open>Change of variable for measure\<close>
   8.723 +subsection%important\<open>Change of variable for measure\<close>
   8.724  
   8.725 -lemma has_measure_differentiable_image:
   8.726 +lemma%unimportant has_measure_differentiable_image:
   8.727    fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real^'n::_"
   8.728    assumes "S \<in> sets lebesgue"
   8.729        and "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)"
   8.730        and "inj_on f S"
   8.731    shows "f ` S \<in> lmeasurable \<and> measure lebesgue (f ` S) = m
   8.732       \<longleftrightarrow> ((\<lambda>x. \<bar>det (matrix (f' x))\<bar>) has_integral m) S"
   8.733 -  using has_absolute_integral_change_of_variables [OF assms, of "\<lambda>x. (1::real^1)" "vec m"]
   8.734 -  unfolding absolutely_integrable_on_1_iff integral_on_1_eq integrable_on_1_iff absolutely_integrable_on_def
   8.735 -  by (auto simp: has_integral_iff lmeasurable_iff_integrable_on lmeasure_integral)
   8.736 +  using%unimportant has_absolute_integral_change_of_variables [OF assms, of "\<lambda>x. (1::real^1)" "vec m"]
   8.737 +  unfolding%unimportant absolutely_integrable_on_1_iff integral_on_1_eq integrable_on_1_iff absolutely_integrable_on_def
   8.738 +  by%unimportant (auto simp: has_integral_iff lmeasurable_iff_integrable_on lmeasure_integral)
   8.739  
   8.740 -lemma measurable_differentiable_image_eq:
   8.741 +lemma%unimportant measurable_differentiable_image_eq:
   8.742    fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real^'n::_"
   8.743    assumes "S \<in> sets lebesgue"
   8.744        and "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)"
   8.745 @@ -3922,23 +3922,23 @@
   8.746    using has_measure_differentiable_image [OF assms]
   8.747    by blast
   8.748  
   8.749 -lemma measurable_differentiable_image_alt:
   8.750 +lemma%important measurable_differentiable_image_alt:
   8.751    fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real^'n::_"
   8.752    assumes "S \<in> sets lebesgue"
   8.753      and "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)"
   8.754      and "inj_on f S"
   8.755    shows "f ` S \<in> lmeasurable \<longleftrightarrow> (\<lambda>x. \<bar>det (matrix (f' x))\<bar>) absolutely_integrable_on S"
   8.756 -  using measurable_differentiable_image_eq [OF assms]
   8.757 -  by (simp only: absolutely_integrable_on_iff_nonneg)
   8.758 +  using%unimportant measurable_differentiable_image_eq [OF assms]
   8.759 +  by%unimportant (simp only: absolutely_integrable_on_iff_nonneg)
   8.760  
   8.761 -lemma measure_differentiable_image_eq:
   8.762 +lemma%important measure_differentiable_image_eq:
   8.763    fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real^'n::_"
   8.764    assumes S: "S \<in> sets lebesgue"
   8.765      and der_f: "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)"
   8.766      and inj: "inj_on f S"
   8.767      and intS: "(\<lambda>x. \<bar>det (matrix (f' x))\<bar>) integrable_on S"
   8.768    shows "measure lebesgue (f ` S) = integral S (\<lambda>x. \<bar>det (matrix (f' x))\<bar>)"
   8.769 -  using measurable_differentiable_image_eq [OF S der_f inj]
   8.770 -        assms has_measure_differentiable_image by blast
   8.771 +  using%unimportant measurable_differentiable_image_eq [OF S der_f inj]
   8.772 +        assms has_measure_differentiable_image by%unimportant blast
   8.773  
   8.774  end
     9.1 --- a/src/HOL/Analysis/Cross3.thy	Mon Aug 27 22:58:36 2018 +0200
     9.2 +++ b/src/HOL/Analysis/Cross3.thy	Tue Aug 28 13:28:39 2018 +0100
     9.3 @@ -13,7 +13,7 @@
     9.4  context includes no_Set_Product_syntax 
     9.5  begin \<comment>\<open>locally disable syntax for set product, to avoid warnings\<close>
     9.6  
     9.7 -definition cross3 :: "[real^3, real^3] \<Rightarrow> real^3"  (infixr "\<times>" 80)
     9.8 +definition%important cross3 :: "[real^3, real^3] \<Rightarrow> real^3"  (infixr "\<times>" 80)
     9.9    where "a \<times> b \<equiv>
    9.10      vector [a$2 * b$3 - a$3 * b$2,
    9.11              a$3 * b$1 - a$1 * b$3,
    9.12 @@ -33,76 +33,76 @@
    9.13  
    9.14  unbundle cross3_syntax
    9.15  
    9.16 -subsection\<open> Basic lemmas.\<close>
    9.17 +subsection%important\<open> Basic lemmas.\<close>
    9.18  
    9.19  lemmas cross3_simps = cross3_def inner_vec_def sum_3 det_3 vec_eq_iff vector_def algebra_simps
    9.20  
    9.21 -lemma dot_cross_self: "x \<bullet> (x \<times> y) = 0" "x \<bullet> (y \<times> x) = 0" "(x \<times> y) \<bullet> y = 0" "(y \<times> x) \<bullet> y = 0"
    9.22 +lemma%unimportant dot_cross_self: "x \<bullet> (x \<times> y) = 0" "x \<bullet> (y \<times> x) = 0" "(x \<times> y) \<bullet> y = 0" "(y \<times> x) \<bullet> y = 0"
    9.23    by (simp_all add: orthogonal_def cross3_simps)
    9.24  
    9.25 -lemma orthogonal_cross: "orthogonal (x \<times> y) x" "orthogonal (x \<times> y) y"  
    9.26 +lemma%unimportant  orthogonal_cross: "orthogonal (x \<times> y) x" "orthogonal (x \<times> y) y"  
    9.27                          "orthogonal y (x \<times> y)" "orthogonal (x \<times> y) x"
    9.28    by (simp_all add: orthogonal_def dot_cross_self)
    9.29  
    9.30 -lemma cross_zero_left [simp]: "0 \<times> x = 0" and cross_zero_right [simp]: "x \<times> 0 = 0" for x::"real^3"
    9.31 +lemma%unimportant  cross_zero_left [simp]: "0 \<times> x = 0" and cross_zero_right [simp]: "x \<times> 0 = 0" for x::"real^3"
    9.32    by (simp_all add: cross3_simps)
    9.33  
    9.34 -lemma cross_skew: "(x \<times> y) = -(y \<times> x)" for x::"real^3"
    9.35 +lemma%unimportant  cross_skew: "(x \<times> y) = -(y \<times> x)" for x::"real^3"
    9.36    by (simp add: cross3_simps)
    9.37  
    9.38 -lemma cross_refl [simp]: "x \<times> x = 0" for x::"real^3"
    9.39 +lemma%unimportant  cross_refl [simp]: "x \<times> x = 0" for x::"real^3"
    9.40    by (simp add: cross3_simps)
    9.41  
    9.42 -lemma cross_add_left: "(x + y) \<times> z = (x \<times> z) + (y \<times> z)" for x::"real^3"
    9.43 +lemma%unimportant  cross_add_left: "(x + y) \<times> z = (x \<times> z) + (y \<times> z)" for x::"real^3"
    9.44    by (simp add: cross3_simps)
    9.45  
    9.46 -lemma cross_add_right: "x \<times> (y + z) = (x \<times> y) + (x \<times> z)" for x::"real^3"
    9.47 +lemma%unimportant  cross_add_right: "x \<times> (y + z) = (x \<times> y) + (x \<times> z)" for x::"real^3"
    9.48    by (simp add: cross3_simps)
    9.49  
    9.50 -lemma cross_mult_left: "(c *\<^sub>R x) \<times> y = c *\<^sub>R (x \<times> y)" for x::"real^3"
    9.51 +lemma%unimportant  cross_mult_left: "(c *\<^sub>R x) \<times> y = c *\<^sub>R (x \<times> y)" for x::"real^3"
    9.52    by (simp add: cross3_simps)
    9.53  
    9.54 -lemma cross_mult_right: "x \<times> (c *\<^sub>R y) = c *\<^sub>R (x \<times> y)" for x::"real^3"
    9.55 +lemma%unimportant  cross_mult_right: "x \<times> (c *\<^sub>R y) = c *\<^sub>R (x \<times> y)" for x::"real^3"
    9.56    by (simp add: cross3_simps)
    9.57  
    9.58 -lemma cross_minus_left [simp]: "(-x) \<times> y = - (x \<times> y)" for x::"real^3"
    9.59 +lemma%unimportant  cross_minus_left [simp]: "(-x) \<times> y = - (x \<times> y)" for x::"real^3"
    9.60    by (simp add: cross3_simps)
    9.61  
    9.62 -lemma cross_minus_right [simp]: "x \<times> -y = - (x \<times> y)" for x::"real^3"
    9.63 +lemma%unimportant  cross_minus_right [simp]: "x \<times> -y = - (x \<times> y)" for x::"real^3"
    9.64    by (simp add: cross3_simps)
    9.65  
    9.66 -lemma left_diff_distrib: "(x - y) \<times> z = x \<times> z - y \<times> z" for x::"real^3"
    9.67 +lemma%unimportant  left_diff_distrib: "(x - y) \<times> z = x \<times> z - y \<times> z" for x::"real^3"
    9.68    by (simp add: cross3_simps)
    9.69  
    9.70 -lemma right_diff_distrib: "x \<times> (y - z) = x \<times> y - x \<times> z" for x::"real^3"
    9.71 +lemma%unimportant  right_diff_distrib: "x \<times> (y - z) = x \<times> y - x \<times> z" for x::"real^3"
    9.72    by (simp add: cross3_simps)
    9.73  
    9.74  hide_fact (open) left_diff_distrib right_diff_distrib
    9.75  
    9.76 -lemma Jacobi: "x \<times> (y \<times> z) + y \<times> (z \<times> x) + z \<times> (x \<times> y) = 0" for x::"real^3"
    9.77 -  by (simp add: cross3_simps)
    9.78 +lemma%important  Jacobi: "x \<times> (y \<times> z) + y \<times> (z \<times> x) + z \<times> (x \<times> y) = 0" for x::"real^3"
    9.79 +  by%unimportant (simp add: cross3_simps)
    9.80  
    9.81 -lemma Lagrange: "x \<times> (y \<times> z) = (x \<bullet> z) *\<^sub>R y - (x \<bullet> y) *\<^sub>R z"
    9.82 -  by (simp add: cross3_simps) (metis (full_types) exhaust_3)
    9.83 +lemma%important  Lagrange: "x \<times> (y \<times> z) = (x \<bullet> z) *\<^sub>R y - (x \<bullet> y) *\<^sub>R z"
    9.84 +  by%unimportant (simp add: cross3_simps) (metis (full_types) exhaust_3)
    9.85  
    9.86 -lemma cross_triple: "(x \<times> y) \<bullet> z = (y \<times> z) \<bullet> x"
    9.87 +lemma%unimportant  cross_triple: "(x \<times> y) \<bullet> z = (y \<times> z) \<bullet> x"
    9.88    by (simp add: cross3_def inner_vec_def sum_3 vec_eq_iff algebra_simps)
    9.89  
    9.90 -lemma cross_components:
    9.91 +lemma%unimportant  cross_components:
    9.92     "(x \<times> y)$1 = x$2 * y$3 - y$2 * x$3" "(x \<times> y)$2 = x$3 * y$1 - y$3 * x$1" "(x \<times> y)$3 = x$1 * y$2 - y$1 * x$2"
    9.93    by (simp_all add: cross3_def inner_vec_def sum_3 vec_eq_iff algebra_simps)
    9.94  
    9.95 -lemma cross_basis: "(axis 1 1) \<times> (axis 2 1) = axis 3 1" "(axis 2 1) \<times> (axis 1 1) = -(axis 3 1)" 
    9.96 +lemma%unimportant  cross_basis: "(axis 1 1) \<times> (axis 2 1) = axis 3 1" "(axis 2 1) \<times> (axis 1 1) = -(axis 3 1)" 
    9.97                     "(axis 2 1) \<times> (axis 3 1) = axis 1 1" "(axis 3 1) \<times> (axis 2 1) = -(axis 1 1)" 
    9.98                     "(axis 3 1) \<times> (axis 1 1) = axis 2 1" "(axis 1 1) \<times> (axis 3 1) = -(axis 2 1)"
    9.99    using exhaust_3
   9.100    by (force simp add: axis_def cross3_simps)+
   9.101  
   9.102 -lemma cross_basis_nonzero:
   9.103 +lemma%unimportant  cross_basis_nonzero:
   9.104    "u \<noteq> 0 \<Longrightarrow> ~(u \<times> axis 1 1 = 0) \<or> ~(u \<times> axis 2 1 = 0) \<or> ~(u \<times> axis 3 1 = 0)"
   9.105    by (clarsimp simp add: axis_def cross3_simps) (metis vector_3 exhaust_3)
   9.106  
   9.107 -lemma cross_dot_cancel:
   9.108 +lemma%unimportant  cross_dot_cancel:
   9.109    fixes x::"real^3"
   9.110    assumes deq: "x \<bullet> y = x \<bullet> z" and veq: "x \<times> y = x \<times> z" and x: "x \<noteq> 0"
   9.111    shows "y = z" 
   9.112 @@ -116,25 +116,25 @@
   9.113      using eq_iff_diff_eq_0 by blast
   9.114  qed
   9.115  
   9.116 -lemma norm_cross_dot: "(norm (x \<times> y))\<^sup>2 + (x \<bullet> y)\<^sup>2 = (norm x * norm y)\<^sup>2"
   9.117 +lemma%unimportant  norm_cross_dot: "(norm (x \<times> y))\<^sup>2 + (x \<bullet> y)\<^sup>2 = (norm x * norm y)\<^sup>2"
   9.118    unfolding power2_norm_eq_inner power_mult_distrib
   9.119    by (simp add: cross3_simps power2_eq_square)
   9.120  
   9.121 -lemma dot_cross_det: "x \<bullet> (y \<times> z) = det(vector[x,y,z])"
   9.122 +lemma%unimportant  dot_cross_det: "x \<bullet> (y \<times> z) = det(vector[x,y,z])"
   9.123    by (simp add: cross3_simps) 
   9.124  
   9.125 -lemma cross_cross_det: "(w \<times> x) \<times> (y \<times> z) = det(vector[w,x,z]) *\<^sub>R y - det(vector[w,x,y]) *\<^sub>R z"
   9.126 +lemma%unimportant  cross_cross_det: "(w \<times> x) \<times> (y \<times> z) = det(vector[w,x,z]) *\<^sub>R y - det(vector[w,x,y]) *\<^sub>R z"
   9.127    using exhaust_3 by (force simp add: cross3_simps) 
   9.128  
   9.129 -lemma dot_cross: "(w \<times> x) \<bullet> (y \<times> z) = (w \<bullet> y) * (x \<bullet> z) - (w \<bullet> z) * (x \<bullet> y)"
   9.130 -  by (force simp add: cross3_simps) 
   9.131 +lemma%important  dot_cross: "(w \<times> x) \<bullet> (y \<times> z) = (w \<bullet> y) * (x \<bullet> z) - (w \<bullet> z) * (x \<bullet> y)"
   9.132 +  by%unimportant (force simp add: cross3_simps) 
   9.133  
   9.134 -lemma norm_cross: "(norm (x \<times> y))\<^sup>2 = (norm x)\<^sup>2 * (norm y)\<^sup>2 - (x \<bullet> y)\<^sup>2"
   9.135 +lemma%unimportant  norm_cross: "(norm (x \<times> y))\<^sup>2 = (norm x)\<^sup>2 * (norm y)\<^sup>2 - (x \<bullet> y)\<^sup>2"
   9.136    unfolding power2_norm_eq_inner power_mult_distrib
   9.137    by (simp add: cross3_simps power2_eq_square)
   9.138  
   9.139 -lemma cross_eq_0: "x \<times> y = 0 \<longleftrightarrow> collinear{0,x,y}"
   9.140 -proof -
   9.141 +lemma%important  cross_eq_0: "x \<times> y = 0 \<longleftrightarrow> collinear{0,x,y}"
   9.142 +proof%unimportant -
   9.143    have "x \<times> y = 0 \<longleftrightarrow> norm (x \<times> y) = 0"
   9.144      by simp
   9.145    also have "... \<longleftrightarrow> (norm x * norm y)\<^sup>2 = (x \<bullet> y)\<^sup>2"
   9.146 @@ -147,11 +147,11 @@
   9.147    finally show ?thesis .
   9.148  qed
   9.149  
   9.150 -lemma cross_eq_self: "x \<times> y = x \<longleftrightarrow> x = 0" "x \<times> y = y \<longleftrightarrow> y = 0"
   9.151 +lemma%unimportant  cross_eq_self: "x \<times> y = x \<longleftrightarrow> x = 0" "x \<times> y = y \<longleftrightarrow> y = 0"
   9.152    apply (metis cross_zero_left dot_cross_self(1) inner_eq_zero_iff)
   9.153    by (metis cross_zero_right dot_cross_self(2) inner_eq_zero_iff)
   9.154  
   9.155 -lemma norm_and_cross_eq_0:
   9.156 +lemma%unimportant  norm_and_cross_eq_0:
   9.157     "x \<bullet> y = 0 \<and> x \<times> y = 0 \<longleftrightarrow> x = 0 \<or> y = 0" (is "?lhs = ?rhs")
   9.158  proof 
   9.159    assume ?lhs
   9.160 @@ -159,7 +159,7 @@
   9.161      by (metis cross_dot_cancel cross_zero_right inner_zero_right)
   9.162  qed auto
   9.163  
   9.164 -lemma bilinear_cross: "bilinear(\<times>)"
   9.165 +lemma%unimportant  bilinear_cross: "bilinear(\<times>)"
   9.166    apply (auto simp add: bilinear_def linear_def)
   9.167    apply unfold_locales
   9.168    apply (simp add: cross_add_right)
   9.169 @@ -168,33 +168,33 @@
   9.170    apply (simp add: cross_mult_left)
   9.171    done
   9.172  
   9.173 -subsection\<open>Preservation by rotation, or other orthogonal transformation up to sign.\<close>
   9.174 +subsection%important   \<open>Preservation by rotation, or other orthogonal transformation up to sign.\<close>
   9.175  
   9.176 -lemma cross_matrix_mult: "transpose A *v ((A *v x) \<times> (A *v y)) = det A *\<^sub>R (x \<times> y)"
   9.177 +lemma%unimportant  cross_matrix_mult: "transpose A *v ((A *v x) \<times> (A *v y)) = det A *\<^sub>R (x \<times> y)"
   9.178    apply (simp add: vec_eq_iff   )
   9.179    apply (simp add: vector_matrix_mult_def matrix_vector_mult_def forall_3 cross3_simps)
   9.180    done
   9.181  
   9.182 -lemma cross_orthogonal_matrix:
   9.183 +lemma%important  cross_orthogonal_matrix:
   9.184    assumes "orthogonal_matrix A"
   9.185    shows "(A *v x) \<times> (A *v y) = det A *\<^sub>R (A *v (x \<times> y))"
   9.186 -proof -
   9.187 +proof%unimportant -
   9.188    have "mat 1 = transpose (A ** transpose A)"
   9.189      by (metis (no_types) assms orthogonal_matrix_def transpose_mat)
   9.190    then show ?thesis
   9.191      by (metis (no_types) vector_matrix_mul_rid vector_transpose_matrix cross_matrix_mult matrix_vector_mul_assoc matrix_vector_mult_scaleR)
   9.192  qed
   9.193  
   9.194 -lemma cross_rotation_matrix: "rotation_matrix A \<Longrightarrow> (A *v x) \<times> (A *v y) =  A *v (x \<times> y)"
   9.195 +lemma%unimportant  cross_rotation_matrix: "rotation_matrix A \<Longrightarrow> (A *v x) \<times> (A *v y) =  A *v (x \<times> y)"
   9.196    by (simp add: rotation_matrix_def cross_orthogonal_matrix)
   9.197  
   9.198 -lemma cross_rotoinversion_matrix: "rotoinversion_matrix A \<Longrightarrow> (A *v x) \<times> (A *v y) = - A *v (x \<times> y)"
   9.199 +lemma%unimportant  cross_rotoinversion_matrix: "rotoinversion_matrix A \<Longrightarrow> (A *v x) \<times> (A *v y) = - A *v (x \<times> y)"
   9.200    by (simp add: rotoinversion_matrix_def cross_orthogonal_matrix scaleR_matrix_vector_assoc)
   9.201  
   9.202 -lemma cross_orthogonal_transformation:
   9.203 +lemma%important  cross_orthogonal_transformation:
   9.204    assumes "orthogonal_transformation f"
   9.205    shows   "(f x) \<times> (f y) = det(matrix f) *\<^sub>R f(x \<times> y)"
   9.206 -proof -
   9.207 +proof%unimportant -
   9.208    have orth: "orthogonal_matrix (matrix f)"
   9.209      using assms orthogonal_transformation_matrix by blast
   9.210    have "matrix f *v z = f z" for z
   9.211 @@ -203,20 +203,20 @@
   9.212      by simp
   9.213  qed
   9.214  
   9.215 -lemma cross_linear_image:
   9.216 +lemma%unimportant  cross_linear_image:
   9.217     "\<lbrakk>linear f; \<And>x. norm(f x) = norm x; det(matrix f) = 1\<rbrakk>
   9.218             \<Longrightarrow> (f x) \<times> (f y) = f(x \<times> y)"
   9.219    by (simp add: cross_orthogonal_transformation orthogonal_transformation)
   9.220  
   9.221 -subsection\<open>Continuity\<close>
   9.222 +subsection%unimportant \<open>Continuity\<close>
   9.223  
   9.224 -lemma continuous_cross: "\<lbrakk>continuous F f; continuous F g\<rbrakk> \<Longrightarrow> continuous F (\<lambda>x. (f x) \<times> (g x))"
   9.225 +lemma%unimportant  continuous_cross: "\<lbrakk>continuous F f; continuous F g\<rbrakk> \<Longrightarrow> continuous F (\<lambda>x. (f x) \<times> (g x))"
   9.226    apply (subst continuous_componentwise)
   9.227    apply (clarsimp simp add: cross3_simps)
   9.228    apply (intro continuous_intros; simp)
   9.229    done
   9.230  
   9.231 -lemma continuous_on_cross:
   9.232 +lemma%unimportant  continuous_on_cross:
   9.233    fixes f :: "'a::t2_space \<Rightarrow> real^3"
   9.234    shows "\<lbrakk>continuous_on S f; continuous_on S g\<rbrakk> \<Longrightarrow> continuous_on S (\<lambda>x. (f x) \<times> (g x))"
   9.235    by (simp add: continuous_on_eq_continuous_within continuous_cross)
    10.1 --- a/src/HOL/Analysis/Determinants.thy	Mon Aug 27 22:58:36 2018 +0200
    10.2 +++ b/src/HOL/Analysis/Determinants.thy	Tue Aug 28 13:28:39 2018 +0100
    10.3 @@ -10,40 +10,40 @@
    10.4    "HOL-Library.Permutations"
    10.5  begin
    10.6  
    10.7 -subsection \<open>Trace\<close>
    10.8 +subsection%important  \<open>Trace\<close>
    10.9  
   10.10 -definition trace :: "'a::semiring_1^'n^'n \<Rightarrow> 'a"
   10.11 +definition%important  trace :: "'a::semiring_1^'n^'n \<Rightarrow> 'a"
   10.12    where "trace A = sum (\<lambda>i. ((A$i)$i)) (UNIV::'n set)"
   10.13  
   10.14 -lemma trace_0: "trace (mat 0) = 0"
   10.15 +lemma%unimportant  trace_0: "trace (mat 0) = 0"
   10.16    by (simp add: trace_def mat_def)
   10.17  
   10.18 -lemma trace_I: "trace (mat 1 :: 'a::semiring_1^'n^'n) = of_nat(CARD('n))"
   10.19 +lemma%unimportant  trace_I: "trace (mat 1 :: 'a::semiring_1^'n^'n) = of_nat(CARD('n))"
   10.20    by (simp add: trace_def mat_def)
   10.21  
   10.22 -lemma trace_add: "trace ((A::'a::comm_semiring_1^'n^'n) + B) = trace A + trace B"
   10.23 +lemma%unimportant  trace_add: "trace ((A::'a::comm_semiring_1^'n^'n) + B) = trace A + trace B"
   10.24    by (simp add: trace_def sum.distrib)
   10.25  
   10.26 -lemma trace_sub: "trace ((A::'a::comm_ring_1^'n^'n) - B) = trace A - trace B"
   10.27 +lemma%unimportant  trace_sub: "trace ((A::'a::comm_ring_1^'n^'n) - B) = trace A - trace B"
   10.28    by (simp add: trace_def sum_subtractf)
   10.29  
   10.30 -lemma trace_mul_sym: "trace ((A::'a::comm_semiring_1^'n^'m) ** B) = trace (B**A)"
   10.31 +lemma%important  trace_mul_sym: "trace ((A::'a::comm_semiring_1^'n^'m) ** B) = trace (B**A)"
   10.32    apply (simp add: trace_def matrix_matrix_mult_def)
   10.33    apply (subst sum.swap)
   10.34    apply (simp add: mult.commute)
   10.35    done
   10.36  
   10.37 -subsubsection \<open>Definition of determinant\<close>
   10.38 +subsubsection%important  \<open>Definition of determinant\<close>
   10.39  
   10.40 -definition det:: "'a::comm_ring_1^'n^'n \<Rightarrow> 'a" where
   10.41 +definition%important  det:: "'a::comm_ring_1^'n^'n \<Rightarrow> 'a" where
   10.42    "det A =
   10.43      sum (\<lambda>p. of_int (sign p) * prod (\<lambda>i. A$i$p i) (UNIV :: 'n set))
   10.44        {p. p permutes (UNIV :: 'n set)}"
   10.45  
   10.46  text \<open>Basic determinant properties\<close>
   10.47  
   10.48 -lemma det_transpose [simp]: "det (transpose A) = det (A::'a::comm_ring_1 ^'n^'n)"
   10.49 -proof -
   10.50 +lemma%important  det_transpose [simp]: "det (transpose A) = det (A::'a::comm_ring_1 ^'n^'n)"
   10.51 +proof%unimportant -
   10.52    let ?di = "\<lambda>A i j. A$i$j"
   10.53    let ?U = "(UNIV :: 'n set)"
   10.54    have fU: "finite ?U" by simp
   10.55 @@ -80,7 +80,7 @@
   10.56      by (subst sum_permutations_inverse) (blast intro: sum.cong)
   10.57  qed
   10.58  
   10.59 -lemma det_lowerdiagonal:
   10.60 +lemma%unimportant  det_lowerdiagonal:
   10.61    fixes A :: "'a::comm_ring_1^('n::{finite,wellorder})^('n::{finite,wellorder})"
   10.62    assumes ld: "\<And>i j. i < j \<Longrightarrow> A$i$j = 0"
   10.63    shows "det A = prod (\<lambda>i. A$i$i) (UNIV:: 'n set)"
   10.64 @@ -107,11 +107,11 @@
   10.65      unfolding det_def by (simp add: sign_id)
   10.66  qed
   10.67  
   10.68 -lemma det_upperdiagonal:
   10.69 +lemma%important  det_upperdiagonal:
   10.70    fixes A :: "'a::comm_ring_1^'n::{finite,wellorder}^'n::{finite,wellorder}"
   10.71    assumes ld: "\<And>i j. i > j \<Longrightarrow> A$i$j = 0"
   10.72    shows "det A = prod (\<lambda>i. A$i$i) (UNIV:: 'n set)"
   10.73 -proof -
   10.74 +proof%unimportant -
   10.75    let ?U = "UNIV:: 'n set"
   10.76    let ?PU = "{p. p permutes ?U}"
   10.77    let ?pp = "(\<lambda>p. of_int (sign p) * prod (\<lambda>i. A$i$p i) (UNIV :: 'n set))"
   10.78 @@ -134,11 +134,11 @@
   10.79      unfolding det_def by (simp add: sign_id)
   10.80  qed
   10.81  
   10.82 -lemma det_diagonal:
   10.83 +lemma%important  det_diagonal:
   10.84    fixes A :: "'a::comm_ring_1^'n^'n"
   10.85    assumes ld: "\<And>i j. i \<noteq> j \<Longrightarrow> A$i$j = 0"
   10.86    shows "det A = prod (\<lambda>i. A$i$i) (UNIV::'n set)"
   10.87 -proof -
   10.88 +proof%unimportant -
   10.89    let ?U = "UNIV:: 'n set"
   10.90    let ?PU = "{p. p permutes ?U}"
   10.91    let ?pp = "\<lambda>p. of_int (sign p) * prod (\<lambda>i. A$i$p i) (UNIV :: 'n set)"
   10.92 @@ -161,13 +161,13 @@
   10.93      unfolding det_def by (simp add: sign_id)
   10.94  qed
   10.95  
   10.96 -lemma det_I [simp]: "det (mat 1 :: 'a::comm_ring_1^'n^'n) = 1"
   10.97 +lemma%unimportant  det_I [simp]: "det (mat 1 :: 'a::comm_ring_1^'n^'n) = 1"
   10.98    by (simp add: det_diagonal mat_def)
   10.99  
  10.100 -lemma det_0 [simp]: "det (mat 0 :: 'a::comm_ring_1^'n^'n) = 0"
  10.101 +lemma%unimportant  det_0 [simp]: "det (mat 0 :: 'a::comm_ring_1^'n^'n) = 0"
  10.102    by (simp add: det_def prod_zero power_0_left)
  10.103  
  10.104 -lemma det_permute_rows:
  10.105 +lemma%unimportant  det_permute_rows:
  10.106    fixes A :: "'a::comm_ring_1^'n^'n"
  10.107    assumes p: "p permutes (UNIV :: 'n::finite set)"
  10.108    shows "det (\<chi> i. A$p i :: 'a^'n^'n) = of_int (sign p) * det A"
  10.109 @@ -204,11 +204,11 @@
  10.110      done
  10.111  qed
  10.112  
  10.113 -lemma det_permute_columns:
  10.114 +lemma%important  det_permute_columns:
  10.115    fixes A :: "'a::comm_ring_1^'n^'n"
  10.116    assumes p: "p permutes (UNIV :: 'n set)"
  10.117    shows "det(\<chi> i j. A$i$ p j :: 'a^'n^'n) = of_int (sign p) * det A"
  10.118 -proof -
  10.119 +proof%unimportant -
  10.120    let ?Ap = "\<chi> i j. A$i$ p j :: 'a^'n^'n"
  10.121    let ?At = "transpose A"
  10.122    have "of_int (sign p) * det A = det (transpose (\<chi> i. transpose A $ p i))"
  10.123 @@ -220,7 +220,7 @@
  10.124      by simp
  10.125  qed
  10.126  
  10.127 -lemma det_identical_columns:
  10.128 +lemma%unimportant  det_identical_columns:
  10.129    fixes A :: "'a::comm_ring_1^'n^'n"
  10.130    assumes jk: "j \<noteq> k"
  10.131      and r: "column j A = column k A"
  10.132 @@ -300,24 +300,24 @@
  10.133    finally show "det A = 0" by simp
  10.134  qed
  10.135  
  10.136 -lemma det_identical_rows:
  10.137 +lemma%unimportant  det_identical_rows:
  10.138    fixes A :: "'a::comm_ring_1^'n^'n"
  10.139    assumes ij: "i \<noteq> j" and r: "row i A = row j A"
  10.140    shows "det A = 0"
  10.141    by (metis column_transpose det_identical_columns det_transpose ij r)
  10.142  
  10.143 -lemma det_zero_row:
  10.144 +lemma%unimportant  det_zero_row:
  10.145    fixes A :: "'a::{idom, ring_char_0}^'n^'n" and F :: "'b::{field}^'m^'m"
  10.146    shows "row i A = 0 \<Longrightarrow> det A = 0" and "row j F = 0 \<Longrightarrow> det F = 0"
  10.147    by (force simp: row_def det_def vec_eq_iff sign_nz intro!: sum.neutral)+
  10.148  
  10.149 -lemma det_zero_column:
  10.150 +lemma%unimportant  det_zero_column:
  10.151    fixes A :: "'a::{idom, ring_char_0}^'n^'n" and F :: "'b::{field}^'m^'m"
  10.152    shows "column i A = 0 \<Longrightarrow> det A = 0" and "column j F = 0 \<Longrightarrow> det F = 0"
  10.153    unfolding atomize_conj atomize_imp
  10.154    by (metis det_transpose det_zero_row row_transpose)
  10.155  
  10.156 -lemma det_row_add:
  10.157 +lemma%unimportant  det_row_add:
  10.158    fixes a b c :: "'n::finite \<Rightarrow> _ ^ 'n"
  10.159    shows "det((\<chi> i. if i = k then a i + b i else c i)::'a::comm_ring_1^'n^'n) =
  10.160      det((\<chi> i. if i = k then a i else c i)::'a::comm_ring_1^'n^'n) +
  10.161 @@ -358,7 +358,7 @@
  10.162      by (simp add: field_simps)
  10.163  qed auto
  10.164  
  10.165 -lemma det_row_mul:
  10.166 +lemma%unimportant  det_row_mul:
  10.167    fixes a b :: "'n::finite \<Rightarrow> _ ^ 'n"