# HG changeset patch # User wenzelm # Date 1484657950 -3600 # Node ID f0e07600de476cd92bc4ee41f3bdec18f5afbb7b # Parent 6108dddad9f0f2710dc545013e06165940c3c55e isabelle update_cartouches -c -t; diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Analysis/Bochner_Integration.thy --- a/src/HOL/Analysis/Bochner_Integration.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Analysis/Bochner_Integration.thy Tue Jan 17 13:59:10 2017 +0100 @@ -1931,9 +1931,9 @@ integral\<^sup>L M f \ integral\<^sup>L M g" by (intro integral_mono_AE) auto -text {*The next two statements are useful to bound Lebesgue integrals, as they avoid one +text \The next two statements are useful to bound Lebesgue integrals, as they avoid one integrability assumption. The price to pay is that the upper function has to be nonnegative, -but this is often true and easy to check in computations.*} +but this is often true and easy to check in computations.\ lemma integral_mono_AE': fixes f::"_ \ real" @@ -2047,20 +2047,20 @@ shows "(emeasure M) {x\space M. u x \ c} \ (1/c) * (\x. u x \M)" proof - have "(\\<^sup>+ x. ennreal(u x) * indicator (space M) x \M) \ (\\<^sup>+ x. u x \M)" - by (rule nn_integral_mono_AE, auto simp add: c>0 less_eq_real_def) + by (rule nn_integral_mono_AE, auto simp add: \c>0\ less_eq_real_def) also have "... = (\x. u x \M)" by (rule nn_integral_eq_integral, auto simp add: assms) finally have *: "(\\<^sup>+ x. ennreal(u x) * indicator (space M) x \M) \ (\x. u x \M)" by simp have "{x \ space M. u x \ c} = {x \ space M. ennreal(1/c) * u x \ 1} \ (space M)" - using c>0 by (auto simp: ennreal_mult'[symmetric]) + using \c>0\ by (auto simp: ennreal_mult'[symmetric]) then have "emeasure M {x \ space M. u x \ c} = emeasure M ({x \ space M. ennreal(1/c) * u x \ 1} \ (space M))" by simp also have "... \ ennreal(1/c) * (\\<^sup>+ x. ennreal(u x) * indicator (space M) x \M)" by (rule nn_integral_Markov_inequality) (auto simp add: assms) also have "... \ ennreal(1/c) * (\x. u x \M)" - apply (rule mult_left_mono) using * c>0 by auto + apply (rule mult_left_mono) using * \c>0\ by auto finally show ?thesis using \0 by (simp add: ennreal_mult'[symmetric]) qed @@ -2121,8 +2121,8 @@ then show ?thesis using Lim_null by auto qed -text {*The next lemma asserts that, if a sequence of functions converges in $L^1$, then -it admits a subsequence that converges almost everywhere.*} +text \The next lemma asserts that, if a sequence of functions converges in $L^1$, then +it admits a subsequence that converges almost everywhere.\ lemma tendsto_L1_AE_subseq: fixes u :: "nat \ 'a \ 'b::{banach, second_countable_topology}" @@ -2146,8 +2146,8 @@ have "subseq r" unfolding r_def using r0(1) by (simp add: subseq_Suc_iff) have I: "(\\<^sup>+x. norm(u (r n) x) \M) < ennreal((1/2)^n)" for n proof - - have "r0 n \ n" using subseq r0 by (simp add: seq_suble) - have "(1/2::real)^(r0 n) \ (1/2)^n" by (rule power_decreasing[OF r0 n \ n], auto) + have "r0 n \ n" using \subseq r0\ by (simp add: seq_suble) + have "(1/2::real)^(r0 n) \ (1/2)^n" by (rule power_decreasing[OF \r0 n \ n\], auto) then have "(\x. norm(u (r0 (Suc n)) x) \M) < (1/2)^n" using r0(2) less_le_trans by auto then have "(\x. norm(u (r n) x) \M) < (1/2)^n" unfolding r_def by auto moreover have "(\\<^sup>+x. norm(u (r n) x) \M) = (\x. norm(u (r n) x) \M)" @@ -2168,13 +2168,13 @@ also have "... \ (\\<^sup>+x. (1/e) * ennreal(norm(u (r n) x)) \M)" apply (rule nn_integral_mono) using * by auto also have "... = (1/e) * (\\<^sup>+x. norm(u (r n) x) \M)" - apply (rule nn_integral_cmult) using e > 0 by auto + apply (rule nn_integral_cmult) using \e > 0\ by auto also have "... < (1/e) * ennreal((1/2)^n)" - using I[of n] e > 0 by (intro ennreal_mult_strict_left_mono) auto + using I[of n] \e > 0\ by (intro ennreal_mult_strict_left_mono) auto finally show ?thesis by simp qed have A_fin: "emeasure M (A n) < \" for n - using e > 0 A_bound[of n] + using \e > 0\ A_bound[of n] by (auto simp add: ennreal_mult less_top[symmetric]) have A_sum: "summable (\n. measure M (A n))" @@ -2219,7 +2219,7 @@ by (simp add: tendsto_norm_zero_iff) } ultimately have "AE x in M. (\n. u (r n) x) \ 0" by auto - then show ?thesis using subseq r by auto + then show ?thesis using \subseq r\ by auto qed subsection \Restricted measure spaces\ diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Analysis/Borel_Space.thy --- a/src/HOL/Analysis/Borel_Space.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Analysis/Borel_Space.thy Tue Jan 17 13:59:10 2017 +0100 @@ -2126,7 +2126,7 @@ shows "(\x. \f x\ powr p) \ borel_measurable M" unfolding powr_def by auto -text {* The next one is a variation around \verb+measurable_restrict_space+.*} +text \The next one is a variation around \verb+measurable_restrict_space+.\ lemma measurable_restrict_space3: assumes "f \ measurable M N" and @@ -2138,7 +2138,7 @@ measurable_restrict_space2[of f, of "restrict_space M A", of B, of N] assms(2) space_restrict_space) qed -text {* The next one is a variation around \verb+measurable_piecewise_restrict+.*} +text \The next one is a variation around \verb+measurable_piecewise_restrict+.\ lemma measurable_piecewise_restrict2: assumes [measurable]: "\n. A n \ sets M" @@ -2162,8 +2162,8 @@ fix x assume "x \ space M" then obtain n where "x \ A n" using assms(2) by blast obtain h where [measurable]: "h \ measurable M N" and "\x \ A n. f x = h x" using assms(3) by blast - then have "f x = h x" using x \ A n by blast - moreover have "h x \ space N" by (metis measurable_space x \ space M h \ measurable M N) + then have "f x = h x" using \x \ A n\ by blast + moreover have "h x \ space N" by (metis measurable_space \x \ space M\ \h \ measurable M N\) ultimately show "f x \ space N" by simp qed diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Analysis/Brouwer_Fixpoint.thy --- a/src/HOL/Analysis/Brouwer_Fixpoint.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Analysis/Brouwer_Fixpoint.thy Tue Jan 17 13:59:10 2017 +0100 @@ -2572,7 +2572,7 @@ moreover have False if "1 < dd (x - a)" using x that dd2 [of "x - a" 1] \x \ a\ closure_affine_hull by (auto simp: rel_frontier_def) - ultimately have "dd (x - a) = 1" --\similar to another proof above\ + ultimately have "dd (x - a) = 1" \\similar to another proof above\ by fastforce with that show ?thesis by (simp add: rel_frontier_def) diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Analysis/Function_Topology.thy --- a/src/HOL/Analysis/Function_Topology.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Analysis/Function_Topology.thy Tue Jan 17 13:59:10 2017 +0100 @@ -7,9 +7,9 @@ begin -section {*Product topology*} +section \Product topology\ -text {*We want to define the product topology. +text \We want to define the product topology. The product topology on a product of topological spaces is generated by the sets which are products of open sets along finitely many coordinates, and the whole @@ -60,18 +60,18 @@ topology, even when the product is not finite (or even countable). I realized afterwards that this theory has a lot in common with \verb+Fin_Map.thy+. -*} +\ -subsection {*Topology without type classes*} +subsection \Topology without type classes\ -subsubsection {*The topology generated by some (open) subsets*} +subsubsection \The topology generated by some (open) subsets\ -text {* In the definition below of a generated topology, the \Empty\ case is not necessary, +text \In the definition below of a generated topology, the \Empty\ case is not necessary, as it follows from \UN\ taking for $K$ the empty set. However, it is convenient to have, and is never a problem in proofs, so I prefer to write it down explicitly. We do not require UNIV to be an open set, as this will not be the case in applications. (We are -thinking of a topology on a subset of UNIV, the remaining part of UNIV being irrelevant.)*} +thinking of a topology on a subset of UNIV, the remaining part of UNIV being irrelevant.)\ inductive generate_topology_on for S where Empty: "generate_topology_on S {}" @@ -83,8 +83,8 @@ "istopology (generate_topology_on S)" unfolding istopology_def by (auto intro: generate_topology_on.intros) -text {*The basic property of the topology generated by a set $S$ is that it is the -smallest topology containing all the elements of $S$:*} +text \The basic property of the topology generated by a set $S$ is that it is the +smallest topology containing all the elements of $S$:\ lemma generate_topology_on_coarsest: assumes "istopology T" @@ -127,10 +127,10 @@ "s \ S \ openin (topology_generated_by S) s" by (simp only: openin_topology_generated_by_iff, auto simp: generate_topology_on.Basis) -subsubsection {*Continuity*} +subsubsection \Continuity\ -text {*We will need to deal with continuous maps in terms of topologies and not in terms -of type classes, as defined below.*} +text \We will need to deal with continuous maps in terms of topologies and not in terms +of type classes, as defined below.\ definition continuous_on_topo::"'a topology \ 'b topology \ ('a \ 'b) \ bool" where "continuous_on_topo T1 T2 f = ((\ U. openin T2 U \ openin T1 (f-U \ topspace(T1))) @@ -206,15 +206,15 @@ using assms unfolding continuous_on_topo_def by auto -subsubsection {*Pullback topology*} +subsubsection \Pullback topology\ -text {*Pulling back a topology by map gives again a topology. \subtopology\ is +text \Pulling back a topology by map gives again a topology. \subtopology\ is a special case of this notion, pulling back by the identity. We introduce the general notion as we will need it to define the strong operator topology on the space of continuous linear operators, -by pulling back the product topology on the space of all functions.*} +by pulling back the product topology on the space of all functions.\ -text {*\verb+pullback_topology A f T+ is the pullback of the topology $T$ by the map $f$ on -the set $A$.*} +text \\verb+pullback_topology A f T+ is the pullback of the topology $T$ by the map $f$ on +the set $A$.\ definition pullback_topology::"('a set) \ ('a \ 'b) \ ('b topology) \ ('a topology)" where "pullback_topology A f T = topology (\S. \U. openin T U \ S = f-U \ A)" @@ -253,7 +253,7 @@ also have "... = f-(g-U \ topspace T1) \ A " by auto also have "openin (pullback_topology A f T1) (...)" - unfolding openin_pullback_topology using openin T1 (g-\U \ topspace T1) by auto + unfolding openin_pullback_topology using \openin T1 (g-U \ topspace T1)\ by auto finally show "openin (pullback_topology A f T1) ((g \ f) - U \ topspace (pullback_topology A f T1))" by auto next @@ -281,23 +281,23 @@ also have "... = (f o g)-V \ topspace T1" using assms(2) by auto also have "openin T1 (...)" - using assms(1) openin T2 V by auto + using assms(1) \openin T2 V\ by auto finally show "openin T1 (g - U \ topspace T1)" by simp next fix x assume "x \ topspace T1" have "(f o g) x \ topspace T2" - using assms(1) x \ topspace T1 unfolding continuous_on_topo_def by auto + using assms(1) \x \ topspace T1\ unfolding continuous_on_topo_def by auto then have "g x \ f-(topspace T2)" unfolding comp_def by blast - moreover have "g x \ A" using assms(2) x \ topspace T1 by blast + moreover have "g x \ A" using assms(2) \x \ topspace T1\ by blast ultimately show "g x \ topspace (pullback_topology A f T2)" unfolding topspace_pullback_topology by blast qed -subsection {*The product topology*} +subsection \The product topology\ -text {*We can now define the product topology, as generated by +text \We can now define the product topology, as generated by the sets which are products of open sets along finitely many coordinates, and the whole space along the other coordinates. Equivalently, it is generated by sets which are one open set along one single coordinate, and the whole space along other coordinates. In fact, this is only @@ -306,14 +306,14 @@ point, equal to \verb+undefined+ along all coordinates. So, we use the first formulation, which moreover seems to give rise to more straightforward proofs. -*} +\ definition product_topology::"('i \ ('a topology)) \ ('i set) \ (('i \ 'a) topology)" where "product_topology T I = topology_generated_by {(\\<^sub>E i\I. X i) |X. (\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)}}" -text {*The total set of the product topology is the product of the total sets -along each coordinate.*} +text \The total set of the product topology is the product of the total sets +along each coordinate.\ lemma product_topology_topspace: "topspace (product_topology T I) = (\\<^sub>E i\I. topspace(T i))" @@ -367,15 +367,15 @@ then obtain X where "x \ Pi\<^sub>E I X \ (\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)} \ Pi\<^sub>E I X \ k" by blast then have "x \ Pi\<^sub>E I X \ (\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)} \ Pi\<^sub>E I X \ (\K)" - using k \ K by auto + using \k \ K\ by auto then show ?case by auto qed auto - then show ?thesis using x \ U by auto + then show ?thesis using \x \ U\ by auto qed -text {*The basic property of the product topology is the continuity of projections:*} +text \The basic property of the product topology is the continuity of projections:\ lemma continuous_on_topo_product_coordinates [simp]: assumes "i \ I" @@ -385,10 +385,10 @@ fix U assume "openin (T i) U" define X where "X = (\j. if j = i then U else topspace (T j))" then have *: "(\x. x i) - U \ (\\<^sub>E i\I. topspace (T i)) = (\\<^sub>E j\I. X j)" - unfolding X_def using assms openin_subset[OF openin (T i) U] + unfolding X_def using assms openin_subset[OF \openin (T i) U\] by (auto simp add: PiE_iff, auto, metis subsetCE) have **: "(\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)}" - unfolding X_def using openin (T i) U by auto + unfolding X_def using \openin (T i) U\ by auto have "openin (product_topology T I) ((\x. x i) - U \ (\\<^sub>E i\I. topspace (T i)))" unfolding product_topology_def apply (rule topology_generated_by_Basis) @@ -417,11 +417,11 @@ have "f-U \ topspace T1 = (\i\I. (\x. f x i)-(X i) \ topspace T1) \ (topspace T1)" by (subst H(1), auto simp add: PiE_iff assms) also have "... = (\i\J. (\x. f x i)-(X i) \ topspace T1) \ (topspace T1)" - using * J \ I by auto + using * \J \ I\ by auto also have "openin T1 (...)" apply (rule openin_INT) - apply (simp add: finite J) - using H(2) assms(1) J \ I by auto + apply (simp add: \finite J\) + using H(2) assms(1) \J \ I\ by auto ultimately show "openin T1 (f-U \ topspace T1)" by simp next show "f topspace T1 \ \{Pi\<^sub>E I X |X. (\i. openin (T i) (X i)) \ finite {i. X i \ topspace (T i)}}" @@ -441,17 +441,17 @@ have "(\x. f x i) = (\y. y i) o f" by auto also have "continuous_on_topo T1 (T i) (...)" apply (rule continuous_on_topo_compose[of _ "product_topology T I"]) - using assms i \ I by auto + using assms \i \ I\ by auto ultimately show "continuous_on_topo T1 (T i) (\x. f x i)" by simp next fix i x assume "i \ I" "x \ topspace T1" have "f x \ topspace (product_topology T I)" - using assms x \ topspace T1 unfolding continuous_on_topo_def by auto + using assms \x \ topspace T1\ unfolding continuous_on_topo_def by auto then have "f x \ (\\<^sub>E i\I. topspace (T i))" using product_topology_topspace by metis then show "f x i = undefined" - using i \ I by (auto simp add: PiE_iff extensional_def) + using \i \ I\ by (auto simp add: PiE_iff extensional_def) qed lemma continuous_on_restrict: @@ -461,7 +461,7 @@ fix i assume "i \ J" then have "(\x. restrict x J i) = (\x. x i)" unfolding restrict_def by auto then show "continuous_on_topo (product_topology T I) (T i) (\x. restrict x J i)" - using i \ J J \ I by auto + using \i \ J\ \J \ I\ by auto next fix i assume "i \ J" then show "restrict x J i = undefined" for x::"'a \ 'b" @@ -469,7 +469,7 @@ qed -subsubsection {*Powers of a single topological space as a topological space, using type classes*} +subsubsection \Powers of a single topological space as a topological space, using type classes\ instantiation "fun" :: (type, topological_space) topological_space begin @@ -521,8 +521,8 @@ ultimately show ?thesis by simp qed -text {*The results proved in the general situation of products of possibly different -spaces have their counterparts in this simpler setting.*} +text \The results proved in the general situation of products of possibly different +spaces have their counterparts in this simpler setting.\ lemma continuous_on_product_coordinates [simp]: "continuous_on UNIV (\x. x i::('b::topological_space))" @@ -545,11 +545,11 @@ "continuous_on UNIV f \ (\i. continuous_on UNIV (\x. f x i))" by (auto intro: continuous_on_product_then_coordinatewise) -subsubsection {*Topological countability for product spaces*} +subsubsection \Topological countability for product spaces\ -text {*The next two lemmas are useful to prove first or second countability +text \The next two lemmas are useful to prove first or second countability of product spaces, but they have more to do with countability and could -be put in the corresponding theory.*} +be put in the corresponding theory.\ lemma countable_nat_product_event_const: fixes F::"'a set" and a::'a @@ -563,7 +563,7 @@ proof (induction N) case 0 have "{x. (\i. x i \ F) \ (\i$$0::nat). x i = a)} = {(\i. a)}" - using a \ F by auto + using \a \ F\ by auto then show ?case by auto next case (Suc N) @@ -576,7 +576,7 @@ have "f (y, x N) = x" unfolding f_def y_def by auto moreover have "(y, x N) \ {x. (\i. x i \ F) \ (\i\N. x i = a)} \ F" - unfolding y_def using H a \ F by auto + unfolding y_def using H \a \ F\ by auto ultimately show "x \ f({x. (\i. x i \ F) \ (\i\N. x i = a)} \ F)" by (metis (no_types, lifting) image_eqI) qed @@ -616,7 +616,7 @@ by auto qed then show ?thesis - using countable_nat_product_event_const[OF b \ G countable G] + using countable_nat_product_event_const[OF \b \ G\ \countable G\] by (meson countable_image countable_subset) qed @@ -629,7 +629,7 @@ "\x i. open (A x i)" "\x S. open S \ x \ S \ (\i. A x i \ S)" by metis - text {*B i is a countable basis of neighborhoods of x_i.*} + text \B i is a countable basis of neighborhoods of x_i.\ define B where "B = (\i. (A (x i))UNIV \ {UNIV})" have "countable (B i)" for i unfolding B_def by auto @@ -638,7 +638,7 @@ unfolding K_def B_def by auto then have "K \ {}" by auto have "countable {X. (\i. X i \ B i) \ finite {i. X i \ UNIV}}" - apply (rule countable_product_event_const) using \i. countable (B i) by auto + apply (rule countable_product_event_const) using \\i. countable (B i)\ by auto moreover have "K = (\X. Pi\<^sub>E UNIV X){X. (\i. X i \ B i) \ finite {i. X i \ UNIV}}" unfolding K_def by auto ultimately have "countable K" by auto @@ -652,7 +652,7 @@ have Inc: "\k\K. k \ U" if "open U \ x \ U" for U proof - have "openin (product_topology (\i. euclidean) UNIV) U" "x \ U" - using open U \ x \ U unfolding open_fun_def by auto + using \open U \ x \ U\ unfolding open_fun_def by auto with product_topology_open_contains_basis[OF this] have "\X. x \ (\\<^sub>E i\UNIV. X i) \ (\i. open (X i)) \ finite {i. X i \ UNIV} \ (\\<^sub>E i\UNIV. X i) \ U" unfolding topspace_euclidean open_openin by simp @@ -685,12 +685,12 @@ apply (cases "i \ I") using ** apply simp unfolding Y_def I_def by auto then have "Pi\<^sub>E UNIV Y \ Pi\<^sub>E UNIV X" by auto then have "Pi\<^sub>E UNIV Y \ U" using H(4) by auto - then show ?thesis using Pi\<^sub>E UNIV Y \ K by auto + then show ?thesis using \Pi\<^sub>E UNIV Y \ K\ by auto qed show "\L. (\(i::nat). x \ L i \ open (L i)) \ (\U. open U \ x \ U \ (\i. L i \ U))" apply (rule first_countableI[of K]) - using countable K \k. k \ K \ x \ k \k. k \ K \ open k Inc by auto + using \countable K\ \\k. k \ K \ x \ k\ \\k. k \ K \ open k\ Inc by auto qed lemma product_topology_countable_basis: @@ -709,10 +709,10 @@ define K where "K = {Pi\<^sub>E UNIV X | X. (\i::'a. X i \ B2) \ finite {i. X i \ UNIV}}" have i: "\k\K. \X. (k = Pi\<^sub>E UNIV X) \ (\i. open (X i)) \ finite {i. X i \ UNIV}" - unfolding K_def using \U. U \ B2 \ open U by auto + unfolding K_def using \\U. U \ B2 \ open U\ by auto have "countable {X. (\(i::'a). X i \ B2) \ finite {i. X i \ UNIV}}" - apply (rule countable_product_event_const) using countable B2 by auto + apply (rule countable_product_event_const) using \countable B2\ by auto moreover have "K = (\X. Pi\<^sub>E UNIV X){X. (\i. X i \ B2) \ finite {i. X i \ UNIV}}" unfolding K_def by auto ultimately have ii: "countable K" by auto @@ -722,7 +722,7 @@ fix U and x::"'a\'b" assume "open U" "x \ U" then have "openin (product_topology (\i. euclidean) UNIV) U" unfolding open_fun_def by auto - with product_topology_open_contains_basis[OF this x \ U] + with product_topology_open_contains_basis[OF this \x \ U\] have "\X. x \ (\\<^sub>E i\UNIV. X i) \ (\i. open (X i)) \ finite {i. X i \ UNIV} \ (\\<^sub>E i\UNIV. X i) \ U" unfolding topspace_euclidean open_openin by simp then obtain X where H: "x \ (\\<^sub>E i\UNIV. X i)" @@ -734,7 +734,7 @@ define I where "I = {i. X i \ UNIV}" define Y where "Y = (\i. if i \ I then (SOME y. y \ B2 \ y \ X i \ x i \ y) else UNIV)" have *: "\y. y \ B2 \ y \ X i \ x i \ y" for i - unfolding B2_def using B open (X i) x i \ X i by (meson UnCI topological_basisE) + unfolding B2_def using B \open (X i)\ \x i \ X i\ by (meson UnCI topological_basisE) have **: "Y i \ B2 \ Y i \ X i \ x i \ Y i" for i using someI_ex[OF *] apply (cases "i \ I") @@ -758,13 +758,13 @@ using ** by auto show "\V\K. x \ V \ V \ U" - using Pi\<^sub>E UNIV Y \ K Pi\<^sub>E UNIV Y \ U x \ Pi\<^sub>E UNIV Y by auto + using \Pi\<^sub>E UNIV Y \ K\ \Pi\<^sub>E UNIV Y \ U\ \x \ Pi\<^sub>E UNIV Y\ by auto next fix U assume "U \ K" show "open U" - using U \ K unfolding open_fun_def K_def apply (auto) + using \U \ K\ unfolding open_fun_def K_def apply (auto) apply (rule product_topology_basis) - using \V. V \ B2 \ open V open_UNIV unfolding topspace_euclidean open_openin[symmetric] + using \\V. V \ B2 \ open V\ open_UNIV unfolding topspace_euclidean open_openin[symmetric] by auto qed @@ -776,9 +776,9 @@ using product_topology_countable_basis topological_basis_imp_subbasis by auto -subsection {*The strong operator topology on continuous linear operators*} +subsection \The strong operator topology on continuous linear operators\ -text {*Let 'a and 'b be two normed real vector spaces. Then the space of linear continuous +text \Let 'a and 'b be two normed real vector spaces. Then the space of linear continuous operators from 'a to 'b has a canonical norm, and therefore a canonical corresponding topology (the type classes instantiation are given in \verb+Bounded_Linear_Function.thy+). @@ -795,7 +795,7 @@ weak-* topology, i.e., the pullback of the weak topology on the bidual of the space under the canonical embedding of a space into its bidual. We do not define it there, although it could also be defined analogously. -*} +\ definition strong_operator_topology::"('a::real_normed_vector \\<^sub>L'b::real_normed_vector) topology" where "strong_operator_topology = pullback_topology UNIV blinfun_apply euclidean" @@ -847,7 +847,7 @@ show "continuous_on_topo T strong_operator_topology f" unfolding strong_operator_topology_def apply (rule continuous_on_topo_pullback') - by (auto simp add: continuous_on_topo T euclidean (blinfun_apply o f)) + by (auto simp add: \continuous_on_topo T euclidean (blinfun_apply o f)$$ qed lemma strong_operator_topology_weaker_than_euclidean: @@ -856,10 +856,10 @@ auto simp add: continuous_on_topo_UNIV[symmetric] linear_continuous_on) -subsection {*Metrics on product spaces*} +subsection \Metrics on product spaces\ -text {*In general, the product topology is not metrizable, unless the index set is countable. +text \In general, the product topology is not metrizable, unless the index set is countable. When the index set is countable, essentially any (convergent) combination of the metrics on the factors will do. We use below the simplest one, based on $L^1$, but $L^2$ would also work, for instance. @@ -870,7 +870,7 @@ The proofs below would work verbatim for general countable products of metric spaces. However, since distances are only implemented in terms of type classes, we only develop the theory -for countable products of the same space.*} +for countable products of the same space.\ instantiation "fun" :: (countable, metric_space) metric_space begin @@ -881,10 +881,10 @@ definition uniformity_fun_def: "(uniformity::(('a \ 'b) \ ('a \ 'b)) filter) = (INF e:{0<..}. principal {(x, y). dist (x::('a\'b)) y < e})" -text {*Except for the first one, the auxiliary lemmas below are only useful when proving the +text \Except for the first one, the auxiliary lemmas below are only useful when proving the instance: once it is proved, they become trivial consequences of the general theory of metric spaces. It would thus be desirable to hide them once the instance is proved, but I do not know how -to do this.*} +to do this.\ lemma dist_fun_le_dist_first_terms: "dist x y \ 2 * Max {dist (x (from_nat n)) (y (from_nat n))|n. n \ N} + (1/2)^N" @@ -947,18 +947,18 @@ "\i. openin euclidean (X i)" "finite {i. X i \ topspace euclidean}" "x \ Pi\<^sub>E UNIV X" - using product_topology_open_contains_basis[OF * x \ U] by auto + using product_topology_open_contains_basis[OF * \x \ U\] by auto define I where "I = {i. X i \ topspace euclidean}" have "finite I" unfolding I_def using H(3) by auto { fix i - have "x i \ X i" using x \ U H by auto + have "x i \ X i" using \x \ U\ H by auto then have "\e. e>0 \ ball (x i) e \ X i" - using openin euclidean (X i) open_openin open_contains_ball by blast + using \openin euclidean (X i)\ open_openin open_contains_ball by blast then obtain e where "e>0" "ball (x i) e \ X i" by blast define f where "f = min e (1/2)" - have "f>0" "f<1" unfolding f_def using e>0 by auto - moreover have "ball (x i) f \ X i" unfolding f_def using ball (x i) e \ X i by auto + have "f>0" "f<1" unfolding f_def using \e>0\ by auto + moreover have "ball (x i) f \ X i" unfolding f_def using \ball (x i) e \ X i\ by auto ultimately have "\f. f > 0 \ f < 1 \ ball (x i) f \ X i" by auto } note * = this have "\e. \i. e i > 0 \ e i < 1 \ ball (x i) (e i) \ X i" @@ -967,7 +967,7 @@ by blast define m where "m = Min {(1/2)^(to_nat i) * e i|i. i \ I}" have "m > 0" if "I\{}" - unfolding m_def apply (rule Min_grI) using finite I I \ {} \i. e i > 0 by auto + unfolding m_def apply (rule Min_grI) using \finite I\ \I \ {}\ \\i. e i > 0\ by auto moreover have "{y. dist x y < m} \ U" proof (auto) fix y assume "dist x y < m" @@ -977,19 +977,19 @@ by (rule summable_comparison_test'[of "\n. (1/2)^n"], auto simp add: summable_geometric_iff) define n where "n = to_nat i" have "(1/2)^n * min (dist (x (from_nat n)) (y (from_nat n))) 1 < m" - using dist x y < m unfolding dist_fun_def using sum_le_suminf[OF *, of "{n}"] by auto + using \dist x y < m\ unfolding dist_fun_def using sum_le_suminf[OF *, of "{n}"] by auto then have "(1/2)^(to_nat i) * min (dist (x i) (y i)) 1 < m" - using n = to_nat i by auto + using \n = to_nat i\ by auto also have "... \ (1/2)^(to_nat i) * e i" - unfolding m_def apply (rule Min_le) using finite I i \ I by auto + unfolding m_def apply (rule Min_le) using \finite I\ \i \ I\ by auto ultimately have "min (dist (x i) (y i)) 1 < e i" by (auto simp add: divide_simps) then have "dist (x i) (y i) < e i" - using e i < 1 by auto - then show "y i \ X i" using ball (x i) (e i) \ X i by auto + using \e i < 1\ by auto + then show "y i \ X i" using \ball (x i) (e i) \ X i\ by auto qed then have "y \ Pi\<^sub>E UNIV X" using H(1) unfolding I_def topspace_euclidean by (auto simp add: PiE_iff) - then show "y \ U" using Pi\<^sub>E UNIV X \ U by auto + then show "y \ U" using \Pi\<^sub>E UNIV X \ U\ by auto qed ultimately have *: "\m>0. {y. dist x y < m} \ U" if "I \ {}" using that by auto @@ -1021,14 +1021,14 @@ define U where "U = Pi\<^sub>E UNIV X" have "open U" unfolding open_fun_def product_topology_def apply (rule topology_generated_by_Basis) - unfolding U_def using \i. openin euclidean (X i) finite {i. X i \ topspace euclidean} + unfolding U_def using \\i. openin euclidean (X i)\ \finite {i. X i \ topspace euclidean}\ by auto moreover have "x \ U" unfolding U_def X_def by (auto simp add: PiE_iff) moreover have "dist x y < e" if "y \ U" for y proof - have *: "dist (x (from_nat n)) (y (from_nat n)) \ f" if "n \ N" for n - using y \ U unfolding U_def apply (auto simp add: PiE_iff) + using \y \ U\ unfolding U_def apply (auto simp add: PiE_iff) unfolding X_def using that by (metis less_imp_le mem_Collect_eq) have **: "Max {dist (x (from_nat n)) (y (from_nat n))|n. n \ N} \ f" apply (rule Max.boundedI) using * by auto @@ -1036,7 +1036,7 @@ have "dist x y \ 2 * Max {dist (x (from_nat n)) (y (from_nat n))|n. n \ N} + (1/2)^N" by (rule dist_fun_le_dist_first_terms) also have "... \ 2 * f + e / 8" - apply (rule add_mono) using ** 2^N > 8/e by(auto simp add: algebra_simps divide_simps) + apply (rule add_mono) using ** \2^N > 8/e\ by(auto simp add: algebra_simps divide_simps) also have "... \ e/2 + e/8" unfolding f_def by auto also have "... < e" @@ -1053,7 +1053,7 @@ assume "open U" fix x assume "x \ U" then show "\e>0. \y. dist x y < e \ y \ U" - using open_fun_contains_ball_aux[OF open U x \ U] by auto + using open_fun_contains_ball_aux[OF \open U\ \x \ U\] by auto next assume H: "\x\U. \e>0. \y. dist x y < e \ y \ U" define K where "K = {V. open V \ V \ U}" @@ -1061,10 +1061,10 @@ fix x assume "x \ U" then obtain e where e: "e>0" "{y. dist x y < e} \ U" using H by blast then obtain V where V: "open V" "x \ V" "V \ {y. dist x y < e}" - using ball_fun_contains_open_aux[OF e>0, of x] by auto + using ball_fun_contains_open_aux[OF \e>0\, of x] by auto have "V \ K" unfolding K_def using e(2) V(1) V(3) by auto - then have "x \ (\K)" using x \ V by auto + then have "x \ (\K)" using \x \ V\ by auto } then have "(\K) = U" unfolding K_def by auto @@ -1077,13 +1077,13 @@ fix x y::"'a \ 'b" show "(dist x y = 0) = (x = y)" proof assume "x = y" - then show "dist x y = 0" unfolding dist_fun_def using x = y by auto + then show "dist x y = 0" unfolding dist_fun_def using \x = y\ by auto next assume "dist x y = 0" have *: "summable (\n. (1/2)^n * min (dist (x (from_nat n)) (y (from_nat n))) 1)" by (rule summable_comparison_test'[of "\n. (1/2)^n"], auto simp add: summable_geometric_iff) have "(1/2)^n * min (dist (x (from_nat n)) (y (from_nat n))) 1 = 0" for n - using dist x y = 0 unfolding dist_fun_def by (simp add: "*" suminf_eq_zero_iff) + using \dist x y = 0\ unfolding dist_fun_def by (simp add: "*" suminf_eq_zero_iff) then have "dist (x (from_nat n)) (y (from_nat n)) = 0" for n by (metis div_0 min_def nonzero_mult_div_cancel_left power_eq_0_iff zero_eq_1_divide_iff zero_neq_numeral) @@ -1095,9 +1095,9 @@ by auto qed next - text{*The proof of the triangular inequality is trivial, modulo the fact that we are dealing + text\The proof of the triangular inequality is trivial, modulo the fact that we are dealing with infinite series, hence we should justify the convergence at each step. In this - respect, the following simplification rule is extremely handy.*} + respect, the following simplification rule is extremely handy.\ have [simp]: "summable (\n. (1/2)^n * min (dist (u (from_nat n)) (v (from_nat n))) 1)" for u v::"'a \ 'b" by (rule summable_comparison_test'[of "\n. (1/2)^n"], auto simp add: summable_geometric_iff) fix x y z::"'a \ 'b" @@ -1134,11 +1134,11 @@ finally show "dist x y \ dist x z + dist y z" by simp next - text{*Finally, we show that the topology generated by the distance and the product + text\Finally, we show that the topology generated by the distance and the product topology coincide. This is essentially contained in Lemma \verb+fun_open_ball_aux+, except that the condition to prove is expressed with filters. To deal with this, we copy some mumbo jumbo from Lemma \verb+eventually_uniformity_metric+ in - \verb+Real_Vector_Spaces.thy+*} + \verb+Real_Vector_Spaces.thy+\ fix U::"('a \ 'b) set" have "eventually P uniformity \ (\e>0. \x (y::('a \ 'b)). dist x y < e \ P (x, y))" for P unfolding uniformity_fun_def apply (subst eventually_INF_base) @@ -1149,9 +1149,9 @@ end -text {*Nice properties of spaces are preserved under countable products. In addition +text \Nice properties of spaces are preserved under countable products. In addition to first countability, second countability and metrizability, as we have seen above, -completeness is also preserved, and therefore being Polish.*} +completeness is also preserved, and therefore being Polish.\ instance "fun" :: (countable, complete_space) complete_space proof @@ -1161,9 +1161,9 @@ fix e assume "e>(0::real)" obtain k where "i = from_nat k" using from_nat_to_nat[of i] by metis - have "(1/2)^k * min e 1 > 0" using e>0 by auto + have "(1/2)^k * min e 1 > 0" using \e>0\ by auto then have "\N. \m n. N \ m \ N \ n \ dist (u m) (u n) < (1/2)^k * min e 1" - using Cauchy u unfolding cauchy_def by blast + using \Cauchy u\ unfolding cauchy_def by blast then obtain N::nat where C: "\m n. N \ m \ N \ n \ dist (u m) (u n) < (1/2)^k * min e 1" by blast have "\m n. N \ m \ N \ n \ dist (u m i) (u n i) < e" @@ -1171,14 +1171,14 @@ fix m n::nat assume "m \ N" "n \ N" have "(1/2)^k * min (dist (u m i) (u n i)) 1 = sum (\p. (1/2)^p * min (dist (u m (from_nat p)) (u n (from_nat p))) 1) {k}" - using i = from_nat k by auto + using \i = from_nat k\ by auto also have "... \ (\p. (1/2)^p * min (dist (u m (from_nat p)) (u n (from_nat p))) 1)" apply (rule sum_le_suminf) by (rule summable_comparison_test'[of "\n. (1/2)^n"], auto simp add: summable_geometric_iff) also have "... = dist (u m) (u n)" unfolding dist_fun_def by auto also have "... < (1/2)^k * min e 1" - using C m \ N n \ N by auto + using C \m \ N\ \n \ N\ by auto finally have "min (dist (u m i) (u n i)) 1 < min e 1" by (auto simp add: algebra_simps divide_simps) then show "dist (u m i) (u n i) < e" by auto @@ -1210,8 +1210,8 @@ have *: "dist (u k (from_nat n)) (x (from_nat n)) \ e / 4" if "n \ N" for n proof - have "K (from_nat n) \ L" - unfolding L_def apply (rule Max_ge) using n \ N by auto - then have "k \ K (from_nat n)" using k \ L by auto + unfolding L_def apply (rule Max_ge) using \n \ N\ by auto + then have "k \ K (from_nat n)" using \k \ L\ by auto then show ?thesis using K less_imp_le by auto qed have **: "Max {dist (u k (from_nat n)) (x (from_nat n)) |n. n \ N} \ e/4" @@ -1220,7 +1220,7 @@ using dist_fun_le_dist_first_terms by auto also have "... \ 2 * e/4 + e/4" apply (rule add_mono) - using ** 2^N > 4/e less_imp_le by (auto simp add: algebra_simps divide_simps) + using ** \2^N > 4/e\ less_imp_le by (auto simp add: algebra_simps divide_simps) also have "... < e" by auto finally show ?thesis by simp qed @@ -1233,9 +1233,9 @@ by standard -subsection {*Measurability*} +subsection \Measurability\ -text {*There are two natural sigma-algebras on a product space: the borel sigma algebra, +text \There are two natural sigma-algebras on a product space: the borel sigma algebra, generated by open sets in the product, and the product sigma algebra, countably generated by products of measurable sets along finitely many coordinates. The second one is defined and studied in \verb+Finite_Product_Measure.thy+. @@ -1249,7 +1249,7 @@ In this paragraph, we develop basic measurability properties for the borel sigma algebra, and compare it with the product sigma algebra as explained above. -*} +\ lemma measurable_product_coordinates [measurable (raw)]: "(\x. x i) \ measurable borel borel" @@ -1265,9 +1265,9 @@ then show ?thesis by simp qed -text {*To compare the Borel sigma algebra with the product sigma algebra, we give a presentation +text \To compare the Borel sigma algebra with the product sigma algebra, we give a presentation of the product sigma algebra that is more similar to the one we used above for the product -topology.*} +topology.\ lemma sets_PiM_finite: "sets (Pi\<^sub>M I M) = sigma_sets (\\<^sub>E i\I. space (M i)) @@ -1281,7 +1281,7 @@ have "finite J" "J \ I" unfolding J_def using H by auto define Y where "Y = (\\<^sub>E j\J. X j)" have "prod_emb I M J Y \ sets (Pi\<^sub>M I M)" - unfolding Y_def apply (rule sets_PiM_I) using finite J J \ I * by auto + unfolding Y_def apply (rule sets_PiM_I) using \finite J\ \J \ I\ * by auto moreover have "prod_emb I M J Y = (\\<^sub>E i\I. X i)" unfolding prod_emb_def Y_def J_def using H sets.sets_into_space[OF *] by (auto simp add: PiE_iff, blast) @@ -1297,10 +1297,10 @@ proof - define X where "X = (\j. if j = i then A else space (M j))" have "{f. (\i\I. f i \ space (M i)) \ f \ extensional I \ f i \ A} = Pi\<^sub>E I X" - unfolding X_def using sets.sets_into_space[OF A \ sets (M i)] i \ I + unfolding X_def using sets.sets_into_space[OF \A \ sets (M i)\] \i \ I\ by (auto simp add: PiE_iff extensional_def, metis subsetCE, metis) moreover have "X j \ sets (M j)" for j - unfolding X_def using A \ sets (M i) by auto + unfolding X_def using \A \ sets (M i)\ by auto moreover have "finite {j. X j \ space (M j)}" unfolding X_def by simp ultimately show ?thesis by auto @@ -1322,7 +1322,7 @@ have "Pi\<^sub>E UNIV X = (\i\I. (\x. x i)-(X i) \ space borel) \ space borel" unfolding I_def by auto also have "... \ sets borel" - using that finite I by measurable + using that \finite I\ by measurable finally show ?thesis by simp qed then have "{(\\<^sub>E i\UNIV. X i) |X::('a \ 'b set). (\i. X i \ sets borel) \ finite {i. X i \ space borel}} \ sets borel" @@ -1340,17 +1340,17 @@ have *: "k \ sets (Pi\<^sub>M UNIV (\_. borel))" if "k \ K" for k proof - obtain X where H: "k = Pi\<^sub>E UNIV X" "\i. open (X i)" "finite {i. X i \ UNIV}" - using K(3)[OF k \ K] by blast + using K(3)[OF \k \ K\] by blast show ?thesis unfolding H(1) sets_PiM_finite space_borel using borel_open[OF H(2)] H(3) by auto qed have **: "U \ sets (Pi\<^sub>M UNIV (\_. borel))" if "open U" for U::"('a \ 'b) set" proof - obtain B where "B \ K" "U = (\B)" - using open U topological_basis K by (metis topological_basis_def) - have "countable B" using B \ K countable K countable_subset by blast + using \open U\ \topological_basis K\ by (metis topological_basis_def) + have "countable B" using \B \ K\ \countable K\ countable_subset by blast moreover have "k \ sets (Pi\<^sub>M UNIV (\_. borel))" if "k \ B" for k - using B \ K * that by auto - ultimately show ?thesis unfolding U = (\B) by auto + using \B \ K\ * that by auto + ultimately show ?thesis unfolding \U = (\B)\ by auto qed have "sigma_sets UNIV (Collect open) \ sets (Pi\<^sub>M UNIV (\i::'a. (borel::('b measure))))" apply (rule sets.sigma_sets_subset') using ** by auto diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Analysis/Further_Topology.thy --- a/src/HOL/Analysis/Further_Topology.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Analysis/Further_Topology.thy Tue Jan 17 13:59:10 2017 +0100 @@ -4350,7 +4350,7 @@ qed qed -text\The proof is a duplicate of that of @{text Borsukian_open_Un}.\ +text\The proof is a duplicate of that of \Borsukian_open_Un\.\ lemma Borsukian_closed_Un: fixes S :: "'a::real_normed_vector set" assumes cloS: "closedin (subtopology euclidean (S \ T)) S" diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Analysis/Henstock_Kurzweil_Integration.thy --- a/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Tue Jan 17 13:59:10 2017 +0100 @@ -109,7 +109,7 @@ fixes a :: "'a::euclidean_space" assumes "k \ Basis" shows "content (cbox a b) = content(cbox a b \ {x. x\k \ c}) + content(cbox a b \ {x. x\k \ c})" - -- \Prove using measure theory\ + \ \Prove using measure theory\ proof cases note simps = interval_split[OF assms] content_cbox_cases have *: "Basis = insert k (Basis - {k})" "\x. finite (Basis-{x})" "\x. x\Basis-{x}" diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Analysis/Measure_Space.thy --- a/src/HOL/Analysis/Measure_Space.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Analysis/Measure_Space.thy Tue Jan 17 13:59:10 2017 +0100 @@ -1092,9 +1092,9 @@ qed qed -text {*The next lemma is convenient to combine with a lemma whose conclusion is of the +text \The next lemma is convenient to combine with a lemma whose conclusion is of the form \AE x in M. P x = Q x\: for such a lemma, there is no \verb+[symmetric]+ variant, -but using \AE_symmetric[OF...]\ will replace it.*} +but using \AE_symmetric[OF...]\ will replace it.\ (* depricated replace by laws about eventually *) lemma @@ -1361,19 +1361,19 @@ where A: "range A \ sets M" "(\i. A i) = space M" "\i. emeasure M (A i) \ \" "incseq A" using sigma_finite_incseq by blast define B where "B = (\i. W \ A i)" - have B_meas: "\i. B i \ sets M" using W_meas range A \ sets M B_def by blast + have B_meas: "\i. B i \ sets M" using W_meas \range A \ sets M\ B_def by blast have b: "\i. B i \ W" using B_def by blast { fix i have "emeasure M (B i) \ emeasure M (A i)" using A by (intro emeasure_mono) (auto simp: B_def) also have "emeasure M (A i) < \" - using \i. emeasure M (A i) \ \ by (simp add: less_top) + using \\i. emeasure M (A i) \ \\ by (simp add: less_top) finally have "emeasure M (B i) < \" . } note c = this - have "W = (\i. B i)" using B_def (\i. A i) = space M W_meas by auto - moreover have "incseq B" using B_def incseq A by (simp add: incseq_def subset_eq) + have "W = (\i. B i)" using B_def $$\i. A i) = space M\ W_meas by auto + moreover have "incseq B" using B_def \incseq A\ by (simp add: incseq_def subset_eq) ultimately have "(\i. emeasure M (B i)) \ emeasure M W" using W_meas B_meas by (simp add: B_meas Lim_emeasure_incseq image_subset_iff) then have "(\i. emeasure M (B i)) \ \" using W_inf by simp diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Analysis/Path_Connected.thy --- a/src/HOL/Analysis/Path_Connected.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Analysis/Path_Connected.thy Tue Jan 17 13:59:10 2017 +0100 @@ -7099,7 +7099,7 @@ subsection\ Self-homeomorphisms shuffling points about in various ways.\ -subsubsection\The theorem @{text homeomorphism_moving_points_exists}\ +subsubsection\The theorem \homeomorphism_moving_points_exists\\ lemma homeomorphism_moving_point_1: fixes a :: "'a::euclidean_space" @@ -7521,7 +7521,7 @@ qed -subsubsection\The theorem @{text homeomorphism_grouping_points_exists}\ +subsubsection\The theorem \homeomorphism_grouping_points_exists\\ lemma homeomorphism_grouping_point_1: fixes a::real and c::real diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Analysis/Radon_Nikodym.thy --- a/src/HOL/Analysis/Radon_Nikodym.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Analysis/Radon_Nikodym.thy Tue Jan 17 13:59:10 2017 +0100 @@ -44,9 +44,9 @@ qed qed fact -text {*An equivalent characterization of sigma-finite spaces is the existence of integrable +text \An equivalent characterization of sigma-finite spaces is the existence of integrable positive functions (or, still equivalently, the existence of a probability measure which is in -the same measure class as the original measure).*} +the same measure class as the original measure).\ lemma (in sigma_finite_measure) obtain_positive_integrable_function: obtains f::"'a \ real" where @@ -69,7 +69,7 @@ have g_pos: "g x > 0" if "x \ space M" for x unfolding g_def proof (subst suminf_pos_iff[OF *[of x]], auto) - obtain i where "x \ A i" using (\i. A i) = space M x \ space M by auto + obtain i where "x \ A i" using \(\i. A i) = space M\ \x \ space M\ by auto then have "0 < (1 / 2) ^ Suc i * indicator (A i) x / (1 + Sigma_Algebra.measure M (A i))" unfolding indicator_def apply (auto simp add: divide_simps) using measure_nonneg[of M "A i"] by (auto, meson add_nonneg_nonneg linorder_not_le mult_nonneg_nonneg zero_le_numeral zero_le_one zero_le_power) @@ -81,7 +81,7 @@ unfolding g_def proof (rule integrable_suminf) fix n show "integrable M (\x. (1 / 2) ^ Suc n * indicator (A n) x / (1 + Sigma_Algebra.measure M (A n)))" - using emeasure M (A n) \ \ + using \emeasure M (A n) \ \\ by (auto intro!: integrable_mult_right integrable_divide_zero integrable_real_indicator simp add: top.not_eq_extremum) next show "AE x in M. summable (\n. norm ((1 / 2) ^ Suc n * indicator (A n) x / (1 + Sigma_Algebra.measure M (A n))))" @@ -97,7 +97,7 @@ moreover have "f x \ 1" for x unfolding f_def using g_le_1 by auto moreover have [measurable]: "f \ borel_measurable M" unfolding f_def by auto moreover have "integrable M f" - apply (subst integrable_cong[of _ _ _ g]) unfolding f_def using integrable M g by auto + apply (subst integrable_cong[of _ _ _ g]) unfolding f_def using \integrable M g\ by auto ultimately show "(\f. f \ borel_measurable M \ (\x. 0 < f x) \ (\x. f x \ 1) \ integrable M f \ thesis) \ thesis" by (meson that) qed @@ -314,7 +314,7 @@ let ?f = "\x. f x + b" have "nn_integral M f \ top" - using f \ G[THEN G_D, of "space M"] by (auto simp: top_unique cong: nn_integral_cong) + using \f \ G$THEN G_D, of "space M"] by (auto simp: top_unique cong: nn_integral_cong) with \b \ top\ interpret Mf: finite_measure "density M ?f" by (intro finite_measureI) (auto simp: field_simps mult_indicator_subset ennreal_mult_eq_top_iff diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Analysis/Set_Integral.thy --- a/src/HOL/Analysis/Set_Integral.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Analysis/Set_Integral.thy Tue Jan 17 13:59:10 2017 +0100 @@ -14,7 +14,7 @@ lemma bij_inv_eq_iff: "bij p \ x = inv p y \ p x = y" (* COPIED FROM Permutations *) using surj_f_inv_f[of p] by (auto simp add: bij_def) -subsection {*Fun.thy*} +subsection \Fun.thy\ lemma inj_fn: fixes f::"'a \ 'a" @@ -129,7 +129,7 @@ shows "Inf K \ K" by (auto simp add: Min_def Inf_nat_def) (meson LeastI assms bot.extremum_unique subsetI) -subsection {*Liminf-Limsup.thy*} +subsection \Liminf-Limsup.thy\ lemma limsup_shift: "limsup (\n. u (n+1)) = limsup u" @@ -140,7 +140,7 @@ have b: "(INF n. (SUP m:{n+1..}. u m)) = (INF n:{1..}. (SUP m:{n..}. u m))" apply (rule INF_eq) using Suc_le_D by auto have "(INF n:{1..}. v n) = (INF n. v n)" if "decseq v" for v::"nat \ 'a" - apply (rule INF_eq) using decseq v decseq_Suc_iff by auto + apply (rule INF_eq) using \decseq v\ decseq_Suc_iff by auto moreover have "decseq (\n. (SUP m:{n..}. u m))" by (simp add: SUP_subset_mono decseq_def) ultimately have c: "(INF n:{1..}. (SUP m:{n..}. u m)) = (INF n. (SUP m:{n..}. u m))" by simp have "(INF n. SUPREMUM {n..} u) = (INF n. SUP m:{n..}. u (m + 1))" using a b c by simp @@ -164,7 +164,7 @@ have b: "(SUP n. (INF m:{n+1..}. u m)) = (SUP n:{1..}. (INF m:{n..}. u m))" apply (rule SUP_eq) using Suc_le_D by (auto) have "(SUP n:{1..}. v n) = (SUP n. v n)" if "incseq v" for v::"nat \ 'a" - apply (rule SUP_eq) using incseq v incseq_Suc_iff by auto + apply (rule SUP_eq) using \incseq v\ incseq_Suc_iff by auto moreover have "incseq (\n. (INF m:{n..}. u m))" by (simp add: INF_superset_mono mono_def) ultimately have c: "(SUP n:{1..}. (INF m:{n..}. u m)) = (SUP n. (INF m:{n..}. u m))" by simp have "(SUP n. INFIMUM {n..} u) = (SUP n. INF m:{n..}. u (m + 1))" using a b c by simp @@ -188,8 +188,8 @@ then show ?thesis by (metis eventually_True mem_Collect_eq less_INF_D less_SUP_iff) qed -text {* The next lemma is extremely useful, as it often makes it possible to reduce statements -about limsups to statements about limits.*} +text \The next lemma is extremely useful, as it often makes it possible to reduce statements +about limsups to statements about limits.\ lemma limsup_subseq_lim: fixes u::"nat \ 'a :: {complete_linorder, linorder_topology}" @@ -203,12 +203,12 @@ define umax where "umax = (\n. (SUP m:{n..}. u m))" have "decseq umax" unfolding umax_def by (simp add: SUP_subset_mono antimono_def) then have "umax \ limsup u" unfolding umax_def by (metis LIMSEQ_INF limsup_INF_SUP) - then have *: "(umax o r) \ limsup u" by (simp add: LIMSEQ_subseq_LIMSEQ subseq r) + then have *: "(umax o r) \ limsup u" by (simp add: LIMSEQ_subseq_LIMSEQ \subseq r$$ have "\n. umax(r n) = u(r n)" unfolding umax_def using mono by (metis SUP_le_iff antisym atLeast_def mem_Collect_eq order_refl) then have "umax o r = u o r" unfolding o_def by simp then have "(u o r) \ limsup u" using * by simp - then show ?thesis using subseq r by blast + then show ?thesis using \subseq r\ by blast next assume "\ (\n. \p>n. (\m\p. u m \ u p))" then obtain N where N: "\p. p > N \ \m>p. u p < u m" by (force simp: not_le le_less) @@ -219,18 +219,18 @@ have "Max {u i |i. i \ {N<..x}} \ {u i |i. i \ {N<..x}}" apply (rule Max_in) using a by (auto) then obtain p where "p \ {N<..x}" and upmax: "u p = Max{u i |i. i \ {N<..x}}" by auto define U where "U = {m. m > p \ u p < u m}" - have "U \ {}" unfolding U_def using N[of p] p \ {N<..x} by auto + have "U \ {}" unfolding U_def using N[of p] \p \ {N<..x}\ by auto define y where "y = Inf U" - then have "y \ U" using U \ {} by (simp add: Inf_nat_def1) + then have "y \ U" using \U \ {}\ by (simp add: Inf_nat_def1) have a: "\i. i \ {N<..x} \ u i \ u p" proof - fix i assume "i \ {N<..x}" then have "u i \ {u i |i. i \ {N<..x}}" by blast then show "u i \ u p" using upmax by simp qed - moreover have "u p < u y" using y \ U U_def by auto + moreover have "u p < u y" using \y \ U\ U_def by auto ultimately have "y \ {N<..x}" using not_le by blast - moreover have "y > N" using y \ U U_def p \ {N<..x} by auto + moreover have "y > N" using \y \ U\ U_def \p \ {N<..x}\ by auto ultimately have "y > x" by auto have "\i. i \ {N<..y} \ u i \ u y" @@ -241,7 +241,7 @@ then show ?thesis by simp next assume "$$i=y)" - then have i:"i \ {N<.. {N<..y} by simp + then have i:"i \ {N<..i \ {N<..y}\ by simp have "u i \ u p" proof (cases) assume "i \ x" @@ -250,15 +250,15 @@ next assume "\(i \ x)" then have "i > x" by simp - then have *: "i > p" using p \ {N<..x} by simp + then have *: "i > p" using \p \ {N<..x}\ by simp have "i < Inf U" using i y_def by simp then have "i \ U" using Inf_nat_def not_less_Least by auto then show ?thesis using U_def * by auto qed - then show "u i \ u y" using u p < u y by auto + then show "u i \ u y" using \u p < u y\ by auto qed qed - then have "N < y \ x < y \ (\i\{N<..y}. u i \ u y)" using y > x y > N by auto + then have "N < y \ x < y \ (\i\{N<..y}. u i \ u y)" using \y > x\ \y > N\ by auto then show "\y>N. x < y \ (\i\{N<..y}. u i \ u y)" by auto qed (auto) then obtain r where r: "\n. N < r n \ r n < r (Suc n) \ (\i\ {N<..r (Suc n)}. u i \ u (r (Suc n)))" by auto @@ -266,12 +266,12 @@ have "incseq (u o r)" unfolding o_def using r by (simp add: incseq_SucI order.strict_implies_order) then have "(u o r) \ (SUP n. (u o r) n)" using LIMSEQ_SUP by blast then have "limsup (u o r) = (SUP n. (u o r) n)" by (simp add: lim_imp_Limsup) - moreover have "limsup (u o r) \ limsup u" using subseq r by (simp add: limsup_subseq_mono) + moreover have "limsup (u o r) \ limsup u" using \subseq r\ by (simp add: limsup_subseq_mono) ultimately have "(SUP n. (u o r) n) \ limsup u" by simp { fix i assume i: "i \ {N<..}" - obtain n where "i < r (Suc n)" using subseq r using Suc_le_eq seq_suble by blast + obtain n where "i < r (Suc n)" using \subseq r\ using Suc_le_eq seq_suble by blast then have "i \ {N<..r(Suc n)}" using i by simp then have "u i \ u (r(Suc n))" using r by simp then have "u i \ (SUP n. (u o r) n)" unfolding o_def by (meson SUP_upper2 UNIV_I) @@ -279,9 +279,9 @@ then have "(SUP i:{N<..}. u i) \ (SUP n. (u o r) n)" using SUP_least by blast then have "limsup u \ (SUP n. (u o r) n)" unfolding Limsup_def by (metis (mono_tags, lifting) INF_lower2 atLeast_Suc_greaterThan atLeast_def eventually_ge_at_top mem_Collect_eq) - then have "limsup u = (SUP n. (u o r) n)" using (SUP n. (u o r) n) \ limsup u by simp - then have "(u o r) \ limsup u" using (u o r) \ (SUP n. (u o r) n) by simp - then show ?thesis using subseq r by auto + then have "limsup u = (SUP n. (u o r) n)" using \(SUP n. (u o r) n) \ limsup u\ by simp + then have "(u o r) \ limsup u" using \(u o r) \ (SUP n. (u o r) n)\ by simp + then show ?thesis using \subseq r\ by auto qed lemma liminf_subseq_lim: @@ -296,12 +296,12 @@ define umin where "umin = (\n. (INF m:{n..}. u m))" have "incseq umin" unfolding umin_def by (simp add: INF_superset_mono incseq_def) then have "umin \ liminf u" unfolding umin_def by (metis LIMSEQ_SUP liminf_SUP_INF) - then have *: "(umin o r) \ liminf u" by (simp add: LIMSEQ_subseq_LIMSEQ subseq r) + then have *: "(umin o r) \ liminf u" by (simp add: LIMSEQ_subseq_LIMSEQ \subseq r$$ have "\n. umin(r n) = u(r n)" unfolding umin_def using mono by (metis le_INF_iff antisym atLeast_def mem_Collect_eq order_refl) then have "umin o r = u o r" unfolding o_def by simp then have "(u o r) \ liminf u" using * by simp - then show ?thesis using subseq r by blast + then show ?thesis using \subseq r\ by blast next assume "\ (\n. \p>n. (\m\p. u m \ u p))" then obtain N where N: "\p. p > N \ \m>p. u p > u m" by (force simp: not_le le_less) @@ -312,18 +312,18 @@ have "Min {u i |i. i \ {N<..x}} \ {u i |i. i \ {N<..x}}" apply (rule Min_in) using a by (auto) then obtain p where "p \ {N<..x}" and upmin: "u p = Min{u i |i. i \ {N<..x}}" by auto define U where "U = {m. m > p \ u p > u m}" - have "U \ {}" unfolding U_def using N[of p] p \ {N<..x} by auto + have "U \ {}" unfolding U_def using N[of p] \p \ {N<..x}\ by auto define y where "y = Inf U" - then have "y \ U" using U \ {} by (simp add: Inf_nat_def1) + then have "y \ U" using \U \ {}\ by (simp add: Inf_nat_def1) have a: "\i. i \ {N<..x} \ u i \ u p" proof - fix i assume "i \ {N<..x}" then have "u i \ {u i |i. i \ {N<..x}}" by blast then show "u i \ u p" using upmin by simp qed - moreover have "u p > u y" using y \ U U_def by auto + moreover have "u p > u y" using \y \ U\ U_def by auto ultimately have "y \ {N<..x}" using not_le by blast - moreover have "y > N" using y \ U U_def p \ {N<..x} by auto + moreover have "y > N" using \y \ U\ U_def \p \ {N<..x}\ by auto ultimately have "y > x" by auto have "\i. i \ {N<..y} \ u i \ u y" @@ -334,7 +334,7 @@ then show ?thesis by simp next assume "$$i=y)" - then have i:"i \ {N<.. {N<..y} by simp + then have i:"i \ {N<..i \ {N<..y}\ by simp have "u i \ u p" proof (cases) assume "i \ x" @@ -343,15 +343,15 @@ next assume "\(i \ x)" then have "i > x" by simp - then have *: "i > p" using p \ {N<..x} by simp + then have *: "i > p" using \p \ {N<..x}\ by simp have "i < Inf U" using i y_def by simp then have "i \ U" using Inf_nat_def not_less_Least by auto then show ?thesis using U_def * by auto qed - then show "u i \ u y" using u p > u y by auto + then show "u i \ u y" using \u p > u y\ by auto qed qed - then have "N < y \ x < y \ (\i\{N<..y}. u i \ u y)" using y > x y > N by auto + then have "N < y \ x < y \ (\i\{N<..y}. u i \ u y)" using \y > x\ \y > N\ by auto then show "\y>N. x < y \ (\i\{N<..y}. u i \ u y)" by auto qed (auto) then obtain r where r: "\n. N < r n \ r n < r (Suc n) \ (\i\ {N<..r (Suc n)}. u i \ u (r (Suc n)))" by auto @@ -359,12 +359,12 @@ have "decseq (u o r)" unfolding o_def using r by (simp add: decseq_SucI order.strict_implies_order) then have "(u o r) \ (INF n. (u o r) n)" using LIMSEQ_INF by blast then have "liminf (u o r) = (INF n. (u o r) n)" by (simp add: lim_imp_Liminf) - moreover have "liminf (u o r) \ liminf u" using subseq r by (simp add: liminf_subseq_mono) + moreover have "liminf (u o r) \ liminf u" using \subseq r\ by (simp add: liminf_subseq_mono) ultimately have "(INF n. (u o r) n) \ liminf u" by simp { fix i assume i: "i \ {N<..}" - obtain n where "i < r (Suc n)" using subseq r using Suc_le_eq seq_suble by blast + obtain n where "i < r (Suc n)" using \subseq r\ using Suc_le_eq seq_suble by blast then have "i \ {N<..r(Suc n)}" using i by simp then have "u i \ u (r(Suc n))" using r by simp then have "u i \ (INF n. (u o r) n)" unfolding o_def by (meson INF_lower2 UNIV_I) @@ -372,15 +372,15 @@ then have "(INF i:{N<..}. u i) \ (INF n. (u o r) n)" using INF_greatest by blast then have "liminf u \ (INF n. (u o r) n)" unfolding Liminf_def by (metis (mono_tags, lifting) SUP_upper2 atLeast_Suc_greaterThan atLeast_def eventually_ge_at_top mem_Collect_eq) - then have "liminf u = (INF n. (u o r) n)" using (INF n. (u o r) n) \ liminf u by simp - then have "(u o r) \ liminf u" using (u o r) \ (INF n. (u o r) n) by simp - then show ?thesis using subseq r by auto + then have "liminf u = (INF n. (u o r) n)" using \(INF n. (u o r) n) \ liminf u\ by simp + then have "(u o r) \ liminf u" using \(u o r) \ (INF n. (u o r) n)\ by simp + then show ?thesis using \subseq r\ by auto qed -subsection {*Extended-Real.thy*} +subsection \Extended-Real.thy\ -text{* The proof of this one is copied from \verb+ereal_add_mono+. *} +text\The proof of this one is copied from \verb+ereal_add_mono+.\ lemma ereal_add_strict_mono2: fixes a b c d :: ereal assumes "a < b" @@ -392,7 +392,7 @@ apply (cases rule: ereal3_cases[of b c d], auto) done -text {* The next ones are analogues of \verb+mult_mono+ and \verb+mult_mono'+ in ereal.*} +text \The next ones are analogues of \verb+mult_mono+ and \verb+mult_mono'+ in ereal.\ lemma ereal_mult_mono: fixes a b c d::ereal @@ -411,7 +411,7 @@ assumes "b > 0" "c > 0" "a < b" "c < d" shows "a * c < b * d" proof - - have "c < \" using c < d by auto + have "c < \" using \c < d\ by auto then have "a * c < b * c" by (metis ereal_mult_strict_left_mono[OF assms(3) assms(2)] mult.commute) moreover have "b * c \ b * d" using assms(2) assms(4) by (simp add: assms(1) ereal_mult_left_mono less_imp_le) ultimately show ?thesis by simp @@ -465,13 +465,13 @@ qed -subsubsection {*Continuity of addition*} +subsubsection \Continuity of addition\ -text {*The next few lemmas remove an unnecessary assumption in \verb+tendsto_add_ereal+, culminating +text \The next few lemmas remove an unnecessary assumption in \verb+tendsto_add_ereal+, culminating in \verb+tendsto_add_ereal_general+ which essentially says that the addition is continuous on ereal times ereal, except at (-\infty, \infty) and (\infty, -\infty). It is much more convenient in many situations, see for instance the proof of -\verb+tendsto_sum_ereal+ below. *} +\verb+tendsto_sum_ereal+ below.\ lemma tendsto_add_ereal_PInf: fixes y :: ereal @@ -507,9 +507,9 @@ then show ?thesis by (simp add: tendsto_PInfty) qed -text{* One would like to deduce the next lemma from the previous one, but the fact +text\One would like to deduce the next lemma from the previous one, but the fact that -(x+y) is in general different from (-x) + (-y) in ereal creates difficulties, -so it is more efficient to copy the previous proof.*} +so it is more efficient to copy the previous proof.\ lemma tendsto_add_ereal_MInf: fixes y :: ereal @@ -574,8 +574,8 @@ ultimately show ?thesis by simp qed -text {* The next lemma says that the addition is continuous on ereal, except at -the pairs (-\infty, \infty) and (\infty, -\infty). *} +text \The next lemma says that the addition is continuous on ereal, except at +the pairs (-\infty, \infty) and (\infty, -\infty).\ lemma tendsto_add_ereal_general [tendsto_intros]: fixes x y :: ereal @@ -596,11 +596,11 @@ then show ?thesis using tendsto_add_ereal_MInf MInf f g by (metis ereal_MInfty_eq_plus) qed -subsubsection {*Continuity of multiplication*} +subsubsection \Continuity of multiplication\ -text {* In the same way as for addition, we prove that the multiplication is continuous on +text \In the same way as for addition, we prove that the multiplication is continuous on ereal times ereal, except at (\infty, 0) and (-\infty, 0) and (0, \infty) and (0, -\infty), -starting with specific situations.*} +starting with specific situations.\ lemma tendsto_mult_real_ereal: assumes "(u \ ereal l) F" "(v \ ereal m) F" @@ -631,15 +631,15 @@ shows "((\x. f x * g x) \$$ F" proof - obtain a::real where "0 < ereal a" "a < l" using assms(2) using ereal_dense2 by blast - have *: "eventually (\x. f x > a) F" using a < l assms(1) by (simp add: order_tendsto_iff) + have *: "eventually (\x. f x > a) F" using \a < l\ assms(1) by (simp add: order_tendsto_iff) { fix K::real define M where "M = max K 1" then have "M > 0" by simp - then have "ereal(M/a) > 0" using ereal a > 0 by simp + then have "ereal(M/a) > 0" using \ereal a > 0\ by simp then have "\x. ((f x > a) \ (g x > M/a)) \ (f x * g x > ereal a * ereal(M/a))" - using ereal_mult_mono_strict'[where ?c = "M/a", OF 0 < ereal a] by auto - moreover have "ereal a * ereal(M/a) = M" using ereal a > 0 by simp + using ereal_mult_mono_strict'[where ?c = "M/a", OF \0 < ereal a$ by auto + moreover have "ereal a * ereal(M/a) = M" using \ereal a > 0\ by simp ultimately have "\x. ((f x > a) \ (g x > M/a)) \ (f x * g x > M)" by simp moreover have "M \ K" unfolding M_def by simp ultimately have Imp: "\x. ((f x > a) \ (g x > M/a)) \ (f x * g x > K)" @@ -674,13 +674,13 @@ assume "$$l = \ \ m =$$" then have "l < \" "m < \" by auto then obtain lr mr where "l = ereal lr" "m = ereal mr" - using l>0 m>0 by (metis ereal_cases ereal_less(6) not_less_iff_gr_or_eq) + using \l>0\ \m>0\ by (metis ereal_cases ereal_less(6) not_less_iff_gr_or_eq) then show ?thesis using tendsto_mult_real_ereal assms by auto qed -text {*We reduce the general situation to the positive case by multiplying by suitable signs. +text \We reduce the general situation to the positive case by multiplying by suitable signs. Unfortunately, as ereal is not a ring, all the neat sign lemmas are not available there. We -give the bare minimum we need.*} +give the bare minimum we need.\ lemma ereal_sgn_abs: fixes l::ereal @@ -720,9 +720,9 @@ have "((\x. (sgn(l) * sgn(m)) * ((sgn(l) * f x) * (sgn(m) * g x))) \ (sgn(l) * sgn(m)) * ((sgn(l) * l) * (sgn(m) * m))) F" by (rule tendsto_cmult_ereal, auto simp add: sgn_finite2 *) moreover have "\x. (sgn(l) * sgn(m)) * ((sgn(l) * f x) * (sgn(m) * g x)) = f x * g x" - by (metis mult.left_neutral sgn_squared_ereal[OF l \ 0] sgn_squared_ereal[OF m \ 0] mult.assoc mult.commute) + by (metis mult.left_neutral sgn_squared_ereal[OF \l \ 0\] sgn_squared_ereal[OF \m \ 0\] mult.assoc mult.commute) moreover have "(sgn(l) * sgn(m)) * ((sgn(l) * l) * (sgn(m) * m)) = l * m" - by (metis mult.left_neutral sgn_squared_ereal[OF l \ 0] sgn_squared_ereal[OF m \ 0] mult.assoc mult.commute) + by (metis mult.left_neutral sgn_squared_ereal[OF \l \ 0\] sgn_squared_ereal[OF \m \ 0\] mult.assoc mult.commute) ultimately show ?thesis by auto qed @@ -733,7 +733,7 @@ by (cases "c = 0", auto simp add: assms tendsto_mult_ereal) -subsubsection {*Continuity of division*} +subsubsection \Continuity of division\ lemma tendsto_inverse_ereal_PInf: fixes u::"_ \ ereal" @@ -747,9 +747,9 @@ moreover { fix z::ereal assume "z>1/e" - then have "z>0" using e>0 using less_le_trans not_le by fastforce + then have "z>0" using \e>0\ using less_le_trans not_le by fastforce then have "1/z \ 0" by auto - moreover have "1/z < e" using e>0 z>1/e + moreover have "1/z < e" using \e>0\ \z>1/e\ apply (cases z) apply auto by (metis (mono_tags, hide_lams) less_ereal.simps(2) less_ereal.simps(4) divide_less_eq ereal_divide_less_pos ereal_less(4) ereal_less_eq(4) less_le_trans mult_eq_0_iff not_le not_one_less_zero times_ereal.simps(1)) @@ -765,11 +765,11 @@ fix a::ereal assume "a>0" then obtain e::real where "e>0" "a>e" using ereal_dense2 ereal_less(2) by blast then have "eventually (\n. 1/u n < e) F" using *(1) by auto - then show "eventually (\n. 1/u n < a) F" using a>e by (metis (mono_tags, lifting) eventually_mono less_trans) + then show "eventually (\n. 1/u n < a) F" using \a>e\ by (metis (mono_tags, lifting) eventually_mono less_trans) qed qed -text {* The next lemma deserves to exist by itself, as it is so common and useful. *} +text \The next lemma deserves to exist by itself, as it is so common and useful.\ lemma tendsto_inverse_real [tendsto_intros]: fixes u::"_ \ real" @@ -836,7 +836,7 @@ qed -subsubsection {*Further limits*} +subsubsection \Further limits\ lemma id_nat_ereal_tendsto_PInf [tendsto_intros]: "(\ n::nat. real n) \ \" @@ -860,8 +860,8 @@ proof (rule ccontr) assume "$$N > C)" have "u N \ Max {u n| n. n \ C}" - apply (rule Max_ge) using \(N > C) by auto - then show False using u N \ n n \ M unfolding M_def by auto + apply (rule Max_ge) using \\(N > C)\ by auto + then show False using \u N \ n\ \n \ M\ unfolding M_def by auto qed then have **: "{N. u N \ n} \ {C..}" by fastforce have "Inf {N. u N \ n} \ C" @@ -981,7 +981,7 @@ ultimately show ?thesis using MInf by auto qed (simp add: assms) -text {* the next one is copied from \verb+tendsto_sum+. *} +text \the next one is copied from \verb+tendsto_sum+.\ lemma tendsto_sum_ereal [tendsto_intros]: fixes f :: "'a \ 'b \ ereal" assumes "\i. i \ S \ (f i \ a i) F" @@ -992,7 +992,7 @@ by (induct, simp, simp add: tendsto_add_ereal_general2 assms) qed(simp) -subsubsection {*Limsups and liminfs*} +subsubsection \Limsups and liminfs\ lemma limsup_finite_then_bounded: fixes u::"nat \ real" @@ -1017,7 +1017,7 @@ assume "\(n \ N)" then have "n \ N" by simp then have "u n < C" using N by auto - then have "u n < real_of_ereal C" using C = ereal(real_of_ereal C) less_ereal.simps(1) by fastforce + then have "u n < real_of_ereal C" using \C = ereal(real_of_ereal C)\ less_ereal.simps(1) by fastforce then show "u n \ D" unfolding D_def by linarith qed qed @@ -1047,7 +1047,7 @@ assume "\(n \ N)" then have "n \ N" by simp then have "u n > C" using N by auto - then have "u n > real_of_ereal C" using C = ereal(real_of_ereal C) less_ereal.simps(1) by fastforce + then have "u n > real_of_ereal C" using \C = ereal(real_of_ereal C)\ less_ereal.simps(1) by fastforce then show "u n \ D" unfolding D_def by linarith qed qed @@ -1060,9 +1060,9 @@ shows "\N>k. u N < l" by (metis assms gt_ex less_le_trans liminf_bounded_iff not_less) -text {* The following statement about limsups is reduced to a statement about limits using +text \The following statement about limsups is reduced to a statement about limits using subsequences thanks to \verb+limsup_subseq_lim+. The statement for limits follows for instance from -\verb+tendsto_add_ereal_general+.*} +\verb+tendsto_add_ereal_general+.\ lemma ereal_limsup_add_mono: fixes u v::"nat \ ereal" @@ -1091,9 +1091,9 @@ done have "limsup (u o r) \ limsup u" by (simp add: limsup_subseq_mono r(1)) - then have a: "limsup (u o r) \ \" using limsup u < \ by auto + then have a: "limsup (u o r) \ \" using \limsup u < \\ by auto have "limsup (v o r o s) \ limsup v" by (simp add: comp_assoc limsup_subseq_mono r(1) s(1) subseq_o) - then have b: "limsup (v o r o s) \ \" using limsup v < \ by auto + then have b: "limsup (v o r o s) \ \" using \limsup v < \\ by auto have "(\n. (u o a) n + (v o a) n) \ limsup (u o r) + limsup (v o r o s)" using l tendsto_add_ereal_general a b by fastforce @@ -1101,13 +1101,13 @@ ultimately have "(w o a) \ limsup (u o r) + limsup (v o r o s)" by simp then have "limsup w = limsup (u o r) + limsup (v o r o s)" using l(1) LIMSEQ_unique by blast then have "limsup w \ limsup u + limsup v" - using limsup (u o r) \ limsup u limsup (v o r o s) \ limsup v ereal_add_mono by simp + using \limsup (u o r) \ limsup u\ \limsup (v o r o s) \ limsup v\ ereal_add_mono by simp then show ?thesis unfolding w_def by simp qed -text {* There is an asymmetry between liminfs and limsups in ereal, as \infty + (-\infty) = \infty. +text \There is an asymmetry between liminfs and limsups in ereal, as \infty + (-\infty) = \infty. This explains why there are more assumptions in the next lemma dealing with liminfs that in the -previous one about limsups.*} +previous one about limsups.\ lemma ereal_liminf_add_mono: fixes u v::"nat \ ereal" @@ -1137,9 +1137,9 @@ done have "liminf (u o r) \ liminf u" by (simp add: liminf_subseq_mono r(1)) - then have a: "liminf (u o r) \ -\" using liminf u > -\ by auto + then have a: "liminf (u o r) \ -\" using \liminf u > -\\ by auto have "liminf (v o r o s) \ liminf v" by (simp add: comp_assoc liminf_subseq_mono r(1) s(1) subseq_o) - then have b: "liminf (v o r o s) \ -\" using liminf v > -\ by auto + then have b: "liminf (v o r o s) \ -\" using \liminf v > -\\ by auto have "(\n. (u o a) n + (v o a) n) \ liminf (u o r) + liminf (v o r o s)" using l tendsto_add_ereal_general a b by fastforce @@ -1147,7 +1147,7 @@ ultimately have "(w o a) \ liminf (u o r) + liminf (v o r o s)" by simp then have "liminf w = liminf (u o r) + liminf (v o r o s)" using l(1) LIMSEQ_unique by blast then have "liminf w \ liminf u + liminf v" - using liminf (u o r) \ liminf u liminf (v o r o s) \ liminf v ereal_add_mono by simp + using \liminf (u o r) \ liminf u\ \liminf (v o r o s) \ liminf v\ ereal_add_mono by simp then show ?thesis unfolding w_def by simp qed @@ -1162,7 +1162,7 @@ have "limsup (\n. u n + v n) \ limsup u + limsup v" by (rule ereal_limsup_add_mono) - then have up: "limsup (\n. u n + v n) \ a + limsup v" using limsup u = a by simp + then have up: "limsup (\n. u n + v n) \ a + limsup v" using \limsup u = a\ by simp have a: "limsup (\n. (u n + v n) + (-u n)) \ limsup (\n. u n + v n) + limsup (\n. -u n)" by (rule ereal_limsup_add_mono) @@ -1177,7 +1177,7 @@ ultimately have "eventually (\n. u n + v n + (-u n) = v n) sequentially" using eventually_mono by force then have "limsup v = limsup (\n. u n + v n + (-u n))" using Limsup_eq by force - then have "limsup v \ limsup (\n. u n + v n) -a" using a limsup (\n. -u n) = -a by (simp add: minus_ereal_def) + then have "limsup v \ limsup (\n. u n + v n) -a" using a \limsup (\n. -u n) = -a\ by (simp add: minus_ereal_def) then have "limsup (\n. u n + v n) \ a + limsup v" using assms(2) by (metis add.commute ereal_le_minus) then show ?thesis using up by simp qed @@ -1255,7 +1255,7 @@ have "liminf (\n. u n + v n) \ liminf u + liminf v" apply (rule ereal_liminf_add_mono) using * by auto - then have up: "liminf (\n. u n + v n) \ a + liminf v" using liminf u = a by simp + then have up: "liminf (\n. u n + v n) \ a + liminf v" using \liminf u = a\ by simp have a: "liminf (\n. (u n + v n) + (-u n)) \ liminf (\n. u n + v n) + liminf (\n. -u n)" apply (rule ereal_liminf_add_mono) using ** by auto @@ -1270,7 +1270,7 @@ ultimately have "eventually (\n. u n + v n + (-u n) = v n) sequentially" using eventually_mono by force then have "liminf v = liminf (\n. u n + v n + (-u n))" using Liminf_eq by force - then have "liminf v \ liminf (\n. u n + v n) -a" using a liminf (\n. -u n) = -a by (simp add: minus_ereal_def) + then have "liminf v \ liminf (\n. u n + v n) -a" using a \liminf (\n. -u n) = -a\ by (simp add: minus_ereal_def) then have "liminf (\n. u n + v n) \ a + liminf v" using assms(2) by (metis add.commute ereal_minus_le) then show ?thesis using up by simp qed @@ -1302,15 +1302,15 @@ have "liminf (w o r) \ liminf w" by (simp add: liminf_subseq_mono r(1)) have "limsup (v o r o s) \ limsup v" by (simp add: comp_assoc limsup_subseq_mono r(1) s(1) subseq_o) - then have b: "limsup (v o r o s) < \" using limsup v < \ by auto + then have b: "limsup (v o r o s) < \" using \limsup v < \\ by auto have "(\n. (u o a) n + (v o a) n) \ liminf u + limsup (v o r o s)" - apply (rule tendsto_add_ereal_general) using b liminf u < \ l(1) l(3) by force+ + apply (rule tendsto_add_ereal_general) using b \liminf u < \\ l(1) l(3) by force+ moreover have "(\n. (u o a) n + (v o a) n) = (w o a)" unfolding w_def by auto ultimately have "(w o a) \ liminf u + limsup (v o r o s)" by simp then have "liminf (w o r) = liminf u + limsup (v o r o s)" using l(2) using LIMSEQ_unique by blast then have "liminf w \ liminf u + limsup v" - using liminf (w o r) \ liminf w limsup (v o r o s) \ limsup v + using \liminf (w o r) \ liminf w\ \limsup (v o r o s) \ limsup v\ by (metis add_mono_thms_linordered_semiring(2) le_less_trans not_less) then show ?thesis unfolding w_def by simp qed @@ -1858,8 +1858,8 @@ by (rule set_borel_measurable_continuous[OF _ assms]) simp -text{* This notation is from Sébastien Gouëzel: His use is not directly in line with the -notations in this file, they are more in line with sum, and more readable he thinks. *} +text\This notation is from Sébastien Gouëzel: His use is not directly in line with the +notations in this file, they are more in line with sum, and more readable he thinks.\ abbreviation "set_nn_integral M A f \ nn_integral M (\x. f x * indicator A x)" @@ -1921,7 +1921,7 @@ assume "x \ (\n. B n)" then obtain n where "x \ B n" by blast have a: "finite {n}" by simp - have "\i. i \ n \ x \ B i" using x \ B n assms(3) disjoint_family_on_def + have "\i. i \ n \ x \ B i" using \x \ B n\ assms(3) disjoint_family_on_def by (metis IntI UNIV_I empty_iff) then have "\i. i \ {n} \ indicator (B i) x = (0::ennreal)" using indicator_def by simp then have b: "\i. i \ {n} \ f x * indicator (B i) x = (0::ennreal)" by simp @@ -1932,14 +1932,14 @@ by (metis sums_unique[OF sums_finite[OF a]]) then have "(\i. h i) = h n" by simp then have "(\n. f x * indicator (B n) x) = f x * indicator (B n) x" using h_def by simp - then have "(\n. f x * indicator (B n) x) = f x" using x \ B n indicator_def by simp - then show ?thesis using x \ (\n. B n) by auto + then have "(\n. f x * indicator (B n) x) = f x" using \x \ B n\ indicator_def by simp + then show ?thesis using \x \ (\n. B n)\ by auto next assume "x \ (\n. B n)" then have "\n. f x * indicator (B n) x = 0" by simp have "(\n. f x * indicator (B n) x) = 0" - by (simp add: \n. f x * indicator (B n) x = 0) - then show ?thesis using x \ (\n. B n) by auto + by (simp add: \\n. f x * indicator (B n) x = 0$$ + then show ?thesis using \x \ (\n. B n)\ by auto qed ultimately show ?thesis by simp qed @@ -2035,14 +2035,14 @@ proof - have "AE x in M. indicator A x * f x = 0" apply (subst integral_nonneg_eq_0_iff_AE[symmetric]) - using assms integrable_mult_indicator[OF A \ sets M assms(1)] by auto + using assms integrable_mult_indicator[OF \A \ sets M\ assms(1)] by auto then have "AE x\A in M. f x = 0" by auto then have "AE x\A in M. False" using assms(3) by auto then show "A \ null_sets M" using assms(2) by (simp add: AE_iff_null_sets) qed -text{*The next lemma is a variant of \density_unique\. Note that it uses the notation -for nonnegative set integrals introduced earlier.*} +text\The next lemma is a variant of \density_unique\. Note that it uses the notation +for nonnegative set integrals introduced earlier.\ lemma (in sigma_finite_measure) density_unique2: assumes [measurable]: "f \ borel_measurable M" "f' \ borel_measurable M" @@ -2054,9 +2054,9 @@ qed (auto simp add: assms) -text {* The next lemma implies the same statement for Banach-space valued functions +text \The next lemma implies the same statement for Banach-space valued functions using Hahn-Banach theorem and linear forms. Since they are not yet easily available, I -only formulate it for real-valued functions.*} +only formulate it for real-valued functions.\ lemma density_unique_real: fixes f f'::"_ \ real" @@ -2067,7 +2067,7 @@ define A where "A = {x \ space M. f x < f' x}" then have [measurable]: "A \ sets M" by simp have "(\x \ A. (f' x - f x) \M) = (\x \ A. f' x \M) - (\x \ A. f x \M)" - using A \ sets M assms(1) assms(2) integrable_mult_indicator by blast + using \A \ sets M\ assms(1) assms(2) integrable_mult_indicator by blast then have "(\x \ A. (f' x - f x) \M) = 0" using assms(3) by simp then have "A \ null_sets M" using A_def null_if_pos_func_has_zero_int[where ?f = "\x. f' x - f x" and ?A = A] assms by auto @@ -2078,7 +2078,7 @@ define B where "B = {x \ space M. f' x < f x}" then have [measurable]: "B \ sets M" by simp have "(\x \ B. (f x - f' x) \M) = (\x \ B. f x \M) - (\x \ B. f' x \M)" - using B \ sets M assms(1) assms(2) integrable_mult_indicator by blast + using \B \ sets M\ assms(1) assms(2) integrable_mult_indicator by blast then have "(\x \ B. (f x - f' x) \M) = 0" using assms(3) by simp then have "B \ null_sets M" using B_def null_if_pos_func_has_zero_int[where ?f = "\x. f x - f' x" and ?A = B] assms by auto @@ -2088,13 +2088,13 @@ then show ?thesis using * by auto qed -text {* The next lemma shows that $L^1$ convergence of a sequence of functions follows from almost +text \The next lemma shows that $L^1$ convergence of a sequence of functions follows from almost everywhere convergence and the weaker condition of the convergence of the integrated norms (or even just the nontrivial inequality about them). Useful in a lot of contexts! This statement (or its variations) are known as Scheffe lemma. The formalization is more painful as one should jump back and forth between reals and ereals and justify -all the time positivity or integrability (thankfully, measurability is handled more or less automatically).*} +all the time positivity or integrability (thankfully, measurability is handled more or less automatically).\ lemma Scheffe_lemma1: assumes "\n. integrable M (F n)" "integrable M f" diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Analysis/Tagged_Division.thy --- a/src/HOL/Analysis/Tagged_Division.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Analysis/Tagged_Division.thy Tue Jan 17 13:59:10 2017 +0100 @@ -1312,7 +1312,7 @@ subsection \Functions closed on boxes: morphisms from boxes to monoids\ text \This auxiliary structure is used to sum up over the elements of a division. Main theorem is - @{text operative_division}. Instances for the monoid are @{typ "'a option"}, @{typ real}, and + \operative_division\. Instances for the monoid are @{typ "'a option"}, @{typ real}, and @{typ bool}.\ paragraph \Using additivity of lifted function to encode definedness.\ @@ -2565,10 +2565,10 @@ have realff: "(real w) * 2^m < (real v) * 2^n \ w * 2^m < v * 2^n" for m n v w using of_nat_less_iff less_imp_of_nat_less by fastforce have *: "\v w. ?K0(m,v) \ ?K0(n,w) \ ?K0(n,w) \ ?K0(m,v) \ interior(?K0(m,v)) \ interior(?K0(n,w)) = {}" - for m n --\The symmetry argument requires a single HOL formula\ + for m n \\The symmetry argument requires a single HOL formula\ proof (rule linorder_wlog [where a=m and b=n], intro allI impI) fix v w m and n::nat - assume "m \ n" --\WLOG we can assume @{term"m \ n"}, when the first disjunct becomes impossible\ + assume "m \ n" \\WLOG we can assume @{term"m \ n"}, when the first disjunct becomes impossible\ have "?K0(n,w) \ ?K0(m,v) \ interior(?K0(m,v)) \ interior(?K0(n,w)) = {}" apply (simp add: subset_box disjoint_interval) apply (rule ccontr) diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Analysis/Topology_Euclidean_Space.thy --- a/src/HOL/Analysis/Topology_Euclidean_Space.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Analysis/Topology_Euclidean_Space.thy Tue Jan 17 13:59:10 2017 +0100 @@ -499,9 +499,9 @@ proof - obtain A::"'a set set" where "countable A" "topological_basis A" using ex_countable_basis by auto define B1 where "B1 = {(LEAST x. x \ U)| U. U \ A}" - then have "countable B1" using countable A by (simp add: Setcompr_eq_image) + then have "countable B1" using \countable A\ by (simp add: Setcompr_eq_image) define B2 where "B2 = {(SOME x. x \ U)| U. U \ A}" - then have "countable B2" using countable A by (simp add: Setcompr_eq_image) + then have "countable B2" using \countable A\ by (simp add: Setcompr_eq_image) have "\b \ B1 \ B2. x < b \ b \ y" if "x < y" for x y proof (cases) assume "\z. x < z \ z < y" @@ -509,27 +509,27 @@ define U where "U = {x<.. U" using z U_def by simp - ultimately obtain V where "V \ A" "z \ V" "V \ U" using topological_basisE[OF topological_basis A] by auto + ultimately obtain V where "V \ A" "z \ V" "V \ U" using topological_basisE[OF \topological_basis A\] by auto define w where "w = (SOME x. x \ V)" - then have "w \ V" using z \ V by (metis someI2) - then have "x < w \ w \ y" using w \ V V \ U U_def by fastforce - moreover have "w \ B1 \ B2" using w_def B2_def V \ A by auto + then have "w \ V" using \z \ V\ by (metis someI2) + then have "x < w \ w \ y" using \w \ V\ \V \ U\ U_def by fastforce + moreover have "w \ B1 \ B2" using w_def B2_def \V \ A\ by auto ultimately show ?thesis by auto next assume "\(\z. x < z \ z < y)" then have *: "\z. z > x \ z \ y" by auto define U where "U = {x<..}" then have "open U" by simp - moreover have "y \ U" using x < y U_def by simp - ultimately obtain "V" where "V \ A" "y \ V" "V \ U" using topological_basisE[OF topological_basis A] by auto - have "U = {y..}" unfolding U_def using * x < y by auto - then have "V \ {y..}" using V \ U by simp - then have "(LEAST w. w \ V) = y" using y \ V by (meson Least_equality atLeast_iff subsetCE) - then have "y \ B1 \ B2" using V \ A B1_def by auto - moreover have "x < y \ y \ y" using x < y by simp + moreover have "y \ U" using \x < y\ U_def by simp + ultimately obtain "V" where "V \ A" "y \ V" "V \ U" using topological_basisE[OF \topological_basis A\] by auto + have "U = {y..}" unfolding U_def using * \x < y\ by auto + then have "V \ {y..}" using \V \ U\ by simp + then have "(LEAST w. w \ V) = y" using \y \ V\ by (meson Least_equality atLeast_iff subsetCE) + then have "y \ B1 \ B2" using \V \ A\ B1_def by auto + moreover have "x < y \ y \ y" using \x < y\ by simp ultimately show ?thesis by auto qed - moreover have "countable (B1 \ B2)" using countable B1 countable B2 by simp + moreover have "countable (B1 \ B2)" using \countable B1\ \countable B2\ by simp ultimately show ?thesis by auto qed @@ -538,9 +538,9 @@ proof - obtain A::"'a set set" where "countable A" "topological_basis A" using ex_countable_basis by auto define B1 where "B1 = {(GREATEST x. x \ U) | U. U \ A}" - then have "countable B1" using countable A by (simp add: Setcompr_eq_image) + then have "countable B1" using \countable A\ by (simp add: Setcompr_eq_image) define B2 where "B2 = {(SOME x. x \ U)| U. U \ A}" - then have "countable B2" using countable A by (simp add: Setcompr_eq_image) + then have "countable B2" using \countable A\ by (simp add: Setcompr_eq_image) have "\b \ B1 \ B2. x \ b \ b < y" if "x < y" for x y proof (cases) assume "\z. x < z \ z < y" @@ -548,27 +548,27 @@ define U where "U = {x<.. U" using z U_def by simp - ultimately obtain "V" where "V \ A" "z \ V" "V \ U" using topological_basisE[OF topological_basis A] by auto + ultimately obtain "V" where "V \ A" "z \ V" "V \ U" using topological_basisE[OF \topological_basis A\] by auto define w where "w = (SOME x. x \ V)" - then have "w \ V" using z \ V by (metis someI2) - then have "x \ w \ w < y" using w \ V V \ U U_def by fastforce - moreover have "w \ B1 \ B2" using w_def B2_def V \ A by auto + then have "w \ V" using \z \ V\ by (metis someI2) + then have "x \ w \ w < y" using \w \ V\ \V \ U\ U_def by fastforce + moreover have "w \ B1 \ B2" using w_def B2_def \V \ A\ by auto ultimately show ?thesis by auto next assume "\(\z. x < z \ z < y)" then have *: "\z. z < y \ z \ x" using leI by blast define U where "U = {.. U" using x < y U_def by simp - ultimately obtain "V" where "V \ A" "x \ V" "V \ U" using topological_basisE[OF topological_basis A] by auto - have "U = {..x}" unfolding U_def using * x < y by auto - then have "V \ {..x}" using V \ U by simp - then have "(GREATEST x. x \ V) = x" using x \ V by (meson Greatest_equality atMost_iff subsetCE) - then have "x \ B1 \ B2" using V \ A B1_def by auto - moreover have "x \ x \ x < y" using x < y by simp + moreover have "x \ U" using \x < y\ U_def by simp + ultimately obtain "V" where "V \ A" "x \ V" "V \ U" using topological_basisE[OF \topological_basis A\] by auto + have "U = {..x}" unfolding U_def using * \x < y\ by auto + then have "V \ {..x}" using \V \ U\ by simp + then have "(GREATEST x. x \ V) = x" using \x \ V\ by (meson Greatest_equality atMost_iff subsetCE) + then have "x \ B1 \ B2" using \V \ A\ B1_def by auto + moreover have "x \ x \ x < y" using \x < y\ by simp ultimately show ?thesis by auto qed - moreover have "countable (B1 \ B2)" using countable B1 countable B2 by simp + moreover have "countable (B1 \ B2)" using \countable B1\ \countable B2\ by simp ultimately show ?thesis by auto qed @@ -579,10 +579,10 @@ using countable_separating_set_linorder1 by auto have "\b \ B. x < b \ b < y" if "x < y" for x y proof - - obtain z where "x < z" "z < y" using x < y dense by blast + obtain z where "x < z" "z < y" using \x < y\ dense by blast then obtain b where "b \ B" "x < b \ b \ z" using B(2) by auto - then have "x < b \ b < y" using z < y by auto - then show ?thesis using b \ B by auto + then have "x < b \ b < y" using \z < y\ by auto + then show ?thesis using \b \ B\ by auto qed then show ?thesis using B(1) by auto qed @@ -680,7 +680,7 @@ shows "openin T (\i \ I. U i)" proof - have "(\i \ I. U i) \ topspace T" - using I \ {} openin_subset[OF assms(3)] by auto + using \I \ {}\ openin_subset[OF assms(3)] by auto then show ?thesis using openin_INT[of _ _ U, OF assms(1) assms(3)] by (simp add: inf.absorb2 inf_commute) qed diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Analysis/ex/Circle_Area.thy --- a/src/HOL/Analysis/ex/Circle_Area.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Analysis/ex/Circle_Area.thy Tue Jan 17 13:59:10 2017 +0100 @@ -4,7 +4,7 @@ A proof that the area of a circle with radius R is R\<^sup>2\. *) -section {* The area of a circle *} +section \The area of a circle\ theory Circle_Area imports Complex_Main Interval_Integral @@ -157,13 +157,13 @@ also have "... = \\<^sup>+x. R * \\<^sup>+y. indicator ?A (x,R*y) \lborel \lborel" proof (rule nn_integral_cong) fix x from R show "(\\<^sup>+y. indicator ?A (x,y) \lborel) = R * \\<^sup>+y. indicator ?A (x,R*y) \lborel" - by (subst nn_integral_real_affine[OF _ R \ 0, of _ 0]) simp_all + by (subst nn_integral_real_affine[OF _ \R \ 0\, of _ 0]) simp_all qed also have "... = R * \\<^sup>+x. \\<^sup>+y. indicator ?A (x,R*y) \lborel \lborel" using R by (intro nn_integral_cmult) simp_all also from R have "(\\<^sup>+x. \\<^sup>+y. indicator ?A (x,R*y) \lborel \lborel) = R * \\<^sup>+x. \\<^sup>+y. indicator ?A (R*x,R*y) \lborel \lborel" - by (subst nn_integral_real_affine[OF _ R \ 0, of _ 0]) simp_all + by (subst nn_integral_real_affine[OF _ \R \ 0\, of _ 0]) simp_all also { fix x y have A: "(R*x, R*y) = R *\<^sub>R (x,y)" by simp diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Library/Bourbaki_Witt_Fixpoint.thy --- a/src/HOL/Library/Bourbaki_Witt_Fixpoint.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Library/Bourbaki_Witt_Fixpoint.thy Tue Jan 17 13:59:10 2017 +0100 @@ -268,7 +268,7 @@ context bourbaki_witt_fixpoint begin -lemma in_Chains_finite: -- \Translation from @{thm in_chain_finite}.\ +lemma in_Chains_finite: \ \Translation from @{thm in_chain_finite}.\ assumes "M \ Chains leq" and "M \ {}" and "finite M" diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Library/Linear_Temporal_Logic_on_Streams.thy --- a/src/HOL/Library/Linear_Temporal_Logic_on_Streams.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Library/Linear_Temporal_Logic_on_Streams.thy Tue Jan 17 13:59:10 2017 +0100 @@ -773,8 +773,8 @@ shows "\x\s. alw (ev (HLD {x})) \" proof - have "\i\UNIV. \x\s. \ !! i = x" - using alw (HLD s) \ by (simp add: alw_iff_sdrop HLD_iff) - from pigeonhole_infinite_rel[OF infinite_UNIV_nat finite s this] + using \alw (HLD s) \\ by (simp add: alw_iff_sdrop HLD_iff) + from pigeonhole_infinite_rel[OF infinite_UNIV_nat \finite s\ this] show ?thesis by (simp add: HLD_iff infinite_iff_alw_ev[symmetric]) qed diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Library/Multiset.thy --- a/src/HOL/Library/Multiset.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Library/Multiset.thy Tue Jan 17 13:59:10 2017 +0100 @@ -2805,7 +2805,7 @@ case (add z Z) obtain X' Y' Z' where *: "add_mset z X + Z = Z' + X'" "add_mset z Y + Z = Z' + Y'" "Y' \ {#}" "\x \ set_mset X'. \y \ set_mset Y'. (x, y) \ s" - using mult_implies_one_step[OF trans s add(2)] by auto + using mult_implies_one_step[OF \trans s\ add(2)] by auto consider Z2 where "Z' = add_mset z Z2" | X2 Y2 where "X' = add_mset z X2" "Y' = add_mset z Y2" using *(1,2) by (metis add_mset_remove_trivial_If insert_iff set_mset_add_mset_insert union_iff) thus ?case @@ -2813,9 +2813,9 @@ case 1 thus ?thesis using * one_step_implies_mult[of Y' X' s Z2] by (auto simp: add.commute[of _ "{#_#}"] add.assoc intro: add(1)) next - case 2 then obtain y where "y \ set_mset Y2" "(z, y) \ s" using *(4) irrefl s + case 2 then obtain y where "y \ set_mset Y2" "(z, y) \ s" using *(4) \irrefl s\ by (auto simp: irrefl_def) - moreover from this transD[OF trans s _ this(2)] + moreover from this transD[OF \trans s\ _ this(2)] have "x' \ set_mset X2 \ \y \ set_mset Y2. (x', y) \ s" for x' using 2 *(4)[rule_format, of x'] by auto ultimately show ?thesis using * one_step_implies_mult[of Y2 X2 s Z'] 2 @@ -2825,7 +2825,7 @@ next assume ?R then obtain I J K where "Y = I + J" "X = I + K" "J \ {#}" "\k \ set_mset K. \j \ set_mset J. (k, j) \ s" - using mult_implies_one_step[OF trans s] by blast + using mult_implies_one_step[OF \trans s\] by blast thus ?L using one_step_implies_mult[of J K s "I + Z"] by (auto simp: ac_simps) qed @@ -2887,7 +2887,7 @@ proof - { assume "N \ M" "M - M \# N = {#}" then obtain y where "count N y \ count M y" by (auto simp: count_inject[symmetric]) - then have "\y. count M y < count N y" using M - M \# N = {#} + then have "\y. count M y < count N y" using \M - M \# N = {#}\ by (auto simp: count_inject[symmetric] dest!: le_neq_implies_less fun_cong[of _ _ y]) } then have "multeqp P N M \ multp P N M \ N = M" diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Library/Perm.thy --- a/src/HOL/Library/Perm.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Library/Perm.thy Tue Jan 17 13:59:10 2017 +0100 @@ -12,7 +12,7 @@ Grieviously missing are cycles since these would require more elaboration, e.g. the concept of distinct lists equivalent under rotation, which maybe would also deserve its own theory. - But see theory @{text "src/HOL/ex/Perm_Fragments.thy"} for + But see theory \src/HOL/ex/Perm_Fragments.thy\ for fragments on that. \ diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Library/Polynomial_FPS.thy --- a/src/HOL/Library/Polynomial_FPS.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Library/Polynomial_FPS.thy Tue Jan 17 13:59:10 2017 +0100 @@ -163,7 +163,7 @@ The following simproc can reduce the equality of two polynomial FPSs two equality of the respective polynomials. A polynomial FPS is one that only has finitely many non-zero coefficients and can therefore be written as @{term "fps_of_poly p"} for some - polynomial @{text "p"}. + polynomial \p\. This may sound trivial, but it covers a number of annoying side conditions like @{term "1 + X \ 0"} that would otherwise not be solved automatically. diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Library/Polynomial_Factorial.thy --- a/src/HOL/Library/Polynomial_Factorial.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Library/Polynomial_Factorial.thy Tue Jan 17 13:59:10 2017 +0100 @@ -52,7 +52,7 @@ subsection \Lifting elements into the field of fractions\ definition to_fract :: "'a :: idom \ 'a fract" where "to_fract x = Fract x 1" - -- \FIXME: name \of_idom\, abbreviation\ + \ \FIXME: name \of_idom\, abbreviation\ lemma to_fract_0 [simp]: "to_fract 0 = 0" by (simp add: to_fract_def eq_fract Zero_fract_def) diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Number_Theory/Euclidean_Algorithm.thy --- a/src/HOL/Number_Theory/Euclidean_Algorithm.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Number_Theory/Euclidean_Algorithm.thy Tue Jan 17 13:59:10 2017 +0100 @@ -187,7 +187,7 @@ proof - show "class.factorial_semiring divide plus minus zero times one unit_factor normalize" - proof (standard, rule factorial_semiring_altI_aux) -- \FIXME rule\ + proof (standard, rule factorial_semiring_altI_aux) \ \FIXME rule\ fix x assume "x \ 0" thus "finite {p. p dvd x \ normalize p = p}" proof (induction "euclidean_size x" arbitrary: x rule: less_induct) diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Number_Theory/Primes.thy --- a/src/HOL/Number_Theory/Primes.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Number_Theory/Primes.thy Tue Jan 17 13:59:10 2017 +0100 @@ -310,7 +310,7 @@ "prime (numeral m :: nat) \ (1::nat) < numeral m \ (\n::nat\set [2.. n dvd numeral m)" - by (fact prime_nat_simp) -- \TODO Sieve Of Erathosthenes might speed this up\ + by (fact prime_nat_simp) \ \TODO Sieve Of Erathosthenes might speed this up\ text\A bit of regression testing:\ diff -r 6108dddad9f0 -r f0e07600de47 src/HOL/Number_Theory/Quadratic_Reciprocity.thy --- a/src/HOL/Number_Theory/Quadratic_Reciprocity.thy Tue Jan 17 11:26:21 2017 +0100 +++ b/src/HOL/Number_Theory/Quadratic_Reciprocity.thy Tue Jan 17 13:59:10 2017 +0100 @@ -4,7 +4,7 @@ imports Gauss begin -text {* The proof is based on Gauss's fifth proof, which can be found at http://www.lehigh.edu/~shw2/q-recip/gauss5.pdf *} +text \The proof is based on Gauss's fifth proof, which can be found at http://www.lehigh.edu/~shw2/q-recip/gauss5.pdf\ locale QR = fixes p :: "nat"