# HG changeset patch # User immler # Date 1523028890 -7200 # Node ID 0acdcd8f4ba11b6cc2ae8f6d8653d93515a4d146 # Parent 9c31678d21392e0c9a553095fb4899a587db9865 a first shot at tagging for HOL-Analysis manual diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Cartesian_Euclidean_Space.thy --- a/src/HOL/Analysis/Cartesian_Euclidean_Space.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Cartesian_Euclidean_Space.thy Fri Apr 06 17:34:50 2018 +0200 @@ -468,6 +468,12 @@ text\Matrix notation. NB: an MxN matrix is of type @{typ "'a^'n^'m"}, not @{typ "'a^'m^'n"}\ +definition map_matrix::"('a \ 'b) \ (('a, 'i::finite)vec, 'j::finite) vec \ (('b, 'i)vec, 'j) vec" where + "map_matrix f x = (\ i j. f (x $ i $ j))" + +lemma nth_map_matrix[simp]: "map_matrix f x $ i $ j = f (x $ i $ j)" + by (simp add: map_matrix_def) + definition matrix_matrix_mult :: "('a::semiring_1) ^'n^'m \ 'a ^'p^'n \ 'a ^ 'p ^'m" (infixl "**" 70) where "m ** m' == (\ i j. sum (\k. ((m$i)$k) * ((m'$k)$j)) (UNIV :: 'n set)) ::'a ^ 'p ^'m" diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Connected.thy --- a/src/HOL/Analysis/Connected.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Connected.thy Fri Apr 06 17:34:50 2018 +0200 @@ -8,7 +8,7 @@ imports Topology_Euclidean_Space begin -subsection \More properties of closed balls, spheres, etc.\ +subsection%unimportant \More properties of closed balls, spheres, etc.\ lemma mem_interior_cball: "x \ interior S \ (\e>0. cball x e \ S)" apply (simp add: interior_def, safe) @@ -345,7 +345,7 @@ shows "closed (sphere a r)" by (simp add: compact_imp_closed) -subsection \Connectedness\ +subsection%unimportant \Connectedness\ lemma connected_local: "connected S \ @@ -410,7 +410,7 @@ subsection \Connected components, considered as a connectedness relation or a set\ -definition "connected_component s x y \ \t. connected t \ t \ s \ x \ t \ y \ t" +definition%important "connected_component s x y \ \t. connected t \ t \ s \ x \ t \ y \ t" abbreviation "connected_component_set s x \ Collect (connected_component s x)" @@ -610,7 +610,7 @@ subsection \The set of connected components of a set\ -definition components:: "'a::topological_space set \ 'a set set" +definition%important components:: "'a::topological_space set \ 'a set set" where "components s \ connected_component_set s ` s" lemma components_iff: "s \ components u \ (\x. x \ u \ s = connected_component_set u x)" @@ -776,12 +776,12 @@ subsection \Intersecting chains of compact sets and the Baire property\ -proposition bounded_closed_chain: +proposition%important bounded_closed_chain: fixes \ :: "'a::heine_borel set set" assumes "B \ \" "bounded B" and \: "\S. S \ \ \ closed S" and "{} \ \" and chain: "\S T. S \ \ \ T \ \ \ S \ T \ T \ S" shows "\\ \ {}" -proof - +proof%unimportant - have "B \ \\ \ {}" proof (rule compact_imp_fip) show "compact B" "\T. T \ \ \ closed T" @@ -824,12 +824,12 @@ then show ?thesis by blast qed -corollary compact_chain: +corollary%important compact_chain: fixes \ :: "'a::heine_borel set set" assumes "\S. S \ \ \ compact S" "{} \ \" "\S T. S \ \ \ T \ \ \ S \ T \ T \ S" shows "\ \ \ {}" -proof (cases "\ = {}") +proof%unimportant (cases "\ = {}") case True then show ?thesis by auto next @@ -852,12 +852,12 @@ qed text\The Baire property of dense sets\ -theorem Baire: +theorem%important Baire: fixes S::"'a::{real_normed_vector,heine_borel} set" assumes "closed S" "countable \" and ope: "\T. T \ \ \ openin (subtopology euclidean S) T \ S \ closure T" shows "S \ closure(\\)" -proof (cases "\ = {}") +proof%unimportant (cases "\ = {}") case True then show ?thesis using closure_subset by auto @@ -961,7 +961,7 @@ qed qed -subsection\Some theorems on sups and infs using the notion "bounded".\ +subsection%unimportant \Some theorems on sups and infs using the notion "bounded".\ lemma bounded_real: "bounded (S::real set) \ (\a. \x\S. \x\ \ a)" by (simp add: bounded_iff) @@ -1139,7 +1139,7 @@ qed -subsection\Relations among convergence and absolute convergence for power series.\ +subsection%unimportant\Relations among convergence and absolute convergence for power series.\ lemma summable_imp_bounded: fixes f :: "nat \ 'a::real_normed_vector" @@ -1166,7 +1166,7 @@ done qed -subsection \Bounded closed nest property (proof does not use Heine-Borel)\ +subsection%unimportant \Bounded closed nest property (proof does not use Heine-Borel)\ lemma bounded_closed_nest: fixes s :: "nat \ ('a::heine_borel) set" @@ -1286,7 +1286,7 @@ subsection \Infimum Distance\ -definition "infdist x A = (if A = {} then 0 else INF a:A. dist x a)" +definition%important "infdist x A = (if A = {} then 0 else INF a:A. dist x a)" lemma bdd_below_image_dist[intro, simp]: "bdd_below (dist x ` A)" by (auto intro!: zero_le_dist) @@ -1515,7 +1515,7 @@ by (simp add: compact_eq_bounded_closed) qed -subsection \Equality of continuous functions on closure and related results.\ +subsection%unimportant \Equality of continuous functions on closure and related results.\ lemma continuous_closedin_preimage_constant: fixes f :: "_ \ 'b::t1_space" @@ -1618,7 +1618,7 @@ qed qed -subsection \A function constant on a set\ +subsection%unimportant \A function constant on a set\ definition constant_on (infixl "(constant'_on)" 50) where "f constant_on A \ \y. \x\A. f x = y" @@ -1639,7 +1639,7 @@ using continuous_constant_on_closure [OF contf] cof unfolding constant_on_def by metis -subsection\Relating linear images to open/closed/interior/closure\ +subsection%unimportant\Relating linear images to open/closed/interior/closure\ proposition open_surjective_linear_image: fixes f :: "'a::real_normed_vector \ 'b::euclidean_space" @@ -1786,7 +1786,7 @@ qed qed -subsection\ Theorems relating continuity and uniform continuity to closures\ +subsection%unimportant\ Theorems relating continuity and uniform continuity to closures\ lemma continuous_on_closure: "continuous_on (closure S) f \ @@ -2047,7 +2047,7 @@ shows "bounded(f ` S)" by (metis (no_types, lifting) assms bounded_closure_image compact_closure compact_continuous_image compact_eq_bounded_closed image_cong uniformly_continuous_imp_continuous uniformly_continuous_on_extension_on_closure) -subsection \Making a continuous function avoid some value in a neighbourhood.\ +subsection%unimportant \Making a continuous function avoid some value in a neighbourhood.\ lemma continuous_within_avoid: fixes f :: "'a::metric_space \ 'b::t1_space" @@ -2097,7 +2097,7 @@ using continuous_at_avoid[of x f a] assms(4) by auto -subsection\Quotient maps\ +subsection%unimportant\Quotient maps\ lemma quotient_map_imp_continuous_open: assumes T: "f ` S \ T" @@ -2447,15 +2447,15 @@ ultimately show ?thesis using that by blast qed -corollary compact_uniformly_continuous: +corollary%important compact_uniformly_continuous: fixes f :: "'a :: metric_space \ 'b :: metric_space" assumes f: "continuous_on S f" and S: "compact S" shows "uniformly_continuous_on S f" - using f + using%unimportant f unfolding continuous_on_iff uniformly_continuous_on_def by (force intro: compact_uniformly_equicontinuous [OF S, of "{f}"]) -subsection \Topological stuff about the set of Reals\ +subsection%unimportant \Topological stuff about the set of Reals\ lemma open_real: fixes s :: "real set" @@ -2492,7 +2492,7 @@ unfolding continuous_on_iff dist_norm by simp -subsection \Cartesian products\ +subsection%unimportant \Cartesian products\ lemma bounded_Times: assumes "bounded s" "bounded t" @@ -2668,7 +2668,7 @@ subsection \The diameter of a set.\ -definition diameter :: "'a::metric_space set \ real" where +definition%important diameter :: "'a::metric_space set \ real" where "diameter S = (if S = {} then 0 else SUP (x,y):S\S. dist x y)" lemma diameter_empty [simp]: "diameter{} = 0" @@ -2933,11 +2933,11 @@ subsection \Separation between points and sets\ -lemma separate_point_closed: +lemma%important separate_point_closed: fixes s :: "'a::heine_borel set" assumes "closed s" and "a \ s" shows "\d>0. \x\s. d \ dist a x" -proof (cases "s = {}") +proof%unimportant (cases "s = {}") case True then show ?thesis by(auto intro!: exI[where x=1]) next @@ -2948,12 +2948,12 @@ by blast qed -lemma separate_compact_closed: +lemma%important separate_compact_closed: fixes s t :: "'a::heine_borel set" assumes "compact s" and t: "closed t" "s \ t = {}" shows "\d>0. \x\s. \y\t. d \ dist x y" -proof cases +proof%unimportant cases assume "s \ {} \ t \ {}" then have "s \ {}" "t \ {}" by auto let ?inf = "\x. infdist x t" @@ -2968,27 +2968,27 @@ ultimately show ?thesis by auto qed (auto intro!: exI[of _ 1]) -lemma separate_closed_compact: +lemma%important separate_closed_compact: fixes s t :: "'a::heine_borel set" assumes "closed s" and "compact t" and "s \ t = {}" shows "\d>0. \x\s. \y\t. d \ dist x y" -proof - +proof%unimportant - have *: "t \ s = {}" using assms(3) by auto show ?thesis using separate_compact_closed[OF assms(2,1) *] by (force simp: dist_commute) qed -lemma compact_in_open_separated: +lemma%important compact_in_open_separated: fixes A::"'a::heine_borel set" assumes "A \ {}" assumes "compact A" assumes "open B" assumes "A \ B" obtains e where "e > 0" "{x. infdist x A \ e} \ B" -proof atomize_elim +proof%unimportant atomize_elim have "closed (- B)" "compact A" "- B \ A = {}" using assms by (auto simp: open_Diff compact_eq_bounded_closed) from separate_closed_compact[OF this] @@ -3014,7 +3014,7 @@ qed -subsection \Compact sets and the closure operation.\ +subsection%unimportant \Compact sets and the closure operation.\ lemma closed_scaling: fixes S :: "'a::real_normed_vector set" @@ -3165,7 +3165,7 @@ done -subsection \Closure of halfspaces and hyperplanes\ +subsection%unimportant \Closure of halfspaces and hyperplanes\ lemma continuous_on_closed_Collect_le: fixes f g :: "'a::t2_space \ real" @@ -3492,7 +3492,7 @@ subsection \Homeomorphisms\ -definition "homeomorphism s t f g \ +definition%important "homeomorphism s t f g \ (\x\s. (g(f x) = x)) \ (f ` s = t) \ continuous_on s f \ (\y\t. (f(g y) = y)) \ (g ` t = s) \ continuous_on t g" @@ -3812,7 +3812,7 @@ using assms unfolding homeomorphic_def homeomorphism_def by (metis connected_continuous_image) -subsection\Inverse function property for open/closed maps\ +subsection%unimportant\Inverse function property for open/closed maps\ lemma continuous_on_inverse_open_map: assumes contf: "continuous_on S f" @@ -3963,12 +3963,12 @@ unfolding complete_def by auto qed -lemma injective_imp_isometric: +lemma%important injective_imp_isometric: fixes f :: "'a::euclidean_space \ 'b::euclidean_space" assumes s: "closed s" "subspace s" and f: "bounded_linear f" "\x\s. f x = 0 \ x = 0" shows "\e>0. \x\s. norm (f x) \ e * norm x" -proof (cases "s \ {0::'a}") +proof%unimportant (cases "s \ {0::'a}") case True have "norm x \ norm (f x)" if "x \ s" for x proof - @@ -4036,11 +4036,11 @@ ultimately show ?thesis by auto qed -lemma closed_injective_image_subspace: +lemma%important closed_injective_image_subspace: fixes f :: "'a::euclidean_space \ 'b::euclidean_space" assumes "subspace s" "bounded_linear f" "\x\s. f x = 0 \ x = 0" "closed s" shows "closed(f ` s)" -proof - +proof%unimportant - obtain e where "e > 0" and e: "\x\s. e * norm x \ norm (f x)" using injective_imp_isometric[OF assms(4,1,2,3)] by auto show ?thesis @@ -4049,7 +4049,7 @@ qed -subsection \Some properties of a canonical subspace\ +subsection%unimportant \Some properties of a canonical subspace\ lemma subspace_substandard: "subspace {x::'a::euclidean_space. (\i\Basis. P i \ x\i = 0)}" by (auto simp: subspace_def inner_add_left) @@ -4157,7 +4157,7 @@ qed -subsection \Affine transformations of intervals\ +subsection%unimportant \Affine transformations of intervals\ lemma real_affinity_le: "0 < m \ m * x + c \ y \ x \ inverse m * y + - (c / m)" for m :: "'a::linordered_field" @@ -4186,13 +4186,13 @@ subsection \Banach fixed point theorem (not really topological ...)\ -theorem banach_fix: +theorem%important banach_fix: assumes s: "complete s" "s \ {}" and c: "0 \ c" "c < 1" and f: "f ` s \ s" and lipschitz: "\x\s. \y\s. dist (f x) (f y) \ c * dist x y" shows "\!x\s. f x = x" -proof - +proof%unimportant - from c have "1 - c > 0" by simp from s(2) obtain z0 where z0: "z0 \ s" by blast @@ -4342,13 +4342,13 @@ subsection \Edelstein fixed point theorem\ -theorem edelstein_fix: +theorem%important edelstein_fix: fixes s :: "'a::metric_space set" assumes s: "compact s" "s \ {}" and gs: "(g ` s) \ s" and dist: "\x\s. \y\s. x \ y \ dist (g x) (g y) < dist x y" shows "\!x\s. g x = x" -proof - +proof%unimportant - let ?D = "(\x. (x, x)) ` s" have D: "compact ?D" "?D \ {}" by (rule compact_continuous_image) @@ -4697,10 +4697,10 @@ done qed -proposition separable: +proposition%important separable: fixes S :: "'a:: euclidean_space set" obtains T where "countable T" "T \ S" "S \ closure T" -proof - +proof%unimportant - obtain \ :: "'a:: euclidean_space set set" where "countable \" and "{} \ \" @@ -4743,11 +4743,11 @@ qed qed -proposition Lindelof: +proposition%important Lindelof: fixes \ :: "'a::euclidean_space set set" assumes \: "\S. S \ \ \ open S" obtains \' where "\' \ \" "countable \'" "\\' = \\" -proof - +proof%unimportant - obtain \ :: "'a set set" where "countable \" "\C. C \ \ \ open C" and \: "\S. open S \ \U. U \ \ \ S = \U" @@ -5049,11 +5049,11 @@ qed -proposition component_diff_connected: +proposition%important component_diff_connected: fixes S :: "'a::metric_space set" assumes "connected S" "connected U" "S \ U" and C: "C \ components (U - S)" shows "connected(U - C)" - using \connected S\ unfolding connected_closedin_eq not_ex de_Morgan_conj + using%unimportant \connected S\ unfolding connected_closedin_eq not_ex de_Morgan_conj proof clarify fix H3 H4 assume clo3: "closedin (subtopology euclidean (U - C)) H3" @@ -5093,7 +5093,7 @@ by auto qed -subsection\ Finite intersection property\ +subsection%unimportant\ Finite intersection property\ text\Also developed in HOL's toplogical spaces theory, but the Heine-Borel type class isn't available there.\ @@ -5149,7 +5149,7 @@ by (simp add: closed_limpt islimpt_insert sequence_unique_limpt) -subsection\Componentwise limits and continuity\ +subsection%unimportant\Componentwise limits and continuity\ text\But is the premise really necessary? Need to generalise @{thm euclidean_dist_l2}\ lemma Euclidean_dist_upper: "i \ Basis \ dist (x \ i) (y \ i) \ dist x y" @@ -5179,11 +5179,11 @@ by (metis (no_types, lifting) \0 < e\ \open S\ half_gt_zero_iff mem_Collect_eq mem_ball open_contains_ball_eq subsetI) qed -proposition tendsto_componentwise_iff: +proposition%important tendsto_componentwise_iff: fixes f :: "_ \ 'b::euclidean_space" shows "(f \ l) F \ (\i \ Basis. ((\x. (f x \ i)) \ (l \ i)) F)" (is "?lhs = ?rhs") -proof +proof%unimportant assume ?lhs then show ?rhs unfolding tendsto_def @@ -5267,9 +5267,9 @@ by (force simp: bounded_linear_def bounded_linear_axioms_def \linear f'\) qed -subsection\Pasting functions together\ - -subsubsection\on open sets\ +subsection%unimportant\Pasting functions together\ + +subsubsection%unimportant\on open sets\ lemma pasting_lemma: fixes f :: "'i \ 'a::topological_space \ 'b::topological_space" @@ -5311,7 +5311,7 @@ by (metis (no_types, lifting) IntD2 IntI f someI_ex) qed -subsubsection\Likewise on closed sets, with a finiteness assumption\ +subsubsection%unimportant\Likewise on closed sets, with a finiteness assumption\ lemma pasting_lemma_closed: fixes f :: "'i \ 'a::topological_space \ 'b::topological_space" @@ -5436,7 +5436,7 @@ qed -subsection\Constancy of a function from a connected set into a finite, disconnected or discrete set\ +subsection%unimportant\Constancy of a function from a connected set into a finite, disconnected or discrete set\ text\Still missing: versions for a set that is smaller than R, or countable.\ @@ -5595,7 +5595,7 @@ -subsection \Continuous Extension\ +subsection%unimportant \Continuous Extension\ definition clamp :: "'a::euclidean_space \ 'a \ 'a \ 'a" where "clamp a b x = (if (\i\Basis. a \ i \ b \ i) diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Continuous_Extension.thy --- a/src/HOL/Analysis/Continuous_Extension.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Continuous_Extension.thy Fri Apr 06 17:34:50 2018 +0200 @@ -13,7 +13,7 @@ text\A difference from HOL Light: all summations over infinite sets equal zero, so the "support" must be made explicit in the summation below!\ -proposition subordinate_partition_of_unity: +proposition%important subordinate_partition_of_unity: fixes S :: "'a :: euclidean_space set" assumes "S \ \\" and opC: "\T. T \ \ \ open T" and fin: "\x. x \ S \ \V. open V \ x \ V \ finite {U \ \. U \ V \ {}}" @@ -22,7 +22,7 @@ and "\x U. \U \ \; x \ S; x \ U\ \ F U x = 0" and "\x. x \ S \ supp_sum (\W. F W x) \ = 1" and "\x. x \ S \ \V. open V \ x \ V \ finite {U \ \. \x\V. F U x \ 0}" -proof (cases "\W. W \ \ \ S \ W") +proof%unimportant (cases "\W. W \ \ \ S \ W") case True then obtain W where "W \ \" "S \ W" by metis then show ?thesis @@ -283,7 +283,7 @@ "\x. f x = b \ x \ T" using assms by (auto intro: Urysohn_local_strong [of UNIV S T]) -proposition Urysohn: +proposition%important Urysohn: assumes US: "closed S" and UT: "closed T" and "S \ T = {}" @@ -292,22 +292,22 @@ "\x. f x \ closed_segment a b" "\x. x \ S \ f x = a" "\x. x \ T \ f x = b" -using assms by (auto intro: Urysohn_local [of UNIV S T a b]) +using%unimportant assms by (auto intro: Urysohn_local [of UNIV S T a b]) subsection\ The Dugundji extension theorem, and Tietze variants as corollaries.\ -text\J. Dugundji. An extension of Tietze's theorem. Pacific J. Math. Volume 1, Number 3 (1951), 353-367. +text%important\J. Dugundji. An extension of Tietze's theorem. Pacific J. Math. Volume 1, Number 3 (1951), 353-367. http://projecteuclid.org/euclid.pjm/1103052106\ -theorem Dugundji: +theorem%important Dugundji: fixes f :: "'a::euclidean_space \ 'b::real_inner" assumes "convex C" "C \ {}" and cloin: "closedin (subtopology euclidean U) S" and contf: "continuous_on S f" and "f ` S \ C" obtains g where "continuous_on U g" "g ` U \ C" "\x. x \ S \ g x = f x" -proof (cases "S = {}") +proof%unimportant (cases "S = {}") case True then show thesis apply (rule_tac g="\x. SOME y. y \ C" in that) apply (rule continuous_intros) @@ -475,7 +475,7 @@ qed -corollary Tietze: +corollary%important Tietze: fixes f :: "'a::euclidean_space \ 'b::real_inner" assumes "continuous_on S f" and "closedin (subtopology euclidean U) S" @@ -483,7 +483,7 @@ and "\x. x \ S \ norm(f x) \ B" obtains g where "continuous_on U g" "\x. x \ S \ g x = f x" "\x. x \ U \ norm(g x) \ B" -using assms +using%unimportant assms by (auto simp: image_subset_iff intro: Dugundji [of "cball 0 B" U S f]) corollary Tietze_closed_interval: diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Continuum_Not_Denumerable.thy --- a/src/HOL/Analysis/Continuum_Not_Denumerable.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Continuum_Not_Denumerable.thy Fri Apr 06 17:34:50 2018 +0200 @@ -11,7 +11,7 @@ "HOL-Library.Countable_Set" begin -subsection \Abstract\ +subsection%unimportant \Abstract\ text \ The following document presents a proof that the Continuum is uncountable. @@ -33,8 +33,8 @@ Nested Interval Property. \ -theorem real_non_denum: "\f :: nat \ real. surj f" -proof +theorem%important real_non_denum: "\f :: nat \ real. surj f" +proof%unimportant assume "\f::nat \ real. surj f" then obtain f :: "nat \ real" where "surj f" .. diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Convex_Euclidean_Space.thy --- a/src/HOL/Analysis/Convex_Euclidean_Space.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Convex_Euclidean_Space.thy Fri Apr 06 17:34:50 2018 +0200 @@ -177,7 +177,7 @@ subsection \Convexity\ -definition convex :: "'a::real_vector set \ bool" +definition%important convex :: "'a::real_vector set \ bool" where "convex s \ (\x\s. \y\s. \u\0. \v\0. u + v = 1 \ u *\<^sub>R x + v *\<^sub>R y \ s)" lemma convexI: @@ -350,7 +350,7 @@ by (simp add: convex_def scaleR_conv_of_real) -subsection \Explicit expressions for convexity in terms of arbitrary sums\ +subsection%unimportant \Explicit expressions for convexity in terms of arbitrary sums\ lemma convex_sum: fixes C :: "'a::real_vector set" @@ -503,7 +503,7 @@ subsection \Functions that are convex on a set\ -definition convex_on :: "'a::real_vector set \ ('a \ real) \ bool" +definition%important convex_on :: "'a::real_vector set \ ('a \ real) \ bool" where "convex_on s f \ (\x\s. \y\s. \u\0. \v\0. u + v = 1 \ f (u *\<^sub>R x + v *\<^sub>R y) \ u * f x + v * f y)" @@ -624,7 +624,7 @@ qed -subsection \Arithmetic operations on sets preserve convexity\ +subsection%unimportant \Arithmetic operations on sets preserve convexity\ lemma convex_linear_image: assumes "linear f" @@ -1087,7 +1087,7 @@ qed -subsection \Convexity of real functions\ +subsection%unimportant \Convexity of real functions\ lemma convex_on_realI: assumes "connected A" @@ -1406,7 +1406,7 @@ subsection \Affine set and affine hull\ -definition affine :: "'a::real_vector set \ bool" +definition%important affine :: "'a::real_vector set \ bool" where "affine s \ (\x\s. \y\s. \u v. u + v = 1 \ u *\<^sub>R x + v *\<^sub>R y \ s)" lemma affine_alt: "affine s \ (\x\s. \y\s. \u::real. (1 - u) *\<^sub>R x + u *\<^sub>R y \ s)" @@ -1444,7 +1444,7 @@ by (simp add: affine_def algebra_simps) (metis distrib_right mult.left_neutral) -subsubsection \Some explicit formulations (from Lars Schewe)\ +subsubsection%unimportant \Some explicit formulations (from Lars Schewe)\ lemma affine: fixes V::"'a::real_vector set" @@ -1668,7 +1668,7 @@ qed -subsubsection \Stepping theorems and hence small special cases\ +subsubsection%unimportant \Stepping theorems and hence small special cases\ lemma affine_hull_empty[simp]: "affine hull {} = {}" by (rule hull_unique) auto @@ -1806,7 +1806,7 @@ by (metis add_uminus_conv_diff mem_affine_3_minus real_vector.scale_minus_left) -subsubsection \Some relations between affine hull and subspaces\ +subsubsection%unimportant \Some relations between affine hull and subspaces\ lemma affine_hull_insert_subset_span: "affine hull (insert a s) \ {a + v| v . v \ span {x - a | x . x \ s}}" @@ -1867,7 +1867,7 @@ using affine_hull_insert_span[of a "s - {a}", unfolded insert_Diff[OF assms]] by auto -subsubsection \Parallel affine sets\ +subsubsection%unimportant \Parallel affine sets\ definition affine_parallel :: "'a::real_vector set \ 'a::real_vector set \ bool" where "affine_parallel S T \ (\a. T = (\x. a + x) ` S)" @@ -1974,7 +1974,7 @@ unfolding subspace_def affine_def by auto -subsubsection \Subspace parallel to an affine set\ +subsubsection%unimportant \Subspace parallel to an affine set\ lemma subspace_affine: "subspace S \ affine S \ 0 \ S" proof - @@ -2100,7 +2100,7 @@ subsection \Cones\ -definition cone :: "'a::real_vector set \ bool" +definition%important cone :: "'a::real_vector set \ bool" where "cone s \ (\x\s. \c\0. c *\<^sub>R x \ s)" lemma cone_empty[intro, simp]: "cone {}" @@ -2214,9 +2214,9 @@ shows "c *\<^sub>R x \ cone hull S" by (metis assms cone_cone_hull hull_inc mem_cone) -lemma cone_hull_expl: "cone hull S = {c *\<^sub>R x | c x. c \ 0 \ x \ S}" +lemma%important cone_hull_expl: "cone hull S = {c *\<^sub>R x | c x. c \ 0 \ x \ S}" (is "?lhs = ?rhs") -proof - +proof%unimportant - { fix x assume "x \ ?rhs" @@ -2282,7 +2282,7 @@ subsection \Affine dependence and consequential theorems (from Lars Schewe)\ -definition affine_dependent :: "'a::real_vector set \ bool" +definition%important affine_dependent :: "'a::real_vector set \ bool" where "affine_dependent s \ (\x\s. x \ affine hull (s - {x}))" lemma affine_dependent_subset: @@ -2299,11 +2299,11 @@ "~ affine_dependent s \ ~ affine_dependent(s - t)" by (meson Diff_subset affine_dependent_subset) -lemma affine_dependent_explicit: +lemma%important affine_dependent_explicit: "affine_dependent p \ (\s u. finite s \ s \ p \ sum u s = 0 \ (\v\s. u v \ 0) \ sum (\v. u v *\<^sub>R v) s = 0)" - unfolding affine_dependent_def affine_hull_explicit mem_Collect_eq + unfolding%unimportant affine_dependent_def affine_hull_explicit mem_Collect_eq apply rule apply (erule bexE, erule exE, erule exE) apply (erule conjE)+ @@ -2365,7 +2365,7 @@ qed -subsection \Connectedness of convex sets\ +subsection%unimportant \Connectedness of convex sets\ lemma connectedD: "connected S \ open A \ open B \ S \ A \ B \ A \ B \ S = {} \ A \ S = {} \ B \ S = {}" @@ -2558,7 +2558,7 @@ by auto -subsubsection \Convex hull is "preserved" by a linear function\ +subsubsection%unimportant \Convex hull is "preserved" by a linear function\ lemma convex_hull_linear_image: assumes f: "linear f" @@ -2616,7 +2616,7 @@ qed -subsubsection \Stepping theorems for convex hulls of finite sets\ +subsubsection%unimportant \Stepping theorems for convex hulls of finite sets\ lemma convex_hull_empty[simp]: "convex hull {} = {}" by (rule hull_unique) auto @@ -2742,16 +2742,16 @@ using diff_eq_eq apply fastforce by (metis add.group_left_neutral add_le_imp_le_diff diff_add_cancel) -subsubsection \Explicit expression for convex hull\ - -lemma convex_hull_indexed: +subsubsection%unimportant \Explicit expression for convex hull\ + +lemma%important convex_hull_indexed: fixes s :: "'a::real_vector set" shows "convex hull s = {y. \k u x. (\i\{1::nat .. k}. 0 \ u i \ x i \ s) \ (sum u {1..k} = 1) \ (sum (\i. u i *\<^sub>R x i) {1..k} = y)}" (is "?xyz = ?hull") - apply (rule hull_unique) + apply%unimportant (rule hull_unique) apply rule defer apply (rule convexI) @@ -2887,7 +2887,7 @@ qed -subsubsection \Another formulation from Lars Schewe\ +subsubsection%unimportant \Another formulation from Lars Schewe\ lemma convex_hull_explicit: fixes p :: "'a::real_vector set" @@ -2991,7 +2991,7 @@ qed -subsubsection \A stepping theorem for that expansion\ +subsubsection%unimportant \A stepping theorem for that expansion\ lemma convex_hull_finite_step: fixes s :: "'a::real_vector set" @@ -3061,7 +3061,7 @@ qed -subsubsection \Hence some special cases\ +subsubsection%unimportant \Hence some special cases\ lemma convex_hull_2: "convex hull {a,b} = {u *\<^sub>R a + v *\<^sub>R b | u v. 0 \ u \ 0 \ v \ u + v = 1}" @@ -3141,7 +3141,7 @@ qed -subsection \Relations among closure notions and corresponding hulls\ +subsection%unimportant \Relations among closure notions and corresponding hulls\ lemma affine_imp_convex: "affine s \ convex s" unfolding affine_def convex_def by auto @@ -3306,7 +3306,7 @@ qed -subsection \Some Properties of Affine Dependent Sets\ +subsection%unimportant \Some Properties of Affine Dependent Sets\ lemma affine_independent_0 [simp]: "\ affine_dependent {}" by (simp add: affine_dependent_def) @@ -3546,7 +3546,7 @@ subsection \Affine Dimension of a Set\ -definition aff_dim :: "('a::euclidean_space) set \ int" +definition%important aff_dim :: "('a::euclidean_space) set \ int" where "aff_dim V = (SOME d :: int. \B. affine hull B = affine hull V \ \ affine_dependent B \ of_nat (card B) = d + 1)" @@ -4417,11 +4417,11 @@ by (auto simp add: convex_hull_explicit) qed -theorem caratheodory: +theorem%important caratheodory: "convex hull p = {x::'a::euclidean_space. \s. finite s \ s \ p \ card s \ DIM('a) + 1 \ x \ convex hull s}" -proof safe +proof%unimportant safe fix x assume "x \ convex hull p" then obtain s u where "finite s" "s \ p" "card s \ DIM('a) + 1" @@ -4444,7 +4444,7 @@ subsection \Relative interior of a set\ -definition "rel_interior S = +definition%important "rel_interior S = {x. \T. openin (subtopology euclidean (affine hull S)) T \ x \ T \ T \ S}" lemma rel_interior_mono: @@ -4769,7 +4769,7 @@ subsubsection \Relative open sets\ -definition "rel_open S \ rel_interior S = S" +definition%important "rel_open S \ rel_interior S = S" lemma rel_open: "rel_open S \ openin (subtopology euclidean (affine hull S)) S" unfolding rel_open_def rel_interior_def @@ -4970,7 +4970,7 @@ qed -subsubsection\Relative interior preserves under linear transformations\ +subsubsection%unimportant\Relative interior preserves under linear transformations\ lemma rel_interior_translation_aux: fixes a :: "'n::euclidean_space" @@ -5134,7 +5134,7 @@ by auto -subsection\Some Properties of subset of standard basis\ +subsection%unimportant\Some Properties of subset of standard basis\ lemma affine_hull_substd_basis: assumes "d \ Basis" @@ -5151,7 +5151,7 @@ by (metis Int_absorb1 Int_absorb2 convex_hull_subset_affine_hull hull_hull hull_mono hull_subset) -subsection \Openness and compactness are preserved by convex hull operation.\ +subsection%unimportant \Openness and compactness are preserved by convex hull operation.\ lemma open_convex_hull[intro]: fixes s :: "'a::real_normed_vector set" @@ -5422,7 +5422,7 @@ qed -subsection \Extremal points of a simplex are some vertices.\ +subsection%unimportant \Extremal points of a simplex are some vertices.\ lemma dist_increases_online: fixes a b d :: "'a::real_inner" @@ -5623,7 +5623,7 @@ subsection \Closest point of a convex set is unique, with a continuous projection.\ -definition closest_point :: "'a::{real_inner,heine_borel} set \ 'a \ 'a" +definition%important closest_point :: "'a::{real_inner,heine_borel} set \ 'a \ 'a" where "closest_point s a = (SOME x. x \ s \ (\y\s. dist a x \ dist a y))" lemma closest_point_exists: @@ -5811,7 +5811,7 @@ qed -subsubsection \Various point-to-set separating/supporting hyperplane theorems.\ +subsubsection%unimportant \Various point-to-set separating/supporting hyperplane theorems.\ lemma supporting_hyperplane_closed_point: fixes z :: "'a::{real_inner,heine_borel}" @@ -5933,7 +5933,7 @@ qed -subsubsection \Now set-to-set for closed/compact sets\ +subsubsection%unimportant \Now set-to-set for closed/compact sets\ lemma separating_hyperplane_closed_compact: fixes S :: "'a::euclidean_space set" @@ -6024,7 +6024,7 @@ qed -subsubsection \General case without assuming closure and getting non-strict separation\ +subsubsection%unimportant \General case without assuming closure and getting non-strict separation\ lemma separating_hyperplane_set_0: assumes "convex s" "(0::'a::euclidean_space) \ s" @@ -6082,7 +6082,7 @@ qed -subsection \More convexity generalities\ +subsection%unimportant \More convexity generalities\ lemma convex_closure [intro,simp]: fixes s :: "'a::real_normed_vector set" @@ -6132,7 +6132,7 @@ using hull_subset[of s convex] convex_hull_empty by auto -subsection \Moving and scaling convex hulls.\ +subsection%unimportant \Moving and scaling convex hulls.\ lemma convex_hull_set_plus: "convex hull (s + t) = convex hull s + convex hull t" @@ -6159,7 +6159,7 @@ by(simp only: image_image[symmetric] convex_hull_scaling convex_hull_translation) -subsection \Convexity of cone hulls\ +subsection%unimportant \Convexity of cone hulls\ lemma convex_cone_hull: assumes "convex S" @@ -6227,7 +6227,7 @@ using \S \ {}\ cone_iff[of "convex hull S"] by auto qed -subsection \Convex set as intersection of halfspaces\ +subsection%unimportant \Convex set as intersection of halfspaces\ lemma convex_halfspace_intersection: fixes s :: "('a::euclidean_space) set" @@ -6381,10 +6381,10 @@ done qed -lemma radon: +theorem%important radon: assumes "affine_dependent c" obtains m p where "m \ c" "p \ c" "m \ p = {}" "(convex hull m) \ (convex hull p) \ {}" -proof - +proof%unimportant - from assms[unfolded affine_dependent_explicit] obtain s u where "finite s" "s \ c" "sum u s = 0" "\v\s. u v \ 0" "(\v\s. u v *\<^sub>R v) = 0" @@ -6503,12 +6503,12 @@ qed auto qed -lemma helly: +theorem%important helly: fixes f :: "'a::euclidean_space set set" assumes "card f \ DIM('a) + 1" "\s\f. convex s" and "\t\f. card t = DIM('a) + 1 \ \t \ {}" shows "\f \ {}" - apply (rule helly_induct) + apply%unimportant (rule helly_induct) using assms apply auto done @@ -6516,7 +6516,7 @@ subsection \Epigraphs of convex functions\ -definition "epigraph s (f :: _ \ real) = {xy. fst xy \ s \ f (fst xy) \ snd xy}" +definition%important "epigraph s (f :: _ \ real) = {xy. fst xy \ s \ f (fst xy) \ snd xy}" lemma mem_epigraph: "(x, y) \ epigraph s f \ x \ s \ f x \ y" unfolding epigraph_def by auto @@ -6545,7 +6545,7 @@ by (simp add: convex_epigraph) -subsubsection \Use this to derive general bound property of convex function\ +subsubsection%unimportant \Use this to derive general bound property of convex function\ lemma convex_on: assumes "convex s" @@ -6572,7 +6572,7 @@ done -subsection \Convexity of general and special intervals\ +subsection%unimportant \Convexity of general and special intervals\ lemma is_interval_convex: fixes s :: "'a::euclidean_space set" @@ -6657,7 +6657,7 @@ "\connected S; aff_dim S \ 0; a \ S\ \ a islimpt S" using aff_dim_sing connected_imp_perfect by blast -subsection \On \real\, \is_interval\, \convex\ and \connected\ are all equivalent.\ +subsection%unimportant \On \real\, \is_interval\, \convex\ and \connected\ are all equivalent.\ lemma mem_is_interval_1_I: fixes a b c::real @@ -6742,7 +6742,7 @@ by (auto simp: is_interval_convex_1 convex_cball) -subsection \Another intermediate value theorem formulation\ +subsection%unimportant \Another intermediate value theorem formulation\ lemma ivt_increasing_component_on_1: fixes f :: "real \ 'a::euclidean_space" @@ -6787,7 +6787,7 @@ by (rule ivt_decreasing_component_on_1) (auto simp: continuous_at_imp_continuous_on) -subsection \A bound within a convex hull, and so an interval\ +subsection%unimportant \A bound within a convex hull, and so an interval\ lemma convex_on_convex_hull_bound: assumes "convex_on (convex hull s) f" @@ -6992,7 +6992,7 @@ done qed -subsubsection\Representation of any interval as a finite convex hull\ +subsubsection%unimportant\Representation of any interval as a finite convex hull\ lemma image_stretch_interval: "(\x. \k\Basis. (m k * (x\k)) *\<^sub>R k) ` cbox a (b::'a::euclidean_space) = @@ -7069,7 +7069,7 @@ qed -subsection \Bounded convex function on open set is continuous\ +subsection%unimportant \Bounded convex function on open set is continuous\ lemma convex_on_bounded_continuous: fixes s :: "('a::real_normed_vector) set" @@ -7186,7 +7186,7 @@ qed -subsection \Upper bound on a ball implies upper and lower bounds\ +subsection%unimportant \Upper bound on a ball implies upper and lower bounds\ lemma convex_bounds_lemma: fixes x :: "'a::real_normed_vector" @@ -7220,7 +7220,7 @@ qed -subsubsection \Hence a convex function on an open set is continuous\ +subsubsection%unimportant \Hence a convex function on an open set is continuous\ lemma real_of_nat_ge_one_iff: "1 \ real (n::nat) \ 1 \ n" by auto diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Euclidean_Space.thy --- a/src/HOL/Analysis/Euclidean_Space.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Euclidean_Space.thy Fri Apr 06 17:34:50 2018 +0200 @@ -12,7 +12,7 @@ subsection \Type class of Euclidean spaces\ -class euclidean_space = real_inner + +class%important euclidean_space = real_inner + fixes Basis :: "'a set" assumes nonempty_Basis [simp]: "Basis \ {}" assumes finite_Basis [simp]: "finite Basis" @@ -152,7 +152,7 @@ using False by (auto simp: inner_sum_left) qed -subsection \Subclass relationships\ +subsection%unimportant \Subclass relationships\ instance euclidean_space \ perfect_space proof @@ -175,9 +175,9 @@ subsection \Class instances\ -subsubsection \Type @{typ real}\ +subsubsection%unimportant \Type @{typ real}\ -instantiation real :: euclidean_space +instantiation%important real :: euclidean_space begin definition @@ -191,9 +191,9 @@ lemma DIM_real[simp]: "DIM(real) = 1" by simp -subsubsection \Type @{typ complex}\ +subsubsection%unimportant \Type @{typ complex}\ -instantiation complex :: euclidean_space +instantiation%important complex :: euclidean_space begin definition Basis_complex_def: "Basis = {1, \}" @@ -206,9 +206,9 @@ lemma DIM_complex[simp]: "DIM(complex) = 2" unfolding Basis_complex_def by simp -subsubsection \Type @{typ "'a \ 'b"}\ +subsubsection%unimportant \Type @{typ "'a \ 'b"}\ -instantiation prod :: (euclidean_space, euclidean_space) euclidean_space +instantiation%important prod :: (euclidean_space, euclidean_space) euclidean_space begin definition diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Inner_Product.thy --- a/src/HOL/Analysis/Inner_Product.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Inner_Product.thy Fri Apr 06 17:34:50 2018 +0200 @@ -27,7 +27,7 @@ setup \Sign.add_const_constraint (@{const_name norm}, SOME @{typ "'a::norm \ real"})\ -class real_inner = real_vector + sgn_div_norm + dist_norm + uniformity_dist + open_uniformity + +class%important real_inner = real_vector + sgn_div_norm + dist_norm + uniformity_dist + open_uniformity + fixes inner :: "'a \ 'a \ real" assumes inner_commute: "inner x y = inner y x" and inner_add_left: "inner (x + y) z = inner x z + inner y z" @@ -236,7 +236,7 @@ subsection \Class instances\ -instantiation real :: real_inner +instantiation%important real :: real_inner begin definition inner_real_def [simp]: "inner = ( * )" @@ -265,7 +265,7 @@ and real_inner_1_right[simp]: "inner x 1 = x" by simp_all -instantiation complex :: real_inner +instantiation%important complex :: real_inner begin definition inner_complex_def: @@ -357,7 +357,7 @@ subsection \Gradient derivative\ -definition +definition%important gderiv :: "['a::real_inner \ real, 'a, 'a] \ bool" ("(GDERIV (_)/ (_)/ :> (_))" [1000, 1000, 60] 60) diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Linear_Algebra.thy --- a/src/HOL/Analysis/Linear_Algebra.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Linear_Algebra.thy Fri Apr 06 17:34:50 2018 +0200 @@ -36,7 +36,7 @@ subsection \A generic notion of "hull" (convex, affine, conic hull and closure).\ -definition hull :: "('a set \ bool) \ 'a set \ 'a set" (infixl "hull" 75) +definition%important hull :: "('a set \ bool) \ 'a set \ 'a set" (infixl "hull" 75) where "S hull s = \{t. S t \ s \ t}" lemma hull_same: "S s \ S hull s = s" @@ -109,10 +109,10 @@ subsection \Linear functions.\ -lemma linear_iff: +lemma%important linear_iff: "linear f \ (\x y. f (x + y) = f x + f y) \ (\c x. f (c *\<^sub>R x) = c *\<^sub>R f x)" (is "linear f \ ?rhs") -proof +proof%unimportant assume "linear f" then interpret f: linear f . show "?rhs" by (simp add: f.add f.scaleR) @@ -230,11 +230,11 @@ subsection \Subspaces of vector spaces\ -definition (in real_vector) subspace :: "'a set \ bool" +definition%important (in real_vector) subspace :: "'a set \ bool" where "subspace S \ 0 \ S \ (\x \ S. \y \ S. x + y \ S) \ (\c. \x \ S. c *\<^sub>R x \ S)" -definition (in real_vector) "span S = (subspace hull S)" -definition (in real_vector) "dependent S \ (\a \ S. a \ span (S - {a}))" +definition%important (in real_vector) "span S = (subspace hull S)" +definition%important (in real_vector) "dependent S \ (\a \ S. a \ span (S - {a}))" abbreviation (in real_vector) "independent s \ \ dependent s" text \Closure properties of subspaces.\ @@ -284,7 +284,7 @@ apply (metis add.assoc add.left_commute) using scaleR_add_right by blast -subsection \Properties of span\ +subsection%unimportant \Properties of span\ lemma (in real_vector) span_mono: "A \ B \ span A \ span B" by (metis span_def hull_mono) @@ -1351,7 +1351,7 @@ qed -subsection \More interesting properties of the norm.\ +subsection%unimportant \More interesting properties of the norm.\ lemma cond_application_beta: "(if b then f else g) x = (if b then f x else g x)" by auto @@ -1498,11 +1498,11 @@ subsection \Orthogonality.\ +definition%important (in real_inner) "orthogonal x y \ x \ y = 0" + context real_inner begin -definition "orthogonal x y \ x \ y = 0" - lemma orthogonal_self: "orthogonal x x \ x = 0" by (simp add: orthogonal_def) @@ -1567,7 +1567,7 @@ subsection \Bilinear functions.\ -definition "bilinear f \ (\x. linear (\y. f x y)) \ (\y. linear (\x. f x y))" +definition%important "bilinear f \ (\x. linear (\y. f x y)) \ (\y. linear (\x. f x y))" lemma bilinear_ladd: "bilinear h \ h (x + y) z = h x z + h y z" by (simp add: bilinear_def linear_iff) @@ -1630,7 +1630,7 @@ subsection \Adjoints.\ -definition "adjoint f = (SOME f'. \x y. f x \ y = x \ f' y)" +definition%important "adjoint f = (SOME f'. \x y. f x \ y = x \ f' y)" lemma adjoint_unique: assumes "\x y. inner (f x) y = inner x (g y)" @@ -1701,7 +1701,7 @@ by (rule adjoint_unique, simp add: adjoint_clauses [OF lf]) -subsection \Interlude: Some properties of real sets\ +subsection%unimportant \Interlude: Some properties of real sets\ lemma seq_mono_lemma: assumes "\(n::nat) \ m. (d n :: real) < e n" @@ -1754,11 +1754,11 @@ subsection \Archimedean properties and useful consequences\ text\Bernoulli's inequality\ -proposition Bernoulli_inequality: +proposition%important Bernoulli_inequality: fixes x :: real assumes "-1 \ x" shows "1 + n * x \ (1 + x) ^ n" -proof (induct n) +proof%unimportant (induct n) case 0 then show ?case by simp next @@ -1844,7 +1844,7 @@ done -subsection \Euclidean Spaces as Typeclass\ +subsection%unimportant \Euclidean Spaces as Typeclass\ lemma independent_Basis: "independent Basis" unfolding dependent_def @@ -1905,7 +1905,7 @@ qed -subsection \Linearity and Bilinearity continued\ +subsection%unimportant \Linearity and Bilinearity continued\ lemma linear_bounded: fixes f :: "'a::euclidean_space \ 'b::real_normed_vector" @@ -2074,7 +2074,7 @@ by (metis linear_imp_has_derivative differentiable_def) -subsection \We continue.\ +subsection%unimportant \We continue.\ lemma independent_bound: fixes S :: "'a::euclidean_space set" @@ -2879,7 +2879,7 @@ subsection \Infinity norm\ -definition "infnorm (x::'a::euclidean_space) = Sup {\x \ b\ |b. b \ Basis}" +definition%important "infnorm (x::'a::euclidean_space) = Sup {\x \ b\ |b. b \ Basis}" lemma infnorm_set_image: fixes x :: "'a::euclidean_space" @@ -3115,7 +3115,7 @@ subsection \Collinearity\ -definition collinear :: "'a::real_vector set \ bool" +definition%important collinear :: "'a::real_vector set \ bool" where "collinear S \ (\u. \x \ S. \ y \ S. \c. x - y = c *\<^sub>R u)" lemma collinear_alt: diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Measurable.thy --- a/src/HOL/Analysis/Measurable.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Measurable.thy Fri Apr 06 17:34:50 2018 +0200 @@ -1,13 +1,13 @@ (* Title: HOL/Analysis/Measurable.thy Author: Johannes Hölzl *) +section \Measurability prover\ theory Measurable imports Sigma_Algebra "HOL-Library.Order_Continuity" begin -subsection \Measurability prover\ lemma (in algebra) sets_Collect_finite_All: assumes "\i. i \ S \ {x\\. P i x} \ M" "finite S" @@ -64,10 +64,10 @@ attribute_setup measurable_cong = Measurable.cong_thm_attr "add congurence rules to measurability prover" -method_setup measurable = \ Scan.lift (Scan.succeed (METHOD o Measurable.measurable_tac)) \ +method_setup%important measurable = \ Scan.lift (Scan.succeed (METHOD o Measurable.measurable_tac)) \ "measurability prover" -simproc_setup measurable ("A \ sets M" | "f \ measurable M N") = \K Measurable.simproc\ +simproc_setup%important measurable ("A \ sets M" | "f \ measurable M N") = \K Measurable.simproc\ setup \ Global_Theory.add_thms_dynamic (@{binding measurable}, Measurable.get_all) @@ -380,7 +380,7 @@ unfolding pred_def by (auto intro!: sets.sets_Collect_countable_All' sets.sets_Collect_countable_Ex' assms) -subsection \Measurability for (co)inductive predicates\ +subsection%unimportant \Measurability for (co)inductive predicates\ lemma measurable_bot[measurable]: "bot \ measurable M (count_space UNIV)" by (simp add: bot_fun_def) diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Measure_Space.thy --- a/src/HOL/Analysis/Measure_Space.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Measure_Space.thy Fri Apr 06 17:34:50 2018 +0200 @@ -11,7 +11,7 @@ Measurable "HOL-Library.Extended_Nonnegative_Real" begin -subsection "Relate extended reals and the indicator function" +subsection%unimportant "Relate extended reals and the indicator function" lemma suminf_cmult_indicator: fixes f :: "nat \ ennreal" @@ -59,7 +59,7 @@ represent sigma algebras (with an arbitrary emeasure). \ -subsection "Extend binary sets" +subsection%unimportant "Extend binary sets" lemma LIMSEQ_binaryset: assumes f: "f {} = 0" @@ -91,7 +91,7 @@ shows "f {} = 0 \ (\n. f (binaryset A B n)) = f A + f B" by (metis binaryset_sums sums_unique) -subsection \Properties of a premeasure @{term \}\ +subsection%unimportant \Properties of a premeasure @{term \}\ text \ The definitions for @{const positive} and @{const countably_additive} should be here, by they are @@ -442,7 +442,7 @@ using empty_continuous_imp_continuous_from_below[OF f fin] cont by blast -subsection \Properties of @{const emeasure}\ +subsection%unimportant \Properties of @{const emeasure}\ lemma emeasure_positive: "positive (sets M) (emeasure M)" by (cases M) (auto simp: sets_def emeasure_def Abs_measure_inverse measure_space_def) @@ -881,7 +881,7 @@ subsection \\\\-null sets\ -definition null_sets :: "'a measure \ 'a set set" where +definition%important null_sets :: "'a measure \ 'a set set" where "null_sets M = {N\sets M. emeasure M N = 0}" lemma null_setsD1[dest]: "A \ null_sets M \ emeasure M A = 0" @@ -989,7 +989,7 @@ subsection \The almost everywhere filter (i.e.\ quantifier)\ -definition ae_filter :: "'a measure \ 'a filter" where +definition%important ae_filter :: "'a measure \ 'a filter" where "ae_filter M = (INF N:null_sets M. principal (space M - N))" abbreviation almost_everywhere :: "'a measure \ ('a \ bool) \ bool" where @@ -1265,7 +1265,7 @@ subsection \\\\-finite Measures\ -locale sigma_finite_measure = +locale%important sigma_finite_measure = fixes M :: "'a measure" assumes sigma_finite_countable: "\A::'a set set. countable A \ A \ sets M \ (\A) = space M \ (\a\A. emeasure M a \ \)" @@ -1387,7 +1387,7 @@ subsection \Measure space induced by distribution of @{const measurable}-functions\ -definition distr :: "'a measure \ 'b measure \ ('a \ 'b) \ 'b measure" where +definition%important distr :: "'a measure \ 'b measure \ ('a \ 'b) \ 'b measure" where "distr M N f = measure_of (space N) (sets N) (\A. emeasure M (f -` A \ space M))" lemma @@ -1513,12 +1513,12 @@ "f \ measurable M N \ A \ null_sets (distr M N f) \ f -` A \ space M \ null_sets M \ A \ sets N" by (auto simp add: null_sets_def emeasure_distr) -lemma distr_distr: +lemma%important distr_distr: "g \ measurable N L \ f \ measurable M N \ distr (distr M N f) L g = distr M L (g \ f)" by (auto simp add: emeasure_distr measurable_space intro!: arg_cong[where f="emeasure M"] measure_eqI) -subsection \Real measure values\ +subsection%unimportant \Real measure values\ lemma ring_of_finite_sets: "ring_of_sets (space M) {A\sets M. emeasure M A \ top}" proof (rule ring_of_setsI) @@ -1705,7 +1705,7 @@ subsection \Set of measurable sets with finite measure\ -definition fmeasurable :: "'a measure \ 'a set set" +definition%important fmeasurable :: "'a measure \ 'a set set" where "fmeasurable M = {A\sets M. emeasure M A < \}" @@ -1972,7 +1972,7 @@ subsection \Measure spaces with @{term "emeasure M (space M) < \"}\ -locale finite_measure = sigma_finite_measure M for M + +locale%important finite_measure = sigma_finite_measure M for M + assumes finite_emeasure_space: "emeasure M (space M) \ top" lemma finite_measureI[Pure.intro!]: @@ -2194,7 +2194,7 @@ using bound[of x] sets_eq_imp_space_eq[OF sets] by (simp add: iter) qed (auto simp add: iter le_fun_def INF_apply[abs_def] intro!: meas cont) -subsection \Counting space\ +subsection%unimportant \Counting space\ lemma strict_monoI_Suc: assumes ord [simp]: "(\n. f n < f (Suc n))" shows "strict_mono f" @@ -2343,7 +2343,7 @@ show "sigma_finite_measure (count_space A)" .. qed -subsection \Measure restricted to space\ +subsection%unimportant \Measure restricted to space\ lemma emeasure_restrict_space: assumes "\ \ space M \ sets M" "A \ \" @@ -2502,7 +2502,7 @@ finally show "emeasure M X = emeasure N X" . qed fact -subsection \Null measure\ +subsection%unimportant \Null measure\ definition "null_measure M = sigma (space M) (sets M)" @@ -2525,7 +2525,7 @@ subsection \Scaling a measure\ -definition scale_measure :: "ennreal \ 'a measure \ 'a measure" +definition%important scale_measure :: "ennreal \ 'a measure \ 'a measure" where "scale_measure r M = measure_of (space M) (sets M) (\A. r * emeasure M A)" @@ -2703,11 +2703,11 @@ qed auto qed -lemma unsigned_Hahn_decomposition: +lemma%important unsigned_Hahn_decomposition: assumes [simp]: "sets N = sets M" and [measurable]: "A \ sets M" and [simp]: "emeasure M A \ top" "emeasure N A \ top" shows "\Y\sets M. Y \ A \ (\X\sets M. X \ Y \ N X \ M X) \ (\X\sets M. X \ A \ X \ Y = {} \ M X \ N X)" -proof - +proof%unimportant - have "\Y\sets (restrict_space M A). (\X\sets (restrict_space M A). X \ Y \ (restrict_space N A) X \ (restrict_space M A) X) \ (\X\sets (restrict_space M A). X \ Y = {} \ (restrict_space M A) X \ (restrict_space N A) X)" @@ -2728,12 +2728,12 @@ done qed -text \ +text%important \ Define a lexicographical order on @{type measure}, in the order space, sets and measure. The parts of the lexicographical order are point-wise ordered. \ -instantiation measure :: (type) order_bot +instantiation%important measure :: (type) order_bot begin inductive less_eq_measure :: "'a measure \ 'a measure \ bool" where @@ -2746,10 +2746,10 @@ if sets M = sets N then emeasure M \ emeasure N else sets M \ sets N else space M \ space N)" by (auto elim: less_eq_measure.cases intro: less_eq_measure.intros) -definition less_measure :: "'a measure \ 'a measure \ bool" where +definition%important less_measure :: "'a measure \ 'a measure \ bool" where "less_measure M N \ (M \ N \ \ N \ M)" -definition bot_measure :: "'a measure" where +definition%important bot_measure :: "'a measure" where "bot_measure = sigma {} {}" lemma @@ -2766,13 +2766,14 @@ end -lemma le_measure: "sets M = sets N \ M \ N \ (\A\sets M. emeasure M A \ emeasure N A)" +lemma%important le_measure: "sets M = sets N \ M \ N \ (\A\sets M. emeasure M A \ emeasure N A)" + apply%unimportant - apply (auto simp: le_measure_iff le_fun_def dest: sets_eq_imp_space_eq) subgoal for X by (cases "X \ sets M") (auto simp: emeasure_notin_sets) done -definition sup_measure' :: "'a measure \ 'a measure \ 'a measure" +definition%important sup_measure' :: "'a measure \ 'a measure \ 'a measure" where "sup_measure' A B = measure_of (space A) (sets A) (\X. SUP Y:sets A. emeasure A (X \ Y) + emeasure B (X \ - Y))" @@ -2900,7 +2901,7 @@ qed qed simp_all -definition sup_lexord :: "'a \ 'a \ ('a \ 'b::order) \ 'a \ 'a \ 'a" +definition%important sup_lexord :: "'a \ 'a \ ('a \ 'b::order) \ 'a \ 'a \ 'a" where "sup_lexord A B k s c = (if k A = k B then c else if \ k A \ k B \ \ k B \ k A then s else if k B \ k A then A else B)" @@ -2926,10 +2927,10 @@ (simp_all add: eq_commute[of _ "sets x"] le_measure_iff emeasure_sigma le_fun_def sigma_sets_superset_generator sigma_sets_le_sets_iff) -instantiation measure :: (type) semilattice_sup +instantiation%important measure :: (type) semilattice_sup begin -definition sup_measure :: "'a measure \ 'a measure \ 'a measure" +definition%important sup_measure :: "'a measure \ 'a measure \ 'a measure" where "sup_measure A B = sup_lexord A B space (sigma (space A \ space B) {}) @@ -3057,7 +3058,7 @@ by (simp add: A(3)) qed -instantiation measure :: (type) complete_lattice +instantiation%important measure :: (type) complete_lattice begin interpretation sup_measure: comm_monoid_set sup "bot :: 'a measure" @@ -3092,7 +3093,7 @@ "finite I \ I \ {} \ (\i. i \ I \ sets i = sets M) \ sets (sup_measure.F id I) = sets M" by (induction I rule: finite_ne_induct) (simp_all add: sets_sup) -definition Sup_measure' :: "'a measure set \ 'a measure" +definition%important Sup_measure' :: "'a measure set \ 'a measure" where "Sup_measure' M = measure_of (\a\M. space a) (\a\M. sets a) (\X. (SUP P:{P. finite P \ P \ M }. sup_measure.F id P X))" @@ -3163,20 +3164,20 @@ using assms * by auto qed (rule UN_space_closed) -definition Sup_measure :: "'a measure set \ 'a measure" +definition%important Sup_measure :: "'a measure set \ 'a measure" where "Sup_measure = Sup_lexord space (Sup_lexord sets Sup_measure' (\U. sigma (\u\U. space u) (\u\U. sets u))) (\U. sigma (\u\U. space u) {})" -definition Inf_measure :: "'a measure set \ 'a measure" +definition%important Inf_measure :: "'a measure set \ 'a measure" where "Inf_measure A = Sup {x. \a\A. x \ a}" -definition inf_measure :: "'a measure \ 'a measure \ 'a measure" +definition%important inf_measure :: "'a measure \ 'a measure \ 'a measure" where "inf_measure a b = Inf {a, b}" -definition top_measure :: "'a measure" +definition%important top_measure :: "'a measure" where "top_measure = Inf {}" @@ -3417,7 +3418,7 @@ qed qed -subsubsection \Supremum of a set of $\sigma$-algebras\ +subsubsection%unimportant \Supremum of a set of $\sigma$-algebras\ lemma space_Sup_eq_UN: "space (Sup M) = (\x\M. space x)" unfolding Sup_measure_def diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Norm_Arith.thy --- a/src/HOL/Analysis/Norm_Arith.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Norm_Arith.thy Fri Apr 06 17:34:50 2018 +0200 @@ -131,14 +131,14 @@ ML_file "normarith.ML" -method_setup norm = \ +method_setup%important norm = \ Scan.succeed (SIMPLE_METHOD' o NormArith.norm_arith_tac) \ "prove simple linear statements about vector norms" text \Hence more metric properties.\ -lemma dist_triangle_add: +lemma%important dist_triangle_add: fixes x y x' y' :: "'a::real_normed_vector" shows "dist (x + y) (x' + y') \ dist x x' + dist y y'" by norm diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Path_Connected.thy --- a/src/HOL/Analysis/Path_Connected.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Path_Connected.thy Fri Apr 06 17:34:50 2018 +0200 @@ -10,34 +10,34 @@ subsection \Paths and Arcs\ -definition path :: "(real \ 'a::topological_space) \ bool" +definition%important path :: "(real \ 'a::topological_space) \ bool" where "path g \ continuous_on {0..1} g" -definition pathstart :: "(real \ 'a::topological_space) \ 'a" +definition%important pathstart :: "(real \ 'a::topological_space) \ 'a" where "pathstart g = g 0" -definition pathfinish :: "(real \ 'a::topological_space) \ 'a" +definition%important pathfinish :: "(real \ 'a::topological_space) \ 'a" where "pathfinish g = g 1" -definition path_image :: "(real \ 'a::topological_space) \ 'a set" +definition%important path_image :: "(real \ 'a::topological_space) \ 'a set" where "path_image g = g ` {0 .. 1}" -definition reversepath :: "(real \ 'a::topological_space) \ real \ 'a" +definition%important reversepath :: "(real \ 'a::topological_space) \ real \ 'a" where "reversepath g = (\x. g(1 - x))" -definition joinpaths :: "(real \ 'a::topological_space) \ (real \ 'a) \ real \ 'a" +definition%important joinpaths :: "(real \ 'a::topological_space) \ (real \ 'a) \ real \ 'a" (infixr "+++" 75) where "g1 +++ g2 = (\x. if x \ 1/2 then g1 (2 * x) else g2 (2 * x - 1))" -definition simple_path :: "(real \ 'a::topological_space) \ bool" +definition%important simple_path :: "(real \ 'a::topological_space) \ bool" where "simple_path g \ path g \ (\x\{0..1}. \y\{0..1}. g x = g y \ x = y \ x = 0 \ y = 1 \ x = 1 \ y = 0)" -definition arc :: "(real \ 'a :: topological_space) \ bool" +definition%important arc :: "(real \ 'a :: topological_space) \ bool" where "arc g \ path g \ inj_on g {0..1}" -subsection\Invariance theorems\ +subsection%unimportant\Invariance theorems\ lemma path_eq: "path p \ (\t. t \ {0..1} \ p t = q t) \ path q" using continuous_on_eq path_def by blast @@ -132,7 +132,7 @@ using assms inj_on_eq_iff [of f] by (auto simp: arc_def inj_on_def path_linear_image_eq) -subsection\Basic lemmas about paths\ +subsection%unimportant\Basic lemmas about paths\ lemma continuous_on_path: "path f \ t \ {0..1} \ continuous_on t f" using continuous_on_subset path_def by blast @@ -301,7 +301,7 @@ done qed -section \Path Images\ +section%unimportant \Path Images\ lemma bounded_path_image: "path g \ bounded(path_image g)" by (simp add: compact_imp_bounded compact_path_image) @@ -394,7 +394,7 @@ by (auto simp: simple_path_def path_image_def inj_on_def less_eq_real_def Ball_def) -subsection\Simple paths with the endpoints removed\ +subsection%unimportant\Simple paths with the endpoints removed\ lemma simple_path_endless: "simple_path c \ path_image c - {pathstart c,pathfinish c} = c ` {0<..<1}" @@ -417,7 +417,7 @@ by (simp add: simple_path_endless) -subsection\The operations on paths\ +subsection%unimportant\The operations on paths\ lemma path_image_subset_reversepath: "path_image(reversepath g) \ path_image g" by (auto simp: path_image_def reversepath_def) @@ -565,7 +565,7 @@ by (rule ext) (auto simp: mult.commute) -subsection\Some reversed and "if and only if" versions of joining theorems\ +subsection%unimportant\Some reversed and "if and only if" versions of joining theorems\ lemma path_join_path_ends: fixes g1 :: "real \ 'a::metric_space" @@ -698,7 +698,7 @@ using pathfinish_in_path_image by (fastforce simp: arc_join_eq) -subsection\The joining of paths is associative\ +subsection%unimportant\The joining of paths is associative\ lemma path_assoc: "\pathfinish p = pathstart q; pathfinish q = pathstart r\ @@ -748,7 +748,7 @@ \ arc(p +++ (q +++ r)) \ arc((p +++ q) +++ r)" by (simp add: arc_simple_path simple_path_assoc) -subsubsection\Symmetry and loops\ +subsubsection%unimportant\Symmetry and loops\ lemma path_sym: "\pathfinish p = pathstart q; pathfinish q = pathstart p\ \ path(p +++ q) \ path(q +++ p)" @@ -767,7 +767,7 @@ section\Choosing a subpath of an existing path\ -definition subpath :: "real \ real \ (real \ 'a) \ real \ 'a::real_normed_vector" +definition%important subpath :: "real \ real \ (real \ 'a) \ real \ 'a::real_normed_vector" where "subpath a b g \ \x. g((b - a) * x + a)" lemma path_image_subpath_gen: @@ -945,7 +945,7 @@ lemma join_subpaths_middle: "subpath (0) ((1 / 2)) p +++ subpath ((1 / 2)) 1 p = p" by (rule ext) (simp add: joinpaths_def subpath_def divide_simps) -subsection\There is a subpath to the frontier\ +subsection%unimportant\There is a subpath to the frontier\ lemma subpath_to_frontier_explicit: fixes S :: "'a::metric_space set" @@ -1063,7 +1063,7 @@ subsection \shiftpath: Reparametrizing a closed curve to start at some chosen point\ -definition shiftpath :: "real \ (real \ 'a::topological_space) \ real \ 'a" +definition%important shiftpath :: "real \ (real \ 'a::topological_space) \ real \ 'a" where "shiftpath a f = (\x. if (a + x) \ 1 then f (a + x) else f (a + x - 1))" lemma pathstart_shiftpath: "a \ 1 \ pathstart (shiftpath a g) = g a" @@ -1179,7 +1179,7 @@ subsection \Special case of straight-line paths\ -definition linepath :: "'a::real_normed_vector \ 'a \ real \ 'a" +definition%important linepath :: "'a::real_normed_vector \ 'a \ real \ 'a" where "linepath a b = (\x. (1 - x) *\<^sub>R a + x *\<^sub>R b)" lemma pathstart_linepath[simp]: "pathstart (linepath a b) = a" @@ -1259,7 +1259,7 @@ qed -subsection\Segments via convex hulls\ +subsection%unimportant\Segments via convex hulls\ lemma segments_subset_convex_hull: "closed_segment a b \ (convex hull {a,b,c})" @@ -1379,7 +1379,7 @@ by (force simp: inj_on_def) qed -subsection \Bounding a point away from a path\ +subsection%unimportant \Bounding a point away from a path\ lemma not_on_path_ball: fixes g :: "real \ 'a::heine_borel" @@ -1416,10 +1416,10 @@ section \Path component, considered as a "joinability" relation (from Tom Hales)\ -definition "path_component s x y \ +definition%important "path_component s x y \ (\g. path g \ path_image g \ s \ pathstart g = x \ pathfinish g = y)" -abbreviation +abbreviation%important "path_component_set s x \ Collect (path_component s x)" lemmas path_defs = path_def pathstart_def pathfinish_def path_image_def path_component_def @@ -1471,7 +1471,7 @@ done -subsubsection \Path components as sets\ +subsubsection%unimportant \Path components as sets\ lemma path_component_set: "path_component_set s x = @@ -1495,7 +1495,7 @@ subsection \Path connectedness of a space\ -definition "path_connected s \ +definition%important "path_connected s \ (\x\s. \y\s. \g. path g \ path_image g \ s \ pathstart g = x \ pathfinish g = y)" lemma path_connected_component: "path_connected s \ (\x\s. \y\s. path_component s x y)" @@ -1806,7 +1806,7 @@ using path_component_eq_empty by auto qed -subsection\Lemmas about path-connectedness\ +subsection%unimportant\Lemmas about path-connectedness\ lemma path_connected_linear_image: fixes f :: "'a::real_normed_vector \ 'b::real_normed_vector" @@ -1878,7 +1878,7 @@ using is_interval_connected_1 is_interval_path_connected path_connected_imp_connected by blast -subsection\Path components\ +subsection%unimportant\Path components\ lemma Union_path_component [simp]: "Union {path_component_set S x |x. x \ S} = S" @@ -1990,11 +1990,11 @@ "2 \ DIM('N::euclidean_space) \ connected(- {a::'N})" by (simp add: path_connected_punctured_universe path_connected_imp_connected) -lemma path_connected_sphere: +lemma%important path_connected_sphere: fixes a :: "'a :: euclidean_space" assumes "2 \ DIM('a)" shows "path_connected(sphere a r)" -proof (cases r "0::real" rule: linorder_cases) +proof%unimportant (cases r "0::real" rule: linorder_cases) case less then show ?thesis by (simp add: path_connected_empty) @@ -2315,26 +2315,26 @@ using path_connected_translation by metis qed -lemma path_connected_annulus: +lemma%important path_connected_annulus: fixes a :: "'N::euclidean_space" assumes "2 \ DIM('N)" shows "path_connected {x. r1 < norm(x - a) \ norm(x - a) < r2}" "path_connected {x. r1 < norm(x - a) \ norm(x - a) \ r2}" "path_connected {x. r1 \ norm(x - a) \ norm(x - a) < r2}" "path_connected {x. r1 \ norm(x - a) \ norm(x - a) \ r2}" - by (auto simp: is_interval_def intro!: is_interval_convex convex_imp_path_connected path_connected_2DIM_I [OF assms]) - -lemma connected_annulus: + by%unimportant (auto simp: is_interval_def intro!: is_interval_convex convex_imp_path_connected path_connected_2DIM_I [OF assms]) + +lemma%important connected_annulus: fixes a :: "'N::euclidean_space" assumes "2 \ DIM('N::euclidean_space)" shows "connected {x. r1 < norm(x - a) \ norm(x - a) < r2}" "connected {x. r1 < norm(x - a) \ norm(x - a) \ r2}" "connected {x. r1 \ norm(x - a) \ norm(x - a) < r2}" "connected {x. r1 \ norm(x - a) \ norm(x - a) \ r2}" - by (auto simp: path_connected_annulus [OF assms] path_connected_imp_connected) - - -subsection\Relations between components and path components\ + by%unimportant (auto simp: path_connected_annulus [OF assms] path_connected_imp_connected) + + +subsection%unimportant\Relations between components and path components\ lemma open_connected_component: fixes s :: "'a::real_normed_vector set" @@ -2439,7 +2439,7 @@ qed -subsection\Existence of unbounded components\ +subsection%unimportant\Existence of unbounded components\ lemma cobounded_unbounded_component: fixes s :: "'a :: euclidean_space set" @@ -2527,13 +2527,13 @@ section\The "inside" and "outside" of a set\ -text\The inside comprises the points in a bounded connected component of the set's complement. +text%important\The inside comprises the points in a bounded connected component of the set's complement. The outside comprises the points in unbounded connected component of the complement.\ -definition inside where +definition%important inside where "inside s \ {x. (x \ s) \ bounded(connected_component_set ( - s) x)}" -definition outside where +definition%important outside where "outside s \ -s \ {x. ~ bounded(connected_component_set (- s) x)}" lemma outside: "outside s = {x. ~ bounded(connected_component_set (- s) x)}" @@ -3329,14 +3329,14 @@ subsection\Condition for an open map's image to contain a ball\ -lemma ball_subset_open_map_image: +lemma%important ball_subset_open_map_image: fixes f :: "'a::heine_borel \ 'b :: {real_normed_vector,heine_borel}" assumes contf: "continuous_on (closure S) f" and oint: "open (f ` interior S)" and le_no: "\z. z \ frontier S \ r \ norm(f z - f a)" and "bounded S" "a \ S" "0 < r" shows "ball (f a) r \ f ` S" -proof (cases "f ` S = UNIV") +proof%unimportant (cases "f ` S = UNIV") case True then show ?thesis by simp next case False @@ -3382,10 +3382,10 @@ section\ Homotopy of maps p,q : X=>Y with property P of all intermediate maps.\ -text\ We often just want to require that it fixes some subset, but to take in +text%important\ We often just want to require that it fixes some subset, but to take in the case of a loop homotopy, it's convenient to have a general property P.\ -definition homotopic_with :: +definition%important homotopic_with :: "[('a::topological_space \ 'b::topological_space) \ bool, 'a set, 'b set, 'a \ 'b, 'a \ 'b] \ bool" where "homotopic_with P X Y p q \ @@ -3487,7 +3487,7 @@ qed -subsection\ Trivial properties.\ +subsection%unimportant\ Trivial properties.\ lemma homotopic_with_imp_property: "homotopic_with P X Y f g \ P f \ P g" unfolding homotopic_with_def Ball_def @@ -3745,7 +3745,7 @@ subsection\Homotopy of paths, maintaining the same endpoints.\ -definition homotopic_paths :: "['a set, real \ 'a, real \ 'a::topological_space] \ bool" +definition%important homotopic_paths :: "['a set, real \ 'a, real \ 'a::topological_space] \ bool" where "homotopic_paths s p q \ homotopic_with (\r. pathstart r = pathstart p \ pathfinish r = pathfinish p) {0..1} s p q" @@ -3897,28 +3897,28 @@ subsection\Group properties for homotopy of paths\ -text\So taking equivalence classes under homotopy would give the fundamental group\ - -proposition homotopic_paths_rid: +text%important\So taking equivalence classes under homotopy would give the fundamental group\ + +proposition%important homotopic_paths_rid: "\path p; path_image p \ s\ \ homotopic_paths s (p +++ linepath (pathfinish p) (pathfinish p)) p" - apply (subst homotopic_paths_sym) + apply%unimportant (subst homotopic_paths_sym) apply (rule homotopic_paths_reparametrize [where f = "\t. if t \ 1 / 2 then 2 *\<^sub>R t else 1"]) apply (simp_all del: le_divide_eq_numeral1) apply (subst split_01) apply (rule continuous_on_cases continuous_intros | force simp: pathfinish_def joinpaths_def)+ done -proposition homotopic_paths_lid: +proposition%important homotopic_paths_lid: "\path p; path_image p \ s\ \ homotopic_paths s (linepath (pathstart p) (pathstart p) +++ p) p" -using homotopic_paths_rid [of "reversepath p" s] +using%unimportant homotopic_paths_rid [of "reversepath p" s] by (metis homotopic_paths_reversepath path_image_reversepath path_reversepath pathfinish_linepath pathfinish_reversepath reversepath_joinpaths reversepath_linepath) -proposition homotopic_paths_assoc: +proposition%important homotopic_paths_assoc: "\path p; path_image p \ s; path q; path_image q \ s; path r; path_image r \ s; pathfinish p = pathstart q; pathfinish q = pathstart r\ \ homotopic_paths s (p +++ (q +++ r)) ((p +++ q) +++ r)" - apply (subst homotopic_paths_sym) + apply%unimportant (subst homotopic_paths_sym) apply (rule homotopic_paths_reparametrize [where f = "\t. if t \ 1 / 2 then inverse 2 *\<^sub>R t else if t \ 3 / 4 then t - (1 / 4) @@ -3929,10 +3929,10 @@ apply (auto simp: joinpaths_def) done -proposition homotopic_paths_rinv: +proposition%important homotopic_paths_rinv: assumes "path p" "path_image p \ s" shows "homotopic_paths s (p +++ reversepath p) (linepath (pathstart p) (pathstart p))" -proof - +proof%unimportant - have "continuous_on ({0..1} \ {0..1}) (\x. (subpath 0 (fst x) p +++ reversepath (subpath 0 (fst x) p)) (snd x))" using assms apply (simp add: joinpaths_def subpath_def reversepath_def path_def del: le_divide_eq_numeral1) @@ -3952,15 +3952,15 @@ done qed -proposition homotopic_paths_linv: +proposition%important homotopic_paths_linv: assumes "path p" "path_image p \ s" shows "homotopic_paths s (reversepath p +++ p) (linepath (pathfinish p) (pathfinish p))" -using homotopic_paths_rinv [of "reversepath p" s] assms by simp +using%unimportant homotopic_paths_rinv [of "reversepath p" s] assms by simp subsection\ Homotopy of loops without requiring preservation of endpoints.\ -definition homotopic_loops :: "'a::topological_space set \ (real \ 'a) \ (real \ 'a) \ bool" where +definition%important homotopic_loops :: "'a::topological_space set \ (real \ 'a) \ (real \ 'a) \ bool" where "homotopic_loops s p q \ homotopic_with (\r. pathfinish r = pathstart r) {0..1} s p q" @@ -4025,14 +4025,14 @@ subsection\Relations between the two variants of homotopy\ -proposition homotopic_paths_imp_homotopic_loops: +proposition%important homotopic_paths_imp_homotopic_loops: "\homotopic_paths s p q; pathfinish p = pathstart p; pathfinish q = pathstart p\ \ homotopic_loops s p q" - by (auto simp: homotopic_paths_def homotopic_loops_def intro: homotopic_with_mono) - -proposition homotopic_loops_imp_homotopic_paths_null: + by%unimportant (auto simp: homotopic_paths_def homotopic_loops_def intro: homotopic_with_mono) + +proposition%important homotopic_loops_imp_homotopic_paths_null: assumes "homotopic_loops s p (linepath a a)" shows "homotopic_paths s p (linepath (pathstart p) (pathstart p))" -proof - +proof%unimportant - have "path p" by (metis assms homotopic_loops_imp_path) have ploop: "pathfinish p = pathstart p" by (metis assms homotopic_loops_imp_loop) have pip: "path_image p \ s" by (metis assms homotopic_loops_imp_subset) @@ -4100,12 +4100,12 @@ by (blast intro: homotopic_paths_trans) qed -proposition homotopic_loops_conjugate: +proposition%important homotopic_loops_conjugate: fixes s :: "'a::real_normed_vector set" assumes "path p" "path q" and pip: "path_image p \ s" and piq: "path_image q \ s" and papp: "pathfinish p = pathstart q" and qloop: "pathfinish q = pathstart q" shows "homotopic_loops s (p +++ q +++ reversepath p) q" -proof - +proof%unimportant - have contp: "continuous_on {0..1} p" using \path p\ [unfolded path_def] by blast have contq: "continuous_on {0..1} q" using \path q\ [unfolded path_def] by blast have c1: "continuous_on ({0..1} \ {0..1}) (\x. p ((1 - fst x) * snd x + fst x))" @@ -4197,7 +4197,7 @@ qed -subsection\ Homotopy of "nearby" function, paths and loops.\ +subsection%unimportant\ Homotopy of "nearby" function, paths and loops.\ lemma homotopic_with_linear: fixes f g :: "_ \ 'b::real_normed_vector" @@ -4358,10 +4358,10 @@ using homotopic_join_subpaths2 by blast qed -proposition homotopic_join_subpaths: +proposition%important homotopic_join_subpaths: "\path g; path_image g \ s; u \ {0..1}; v \ {0..1}; w \ {0..1}\ \ homotopic_paths s (subpath u v g +++ subpath v w g) (subpath u w g)" -apply (rule le_cases3 [of u v w]) +apply%unimportant (rule le_cases3 [of u v w]) using homotopic_join_subpaths1 homotopic_join_subpaths2 homotopic_join_subpaths3 by metis+ text\Relating homotopy of trivial loops to path-connectedness.\ @@ -4399,9 +4399,9 @@ subsection\Simply connected sets\ -text\defined as "all loops are homotopic (as loops)\ - -definition simply_connected where +text%important\defined as "all loops are homotopic (as loops)\ + +definition%important simply_connected where "simply_connected S \ \p q. path p \ pathfinish p = pathstart p \ path_image p \ S \ path q \ pathfinish q = pathstart q \ path_image q \ S @@ -4583,7 +4583,7 @@ subsection\Contractible sets\ -definition contractible where +definition%important contractible where "contractible S \ \a. homotopic_with (\x. True) S S id (\x. a)" proposition contractible_imp_simply_connected: @@ -4846,7 +4846,7 @@ subsection\Local versions of topological properties in general\ -definition locally :: "('a::topological_space set \ bool) \ 'a set \ bool" +definition%important locally :: "('a::topological_space set \ bool) \ 'a set \ bool" where "locally P S \ \w x. openin (subtopology euclidean S) w \ x \ w @@ -5077,7 +5077,7 @@ subsection\Sort of induction principle for connected sets\ -lemma connected_induction: +lemma%important connected_induction: assumes "connected S" and opD: "\T a. \openin (subtopology euclidean S) T; a \ T\ \ \z. z \ T \ P z" and opI: "\a. a \ S @@ -5085,7 +5085,7 @@ (\x \ T. \y \ T. P x \ P y \ Q x \ Q y)" and etc: "a \ S" "b \ S" "P a" "P b" "Q a" shows "Q b" -proof - +proof%unimportant - have 1: "openin (subtopology euclidean S) {b. \T. openin (subtopology euclidean S) T \ b \ T \ (\x\T. P x \ Q x)}" @@ -5176,14 +5176,14 @@ subsection\Basic properties of local compactness\ -lemma locally_compact: +lemma%important locally_compact: fixes s :: "'a :: metric_space set" shows "locally compact s \ (\x \ s. \u v. x \ u \ u \ v \ v \ s \ openin (subtopology euclidean s) u \ compact v)" (is "?lhs = ?rhs") -proof +proof%unimportant assume ?lhs then show ?rhs apply clarify @@ -5730,12 +5730,12 @@ by (metis \U = S \ V\ inf.bounded_iff openin_imp_subset that) qed -corollary Sura_Bura: +corollary%important Sura_Bura: fixes S :: "'a::euclidean_space set" assumes "locally compact S" "C \ components S" "compact C" shows "C = \ {K. C \ K \ compact K \ openin (subtopology euclidean S) K}" (is "C = ?rhs") -proof +proof%unimportant show "?rhs \ C" proof (clarsimp, rule ccontr) fix x @@ -5865,17 +5865,17 @@ by (metis assms(1) assms(2) assms(3) mem_Collect_eq path_component_subset path_connected_path_component) qed -proposition locally_path_connected: +proposition%important locally_path_connected: "locally path_connected S \ (\v x. openin (subtopology euclidean S) v \ x \ v \ (\u. openin (subtopology euclidean S) u \ path_connected u \ x \ u \ u \ v))" -by (metis locally_path_connected_1 locally_path_connected_2 locally_path_connected_3) - -proposition locally_path_connected_open_path_component: +by%unimportant (metis locally_path_connected_1 locally_path_connected_2 locally_path_connected_3) + +proposition%important locally_path_connected_open_path_component: "locally path_connected S \ (\t x. openin (subtopology euclidean S) t \ x \ t \ openin (subtopology euclidean S) (path_component_set t x))" -by (metis locally_path_connected_1 locally_path_connected_2 locally_path_connected_3) +by%unimportant (metis locally_path_connected_1 locally_path_connected_2 locally_path_connected_3) lemma locally_connected_open_component: "locally connected S \ @@ -5883,14 +5883,14 @@ \ openin (subtopology euclidean S) c)" by (metis components_iff locally_connected_open_connected_component) -proposition locally_connected_im_kleinen: +proposition%important locally_connected_im_kleinen: "locally connected S \ (\v x. openin (subtopology euclidean S) v \ x \ v \ (\u. openin (subtopology euclidean S) u \ x \ u \ u \ v \ (\y. y \ u \ (\c. connected c \ c \ v \ x \ c \ y \ c))))" (is "?lhs = ?rhs") -proof +proof%unimportant assume ?lhs then show ?rhs by (fastforce simp add: locally_connected) @@ -5924,7 +5924,7 @@ done qed -proposition locally_path_connected_im_kleinen: +proposition%important locally_path_connected_im_kleinen: "locally path_connected S \ (\v x. openin (subtopology euclidean S) v \ x \ v \ (\u. openin (subtopology euclidean S) u \ @@ -5932,7 +5932,7 @@ (\y. y \ u \ (\p. path p \ path_image p \ v \ pathstart p = x \ pathfinish p = y))))" (is "?lhs = ?rhs") -proof +proof%unimportant assume ?lhs then show ?rhs apply (simp add: locally_path_connected path_connected_def) @@ -6082,13 +6082,13 @@ shows "open S \ path_component_set S x = connected_component_set S x" by (simp add: open_path_connected_component) -proposition locally_connected_quotient_image: +proposition%important locally_connected_quotient_image: assumes lcS: "locally connected S" and oo: "\T. T \ f ` S \ openin (subtopology euclidean S) (S \ f -` T) \ openin (subtopology euclidean (f ` S)) T" shows "locally connected (f ` S)" -proof (clarsimp simp: locally_connected_open_component) +proof%unimportant (clarsimp simp: locally_connected_open_component) fix U C assume opefSU: "openin (subtopology euclidean (f ` S)) U" and "C \ components U" then have "C \ U" "U \ f ` S" @@ -6148,12 +6148,12 @@ qed text\The proof resembles that above but is not identical!\ -proposition locally_path_connected_quotient_image: +proposition%important locally_path_connected_quotient_image: assumes lcS: "locally path_connected S" and oo: "\T. T \ f ` S \ openin (subtopology euclidean S) (S \ f -` T) \ openin (subtopology euclidean (f ` S)) T" shows "locally path_connected (f ` S)" -proof (clarsimp simp: locally_path_connected_open_path_component) +proof%unimportant (clarsimp simp: locally_path_connected_open_path_component) fix U y assume opefSU: "openin (subtopology euclidean (f ` S)) U" and "y \ U" then have "path_component_set U y \ U" "U \ f ` S" @@ -6221,7 +6221,7 @@ by metis qed -subsection\Components, continuity, openin, closedin\ +subsection%unimportant\Components, continuity, openin, closedin\ lemma continuous_on_components_gen: fixes f :: "'a::topological_space \ 'b::topological_space" @@ -6324,7 +6324,8 @@ fixes S :: "'a::real_normed_vector set" assumes S: "closed S" and c: " c \ components(-S)" shows "closed (S \ c)" -by (metis Compl_eq_Diff_UNIV S c closed_closedin closedin_Un_complement_component locally_connected_UNIV subtopology_UNIV) + by (metis Compl_eq_Diff_UNIV S c closed_closedin closedin_Un_complement_component + locally_connected_UNIV subtopology_UNIV) subsection\Existence of isometry between subspaces of same dimension\ @@ -6381,7 +6382,7 @@ by (rule that [OF \linear f\ \f ` S \ T\]) qed -proposition isometries_subspaces: +proposition%important isometries_subspaces: fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set" assumes S: "subspace S" @@ -6392,7 +6393,7 @@ "\x. x \ T \ norm(g x) = norm x" "\x. x \ S \ g(f x) = x" "\x. x \ T \ f(g x) = x" -proof - +proof%unimportant - obtain B where "B \ S" and Borth: "pairwise orthogonal B" and B1: "\x. x \ B \ norm x = 1" and "independent B" "finite B" "card B = dim S" "span B = S" @@ -6549,7 +6550,7 @@ subsection\Retracts, in a general sense, preserve (co)homotopic triviality)\ -locale Retracts = +locale%important Retracts = fixes s h t k assumes conth: "continuous_on s h" and imh: "h ` s = t" @@ -6715,7 +6716,7 @@ subsection\Homotopy equivalence\ -definition homotopy_eqv :: "'a::topological_space set \ 'b::topological_space set \ bool" +definition%important homotopy_eqv :: "'a::topological_space set \ 'b::topological_space set \ bool" (infix "homotopy'_eqv" 50) where "S homotopy_eqv T \ \f g. continuous_on S f \ f ` S \ T \ @@ -7003,7 +7004,7 @@ shows "\contractible S; S homeomorphic T\ \ contractible T" by (metis homeomorphic_contractible_eq) -subsection\Misc other results\ +subsection%unimportant\Misc other results\ lemma bounded_connected_Compl_real: fixes S :: "real set" @@ -7047,7 +7048,7 @@ by blast qed -subsection\Some Uncountable Sets\ +subsection%unimportant\Some Uncountable Sets\ lemma uncountable_closed_segment: fixes a :: "'a::real_normed_vector" @@ -7186,7 +7187,7 @@ by (simp add: arc_imp_simple_path assms simple_path_image_uncountable) -subsection\ Some simple positive connection theorems\ +subsection%unimportant\ Some simple positive connection theorems\ proposition path_connected_convex_diff_countable: fixes U :: "'a::euclidean_space set" @@ -7453,7 +7454,7 @@ subsection\ Self-homeomorphisms shuffling points about in various ways.\ -subsubsection\The theorem \homeomorphism_moving_points_exists\\ +subsubsection%unimportant\The theorem \homeomorphism_moving_points_exists\\ lemma homeomorphism_moving_point_1: fixes a :: "'a::euclidean_space" @@ -7845,7 +7846,7 @@ qed qed -proposition homeomorphism_moving_points_exists: +proposition%important homeomorphism_moving_points_exists: fixes S :: "'a::euclidean_space set" assumes 2: "2 \ DIM('a)" "open S" "connected S" "S \ T" "finite K" and KS: "\i. i \ K \ x i \ S \ y i \ S" @@ -7853,7 +7854,7 @@ and S: "S \ T" "T \ affine hull S" "connected S" obtains f g where "homeomorphism T T f g" "\i. i \ K \ f(x i) = y i" "{x. ~ (f x = x \ g x = x)} \ S" "bounded {x. (~ (f x = x \ g x = x))}" -proof (cases "S = {}") +proof%unimportant (cases "S = {}") case True then show ?thesis using KS homeomorphism_ident that by fastforce @@ -7875,7 +7876,7 @@ qed -subsubsection\The theorem \homeomorphism_grouping_points_exists\\ +subsubsection%unimportant\The theorem \homeomorphism_grouping_points_exists\\ lemma homeomorphism_grouping_point_1: fixes a::real and c::real @@ -8112,12 +8113,12 @@ qed qed -proposition homeomorphism_grouping_points_exists: +proposition%important homeomorphism_grouping_points_exists: fixes S :: "'a::euclidean_space set" assumes "open U" "open S" "connected S" "U \ {}" "finite K" "K \ S" "U \ S" "S \ T" obtains f g where "homeomorphism T T f g" "{x. (~ (f x = x \ g x = x))} \ S" "bounded {x. (~ (f x = x \ g x = x))}" "\x. x \ K \ f x \ U" -proof (cases "2 \ DIM('a)") +proof%unimportant (cases "2 \ DIM('a)") case True have TS: "T \ affine hull S" using affine_hull_open assms by blast @@ -8401,13 +8402,13 @@ qed qed -proposition nullhomotopic_from_sphere_extension: +proposition%important nullhomotopic_from_sphere_extension: fixes f :: "'M::euclidean_space \ 'a::real_normed_vector" shows "(\c. homotopic_with (\x. True) (sphere a r) S f (\x. c)) \ (\g. continuous_on (cball a r) g \ g ` (cball a r) \ S \ (\x \ sphere a r. g x = f x))" (is "?lhs = ?rhs") -proof (cases r "0::real" rule: linorder_cases) +proof%unimportant (cases r "0::real" rule: linorder_cases) case less then show ?thesis by simp next diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Product_Vector.thy --- a/src/HOL/Analysis/Product_Vector.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Product_Vector.thy Fri Apr 06 17:34:50 2018 +0200 @@ -12,7 +12,7 @@ subsection \Product is a real vector space\ -instantiation prod :: (real_vector, real_vector) real_vector +instantiation%important prod :: (real_vector, real_vector) real_vector begin definition scaleR_prod_def: @@ -46,10 +46,10 @@ (* TODO: Product of uniform spaces and compatibility with metric_spaces! *) -instantiation prod :: (metric_space, metric_space) dist +instantiation%important prod :: (metric_space, metric_space) dist begin -definition dist_prod_def[code del]: +definition%important dist_prod_def[code del]: "dist x y = sqrt ((dist (fst x) (fst y))\<^sup>2 + (dist (snd x) (snd y))\<^sup>2)" instance .. @@ -68,7 +68,7 @@ declare uniformity_Abort[where 'a="'a :: metric_space \ 'b :: metric_space", code] -instantiation prod :: (metric_space, metric_space) metric_space +instantiation%important prod :: (metric_space, metric_space) metric_space begin lemma dist_Pair_Pair: "dist (a, b) (c, d) = sqrt ((dist a c)\<^sup>2 + (dist b d)\<^sup>2)" @@ -186,8 +186,8 @@ subsection \Product is a complete metric space\ -instance prod :: (complete_space, complete_space) complete_space -proof +instance%important prod :: (complete_space, complete_space) complete_space +proof%unimportant fix X :: "nat \ 'a \ 'b" assume "Cauchy X" have 1: "(\n. fst (X n)) \ lim (\n. fst (X n))" using Cauchy_fst [OF \Cauchy X\] @@ -203,7 +203,7 @@ subsection \Product is a normed vector space\ -instantiation prod :: (real_normed_vector, real_normed_vector) real_normed_vector +instantiation%important prod :: (real_normed_vector, real_normed_vector) real_normed_vector begin definition norm_prod_def[code del]: @@ -245,13 +245,13 @@ instance prod :: (banach, banach) banach .. -subsubsection \Pair operations are linear\ +subsubsection%unimportant \Pair operations are linear\ -lemma bounded_linear_fst: "bounded_linear fst" +lemma%important bounded_linear_fst: "bounded_linear fst" using fst_add fst_scaleR by (rule bounded_linear_intro [where K=1], simp add: norm_prod_def) -lemma bounded_linear_snd: "bounded_linear snd" +lemma%important bounded_linear_snd: "bounded_linear snd" using snd_add snd_scaleR by (rule bounded_linear_intro [where K=1], simp add: norm_prod_def) @@ -285,12 +285,12 @@ then show "\K. \x. norm (f x, g x) \ norm x * K" .. qed -subsubsection \Frechet derivatives involving pairs\ +subsubsection%unimportant \Frechet derivatives involving pairs\ -lemma has_derivative_Pair [derivative_intros]: +lemma%important has_derivative_Pair [derivative_intros]: assumes f: "(f has_derivative f') (at x within s)" and g: "(g has_derivative g') (at x within s)" shows "((\x. (f x, g x)) has_derivative (\h. (f' h, g' h))) (at x within s)" -proof (rule has_derivativeI_sandwich[of 1]) +proof%unimportant (rule has_derivativeI_sandwich[of 1]) show "bounded_linear (\h. (f' h, g' h))" using f g by (intro bounded_linear_Pair has_derivative_bounded_linear) let ?Rf = "\y. f y - f x - f' (y - x)" @@ -319,7 +319,7 @@ unfolding split_beta' . -subsubsection \Vector derivatives involving pairs\ +subsubsection%unimportant \Vector derivatives involving pairs\ lemma has_vector_derivative_Pair[derivative_intros]: assumes "(f has_vector_derivative f') (at x within s)" @@ -331,7 +331,7 @@ subsection \Product is an inner product space\ -instantiation prod :: (real_inner, real_inner) real_inner +instantiation%important prod :: (real_inner, real_inner) real_inner begin definition inner_prod_def: diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Sigma_Algebra.thy --- a/src/HOL/Analysis/Sigma_Algebra.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Sigma_Algebra.thy Fri Apr 06 17:34:50 2018 +0200 @@ -5,7 +5,7 @@ translated by Lawrence Paulson. *) -section \Describing measurable sets\ +section \Sigma Algebra\ theory Sigma_Algebra imports @@ -27,7 +27,7 @@ subsection \Families of sets\ -locale subset_class = +locale%important subset_class = fixes \ :: "'a set" and M :: "'a set set" assumes space_closed: "M \ Pow \" @@ -36,7 +36,7 @@ subsubsection \Semiring of sets\ -locale semiring_of_sets = subset_class + +locale%important semiring_of_sets = subset_class + assumes empty_sets[iff]: "{} \ M" assumes Int[intro]: "\a b. a \ M \ b \ M \ a \ b \ M" assumes Diff_cover: @@ -71,7 +71,9 @@ with assms show ?thesis by auto qed -locale ring_of_sets = semiring_of_sets + +subsubsection \Ring of sets\ + +locale%important ring_of_sets = semiring_of_sets + assumes Un [intro]: "\a b. a \ M \ b \ M \ a \ b \ M" lemma (in ring_of_sets) finite_Union [intro]: @@ -135,20 +137,22 @@ with assms show ?thesis by auto qed -locale algebra = ring_of_sets + +subsubsection \Algebra of sets\ + +locale%important algebra = ring_of_sets + assumes top [iff]: "\ \ M" lemma (in algebra) compl_sets [intro]: "a \ M \ \ - a \ M" by auto -lemma algebra_iff_Un: +lemma%important algebra_iff_Un: "algebra \ M \ M \ Pow \ \ {} \ M \ (\a \ M. \ - a \ M) \ (\a \ M. \ b \ M. a \ b \ M)" (is "_ \ ?Un") -proof +proof%unimportant assume "algebra \ M" then interpret algebra \ M . show ?Un using sets_into_space by auto @@ -169,12 +173,12 @@ show "algebra \ M" proof qed fact qed -lemma algebra_iff_Int: +lemma%important algebra_iff_Int: "algebra \ M \ M \ Pow \ & {} \ M & (\a \ M. \ - a \ M) & (\a \ M. \ b \ M. a \ b \ M)" (is "_ \ ?Int") -proof +proof%unimportant assume "algebra \ M" then interpret algebra \ M . show ?Int using sets_into_space by auto @@ -214,7 +218,7 @@ "X \ S \ algebra S { {}, X, S - X, S }" by (auto simp: algebra_iff_Int) -subsubsection \Restricted algebras\ +subsubsection%unimportant \Restricted algebras\ abbreviation (in algebra) "restricted_space A \ ((\) A) ` M" @@ -225,7 +229,7 @@ subsubsection \Sigma Algebras\ -locale sigma_algebra = algebra + +locale%important sigma_algebra = algebra + assumes countable_nat_UN [intro]: "\A. range A \ M \ (\i::nat. A i) \ M" lemma (in algebra) is_sigma_algebra: @@ -423,7 +427,7 @@ shows "sigma_algebra S { {}, X, S - X, S }" using algebra.is_sigma_algebra[OF algebra_single_set[OF \X \ S\]] by simp -subsubsection \Binary Unions\ +subsubsection%unimportant \Binary Unions\ definition binary :: "'a \ 'a \ nat \ 'a" where "binary a b = (\x. b)(0 := a)" @@ -447,10 +451,10 @@ subsubsection \Initial Sigma Algebra\ -text \Sigma algebras can naturally be created as the closure of any set of +text%important \Sigma algebras can naturally be created as the closure of any set of M with regard to the properties just postulated.\ -inductive_set sigma_sets :: "'a set \ 'a set set \ 'a set set" +inductive_set%important sigma_sets :: "'a set \ 'a set set \ 'a set set" for sp :: "'a set" and A :: "'a set set" where Basic[intro, simp]: "a \ A \ a \ sigma_sets sp A" @@ -796,7 +800,7 @@ thus "(\i::nat. A i) \ M" by (simp add: UN_disjointed_eq) qed -subsubsection \Ring generated by a semiring\ +subsubsection%unimportant \Ring generated by a semiring\ definition (in semiring_of_sets) "generated_ring = { \C | C. C \ M \ finite C \ disjoint C }" @@ -927,7 +931,7 @@ by (blast intro!: sigma_sets_mono elim: generated_ringE) qed (auto intro!: generated_ringI_Basic sigma_sets_mono) -subsubsection \A Two-Element Series\ +subsubsection%unimportant \A Two-Element Series\ definition binaryset :: "'a set \ 'a set \ nat \ 'a set" where "binaryset A B = (\x. {})(0 := A, Suc 0 := B)" @@ -943,7 +947,7 @@ subsubsection \Closed CDI\ -definition closed_cdi where +definition%important closed_cdi where "closed_cdi \ M \ M \ Pow \ & (\s \ M. \ - s \ M) & @@ -1177,7 +1181,7 @@ subsubsection \Dynkin systems\ -locale dynkin_system = subset_class + +locale%important dynkin_system = subset_class + assumes space: "\ \ M" and compl[intro!]: "\A. A \ M \ \ - A \ M" and UN[intro!]: "\A. disjoint_family A \ range A \ M @@ -1239,7 +1243,7 @@ subsubsection "Intersection sets systems" -definition "Int_stable M \ (\ a \ M. \ b \ M. a \ b \ M)" +definition%important "Int_stable M \ (\ a \ M. \ b \ M. a \ b \ M)" lemma (in algebra) Int_stable: "Int_stable M" unfolding Int_stable_def by auto @@ -1279,7 +1283,7 @@ subsubsection "Smallest Dynkin systems" -definition dynkin where +definition%important dynkin where "dynkin \ M = (\{D. dynkin_system \ D \ M \ D})" lemma dynkin_system_dynkin: @@ -1426,10 +1430,10 @@ subsubsection \Induction rule for intersection-stable generators\ -text \The reason to introduce Dynkin-systems is the following induction rules for $\sigma$-algebras +text%important \The reason to introduce Dynkin-systems is the following induction rules for $\sigma$-algebras generated by a generator closed under intersection.\ -lemma sigma_sets_induct_disjoint[consumes 3, case_names basic empty compl union]: +lemma%important sigma_sets_induct_disjoint[consumes 3, case_names basic empty compl union]: assumes "Int_stable G" and closed: "G \ Pow \" and A: "A \ sigma_sets \ G" @@ -1438,7 +1442,7 @@ and compl: "\A. A \ sigma_sets \ G \ P A \ P (\ - A)" and union: "\A. disjoint_family A \ range A \ sigma_sets \ G \ (\i. P (A i)) \ P (\i::nat. A i)" shows "P A" -proof - +proof%unimportant - let ?D = "{ A \ sigma_sets \ G. P A }" interpret sigma_algebra \ "sigma_sets \ G" using closed by (rule sigma_algebra_sigma_sets) @@ -1452,34 +1456,34 @@ subsection \Measure type\ -definition positive :: "'a set set \ ('a set \ ennreal) \ bool" where +definition%important positive :: "'a set set \ ('a set \ ennreal) \ bool" where "positive M \ \ \ {} = 0" -definition countably_additive :: "'a set set \ ('a set \ ennreal) \ bool" where +definition%important countably_additive :: "'a set set \ ('a set \ ennreal) \ bool" where "countably_additive M f \ (\A. range A \ M \ disjoint_family A \ (\i. A i) \ M \ (\i. f (A i)) = f (\i. A i))" -definition measure_space :: "'a set \ 'a set set \ ('a set \ ennreal) \ bool" where +definition%important measure_space :: "'a set \ 'a set set \ ('a set \ ennreal) \ bool" where "measure_space \ A \ \ sigma_algebra \ A \ positive A \ \ countably_additive A \" -typedef 'a measure = "{(\::'a set, A, \). (\a\-A. \ a = 0) \ measure_space \ A \ }" -proof +typedef%important 'a measure = "{(\::'a set, A, \). (\a\-A. \ a = 0) \ measure_space \ A \ }" +proof%unimportant have "sigma_algebra UNIV {{}, UNIV}" by (auto simp: sigma_algebra_iff2) then show "(UNIV, {{}, UNIV}, \A. 0) \ {(\, A, \). (\a\-A. \ a = 0) \ measure_space \ A \} " by (auto simp: measure_space_def positive_def countably_additive_def) qed -definition space :: "'a measure \ 'a set" where +definition%important space :: "'a measure \ 'a set" where "space M = fst (Rep_measure M)" -definition sets :: "'a measure \ 'a set set" where +definition%important sets :: "'a measure \ 'a set set" where "sets M = fst (snd (Rep_measure M))" -definition emeasure :: "'a measure \ 'a set \ ennreal" where +definition%important emeasure :: "'a measure \ 'a set \ ennreal" where "emeasure M = snd (snd (Rep_measure M))" -definition measure :: "'a measure \ 'a set \ real" where +definition%important measure :: "'a measure \ 'a set \ real" where "measure M A = enn2real (emeasure M A)" declare [[coercion sets]] @@ -1494,7 +1498,7 @@ interpretation sets: sigma_algebra "space M" "sets M" for M :: "'a measure" using measure_space[of M] by (auto simp: measure_space_def) -definition measure_of :: "'a set \ 'a set set \ ('a set \ ennreal) \ 'a measure" where +definition%important measure_of :: "'a set \ 'a set set \ ('a set \ ennreal) \ 'a measure" where "measure_of \ A \ = Abs_measure (\, if A \ Pow \ then sigma_sets \ A else {{}, \}, \a. if a \ sigma_sets \ A \ measure_space \ (sigma_sets \ A) \ then \ a else 0)" @@ -1629,12 +1633,12 @@ subsubsection \Constructing simple @{typ "'a measure"}\ -lemma emeasure_measure_of: +lemma%important emeasure_measure_of: assumes M: "M = measure_of \ A \" assumes ms: "A \ Pow \" "positive (sets M) \" "countably_additive (sets M) \" assumes X: "X \ sets M" shows "emeasure M X = \ X" -proof - +proof%unimportant - interpret sigma_algebra \ "sigma_sets \ A" by (rule sigma_algebra_sigma_sets) fact have "measure_space \ (sigma_sets \ A) \" using ms M by (simp add: measure_space_def sigma_algebra_sigma_sets) @@ -1711,7 +1715,7 @@ subsubsection \Measurable functions\ -definition measurable :: "'a measure \ 'b measure \ ('a \ 'b) set" (infixr "\\<^sub>M" 60) where +definition%important measurable :: "'a measure \ 'b measure \ ('a \ 'b) set" (infixr "\\<^sub>M" 60) where "measurable A B = {f \ space A \ space B. \y \ sets B. f -` y \ space A \ sets A}" lemma measurableI: @@ -1873,7 +1877,7 @@ subsubsection \Counting space\ -definition count_space :: "'a set \ 'a measure" where +definition%important count_space :: "'a set \ 'a measure" where "count_space \ = measure_of \ (Pow \) (\A. if finite A then of_nat (card A) else \)" lemma @@ -1949,7 +1953,7 @@ "space N = {} \ f \ measurable M N \ space M = {}" by (auto simp add: measurable_def Pi_iff) -subsubsection \Extend measure\ +subsubsection%unimportant \Extend measure\ definition "extend_measure \ I G \ = (if (\\'. (\i\I. \' (G i) = \ i) \ measure_space \ (sigma_sets \ (G`I)) \') \ \ (\i\I. \ i = 0) @@ -2011,7 +2015,7 @@ subsection \The smallest $\sigma$-algebra regarding a function\ -definition +definition%important "vimage_algebra X f M = sigma X {f -` A \ X | A. A \ sets M}" lemma space_vimage_algebra[simp]: "space (vimage_algebra X f M) = X" diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Starlike.thy --- a/src/HOL/Analysis/Starlike.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Starlike.thy Fri Apr 06 17:34:50 2018 +0200 @@ -15,7 +15,7 @@ subsection \Midpoint\ -definition midpoint :: "'a::real_vector \ 'a \ 'a" +definition%important midpoint :: "'a::real_vector \ 'a \ 'a" where "midpoint a b = (inverse (2::real)) *\<^sub>R (a + b)" lemma midpoint_idem [simp]: "midpoint x x = x" @@ -94,10 +94,10 @@ subsection \Line segments\ -definition closed_segment :: "'a::real_vector \ 'a \ 'a set" +definition%important closed_segment :: "'a::real_vector \ 'a \ 'a set" where "closed_segment a b = {(1 - u) *\<^sub>R a + u *\<^sub>R b | u::real. 0 \ u \ u \ 1}" -definition open_segment :: "'a::real_vector \ 'a \ 'a set" where +definition%important open_segment :: "'a::real_vector \ 'a \ 'a set" where "open_segment a b \ closed_segment a b - {a,b}" lemmas segment = open_segment_def closed_segment_def @@ -599,7 +599,7 @@ subsection\Starlike sets\ -definition "starlike S \ (\a\S. \x\S. closed_segment a x \ S)" +definition%important "starlike S \ (\a\S. \x\S. closed_segment a x \ S)" lemma starlike_UNIV [simp]: "starlike UNIV" by (simp add: starlike_def) @@ -662,7 +662,7 @@ by (meson hull_mono inf_mono subset_insertI subset_refl) qed -subsection\More results about segments\ +subsection%unimportant\More results about segments\ lemma dist_half_times2: fixes a :: "'a :: real_normed_vector" @@ -884,7 +884,7 @@ subsection\Betweenness\ -definition "between = (\(a,b) x. x \ closed_segment a b)" +definition%important "between = (\(a,b) x. x \ closed_segment a b)" lemma betweenI: assumes "0 \ u" "u \ 1" "x = (1 - u) *\<^sub>R a + u *\<^sub>R b" @@ -1055,7 +1055,7 @@ by (auto simp: between_mem_segment closed_segment_eq_real_ivl) -subsection \Shrinking towards the interior of a convex set\ +subsection%unimportant \Shrinking towards the interior of a convex set\ lemma mem_interior_convex_shrink: fixes s :: "'a::euclidean_space set" @@ -1249,7 +1249,7 @@ qed -subsection \Some obvious but surprisingly hard simplex lemmas\ +subsection%unimportant \Some obvious but surprisingly hard simplex lemmas\ lemma simplex: assumes "finite s" @@ -1693,7 +1693,7 @@ qed -subsection \Relative interior of convex set\ +subsection%unimportant \Relative interior of convex set\ lemma rel_interior_convex_nonempty_aux: fixes S :: "'n::euclidean_space set" @@ -2081,7 +2081,7 @@ subsection\The relative frontier of a set\ -definition "rel_frontier S = closure S - rel_interior S" +definition%important "rel_frontier S = closure S - rel_interior S" lemma rel_frontier_empty [simp]: "rel_frontier {} = {}" by (simp add: rel_frontier_def) @@ -2460,7 +2460,7 @@ qed -subsubsection \Relative interior and closure under common operations\ +subsubsection%unimportant \Relative interior and closure under common operations\ lemma rel_interior_inter_aux: "\{rel_interior S |S. S \ I} \ \I" proof - @@ -3150,7 +3150,7 @@ by (force simp: rel_frontier_def rel_interior_Times assms closure_Times) -subsubsection \Relative interior of convex cone\ +subsubsection%unimportant \Relative interior of convex cone\ lemma cone_rel_interior: fixes S :: "'m::euclidean_space set" @@ -3423,7 +3423,7 @@ qed -subsection \Convexity on direct sums\ +subsection%unimportant \Convexity on direct sums\ lemma closure_sum: fixes S T :: "'a::real_normed_vector set" @@ -3794,7 +3794,7 @@ using \y < x\ by (simp add: field_simps) qed simp -subsection\Explicit formulas for interior and relative interior of convex hull\ +subsection%unimportant\Explicit formulas for interior and relative interior of convex hull\ lemma at_within_cbox_finite: assumes "x \ box a b" "x \ S" "finite S" @@ -4157,7 +4157,7 @@ by (metis Diff_cancel convex_hull_singleton insert_absorb2 open_segment_def segment_convex_hull) qed -subsection\Similar results for closure and (relative or absolute) frontier.\ +subsection%unimportant\Similar results for closure and (relative or absolute) frontier.\ lemma closure_convex_hull [simp]: fixes s :: "'a::euclidean_space set" @@ -4315,7 +4315,7 @@ subsection \Coplanarity, and collinearity in terms of affine hull\ -definition coplanar where +definition%important coplanar where "coplanar s \ \u v w. s \ affine hull {u,v,w}" lemma collinear_affine_hull: @@ -4767,7 +4767,7 @@ subsection\The infimum of the distance between two sets\ -definition setdist :: "'a::metric_space set \ 'a set \ real" where +definition%important setdist :: "'a::metric_space set \ 'a set \ real" where "setdist s t \ (if s = {} \ t = {} then 0 else Inf {dist x y| x y. x \ s \ y \ t})" @@ -5003,7 +5003,7 @@ \ setdist {x} S > 0" using less_eq_real_def setdist_eq_0_closedin by fastforce -subsection\Basic lemmas about hyperplanes and halfspaces\ +subsection%unimportant\Basic lemmas about hyperplanes and halfspaces\ lemma hyperplane_eq_Ex: assumes "a \ 0" obtains x where "a \ x = b" @@ -5056,7 +5056,7 @@ using halfspace_eq_empty_le [of "-a" "-b"] by simp -subsection\Use set distance for an easy proof of separation properties\ +subsection%unimportant\Use set distance for an easy proof of separation properties\ proposition separation_closures: fixes S :: "'a::euclidean_space set" @@ -5150,12 +5150,12 @@ subsection\Connectedness of the intersection of a chain\ -proposition connected_chain: +proposition%important connected_chain: fixes \ :: "'a :: euclidean_space set set" assumes cc: "\S. S \ \ \ compact S \ connected S" and linear: "\S T. S \ \ \ T \ \ \ S \ T \ T \ S" shows "connected(\\)" -proof (cases "\ = {}") +proof%unimportant (cases "\ = {}") case True then show ?thesis by auto next @@ -5299,13 +5299,13 @@ by (meson le_max_iff_disj) qed -proposition proper_map: +proposition%important proper_map: fixes f :: "'a::heine_borel \ 'b::heine_borel" assumes "closedin (subtopology euclidean S) K" and com: "\U. \U \ T; compact U\ \ compact (S \ f -` U)" and "f ` S \ T" shows "closedin (subtopology euclidean T) (f ` K)" -proof - +proof%unimportant - have "K \ S" using assms closedin_imp_subset by metis obtain C where "closed C" and Keq: "K = S \ C" @@ -5387,7 +5387,7 @@ by (simp add: continuous_on_closed * closedin_imp_subset) qed -subsection\Trivial fact: convexity equals connectedness for collinear sets\ +subsection%unimportant\Trivial fact: convexity equals connectedness for collinear sets\ lemma convex_connected_collinear: fixes S :: "'a::euclidean_space set" @@ -5605,7 +5605,7 @@ by (simp add: clo closedin_closed_Int) qed -subsubsection\Representing affine hull as a finite intersection of hyperplanes\ +subsubsection%unimportant\Representing affine hull as a finite intersection of hyperplanes\ proposition affine_hull_convex_Int_nonempty_interior: fixes S :: "'a::real_normed_vector set" @@ -5778,7 +5778,7 @@ (if a = 0 \ r > 0 then -1 else DIM('a))" using aff_dim_halfspace_le [of "-a" "-r"] by simp -subsection\Properties of special hyperplanes\ +subsection%unimportant\Properties of special hyperplanes\ lemma subspace_hyperplane: "subspace {x. a \ x = 0}" by (simp add: subspace_def inner_right_distrib) @@ -5925,7 +5925,7 @@ shows "a \ 0 \ aff_dim {x. a \ x = r} = DIM('a) - 1" by (metis aff_dim_eq_hyperplane affine_hull_eq affine_hyperplane) -subsection\Some stepping theorems\ +subsection%unimportant\Some stepping theorems\ lemma dim_empty [simp]: "dim ({} :: 'a::euclidean_space set) = 0" by (force intro!: dim_unique) @@ -6092,7 +6092,7 @@ by (metis One_nat_def \a \ 0\ affine_bounded_eq_lowdim affine_hyperplane bounded_hyperplane_eq_trivial_0) qed -subsection\General case without assuming closure and getting non-strict separation\ +subsection%unimportant\General case without assuming closure and getting non-strict separation\ proposition separating_hyperplane_closed_point_inset: fixes S :: "'a::euclidean_space set" @@ -6280,7 +6280,7 @@ by (metis assms convex_closure convex_rel_interior_closure) -subsection\ Some results on decomposing convex hulls: intersections, simplicial subdivision\ +subsection%unimportant\ Some results on decomposing convex hulls: intersections, simplicial subdivision\ lemma fixes s :: "'a::euclidean_space set" @@ -6636,7 +6636,7 @@ qed qed -subsection\Misc results about span\ +subsection%unimportant\Misc results about span\ lemma eq_span_insert_eq: assumes "(x - y) \ span S" @@ -7026,11 +7026,11 @@ apply (simp add: x) done -proposition Gram_Schmidt_step: +proposition%important Gram_Schmidt_step: fixes S :: "'a::euclidean_space set" assumes S: "pairwise orthogonal S" and x: "x \ span S" shows "orthogonal x (a - (\b\S. (b \ a / (b \ b)) *\<^sub>R b))" -proof - +proof%unimportant - have "finite S" by (simp add: S pairwise_orthogonal_imp_finite) have "orthogonal (a - (\b\S. (b \ a / (b \ b)) *\<^sub>R b)) x" @@ -7087,11 +7087,11 @@ qed -proposition orthogonal_extension: +proposition%important orthogonal_extension: fixes S :: "'a::euclidean_space set" assumes S: "pairwise orthogonal S" obtains U where "pairwise orthogonal (S \ U)" "span (S \ U) = span (S \ T)" -proof - +proof%unimportant - obtain B where "finite B" "span B = span T" using basis_subspace_exists [of "span T"] subspace_span by auto with orthogonal_extension_aux [of B S] @@ -7149,13 +7149,13 @@ done qed -proposition orthonormal_basis_subspace: +proposition%important orthonormal_basis_subspace: fixes S :: "'a :: euclidean_space set" assumes "subspace S" obtains B where "B \ S" "pairwise orthogonal B" and "\x. x \ B \ norm x = 1" and "independent B" "card B = dim S" "span B = S" -proof - +proof%unimportant - obtain B where "0 \ B" "B \ S" and orth: "pairwise orthogonal B" and "independent B" "card B = dim S" "span B = S" @@ -7186,11 +7186,11 @@ qed -proposition orthogonal_to_subspace_exists_gen: +proposition%important orthogonal_to_subspace_exists_gen: fixes S :: "'a :: euclidean_space set" assumes "span S \ span T" obtains x where "x \ 0" "x \ span T" "\y. y \ span S \ orthogonal x y" -proof - +proof%unimportant - obtain B where "B \ span S" and orthB: "pairwise orthogonal B" and "\x. x \ B \ norm x = 1" and "independent B" "card B = dim S" "span B = span S" @@ -7249,10 +7249,10 @@ by (rule orthogonal_to_subspace_exists) (simp add: orthogonal_commute span_clauses(1) that) qed -proposition orthogonal_subspace_decomp_exists: +proposition%important orthogonal_subspace_decomp_exists: fixes S :: "'a :: euclidean_space set" obtains y z where "y \ span S" "\w. w \ span S \ orthogonal z w" "x = y + z" -proof - +proof%unimportant - obtain T where "0 \ T" "T \ span S" "pairwise orthogonal T" "independent T" "card T = dim (span S)" "span T = span S" using orthogonal_basis_subspace subspace_span by blast let ?a = "\b\T. (b \ x / (b \ b)) *\<^sub>R b" @@ -7341,11 +7341,11 @@ qed qed -proposition dim_orthogonal_sum: +proposition%important dim_orthogonal_sum: fixes A :: "'a::euclidean_space set" assumes "\x y. \x \ A; y \ B\ \ x \ y = 0" shows "dim(A \ B) = dim A + dim B" -proof - +proof%unimportant - have 1: "\x y. \x \ span A; y \ B\ \ x \ y = 0" by (erule span_induct [OF _ subspace_hyperplane2]; simp add: assms) have "\x y. \x \ span A; y \ span B\ \ x \ y = 0" @@ -7472,10 +7472,10 @@ subsection\Lower-dimensional affine subsets are nowhere dense.\ -proposition dense_complement_subspace: +proposition%important dense_complement_subspace: fixes S :: "'a :: euclidean_space set" assumes dim_less: "dim T < dim S" and "subspace S" shows "closure(S - T) = S" -proof - +proof%unimportant - have "closure(S - U) = S" if "dim U < dim S" "U \ S" for U proof - have "span U \ span S" @@ -7583,7 +7583,7 @@ by (simp add: assms dense_complement_convex) -subsection\Parallel slices, etc.\ +subsection%unimportant\Parallel slices, etc.\ text\ If we take a slice out of a set, we can do it perpendicularly, with the normal vector to the slice parallel to the affine hull.\ @@ -7811,7 +7811,7 @@ subsection\Several Variants of Paracompactness\ -proposition paracompact: +proposition%important paracompact: fixes S :: "'a :: euclidean_space set" assumes "S \ \\" and opC: "\T. T \ \ \ open T" obtains \' where "S \ \ \'" @@ -7819,7 +7819,7 @@ and "\x. x \ S \ \V. open V \ x \ V \ finite {U. U \ \' \ (U \ V \ {})}" -proof (cases "S = {}") +proof%unimportant (cases "S = {}") case True with that show ?thesis by blast next case False @@ -7955,7 +7955,7 @@ using paracompact_closedin [of UNIV S \] assms by auto -subsection\Closed-graph characterization of continuity\ +subsection%unimportant\Closed-graph characterization of continuity\ lemma continuous_closed_graph_gen: fixes T :: "'b::real_normed_vector set" @@ -8026,7 +8026,7 @@ by (rule continuous_on_Un_local_open [OF opS opT]) qed -subsection\The union of two collinear segments is another segment\ +subsection%unimportant\The union of two collinear segments is another segment\ proposition in_convex_hull_exchange: fixes a :: "'a::euclidean_space" @@ -8204,14 +8204,14 @@ subsection\Covering an open set by a countable chain of compact sets\ -proposition open_Union_compact_subsets: +proposition%important open_Union_compact_subsets: fixes S :: "'a::euclidean_space set" assumes "open S" obtains C where "\n. compact(C n)" "\n. C n \ S" "\n. C n \ interior(C(Suc n))" "\(range C) = S" "\K. \compact K; K \ S\ \ \N. \n\N. K \ (C n)" -proof (cases "S = {}") +proof%unimportant (cases "S = {}") case True then show ?thesis by (rule_tac C = "\n. {}" in that) auto diff -r 9c31678d2139 -r 0acdcd8f4ba1 src/HOL/Analysis/Topology_Euclidean_Space.thy --- a/src/HOL/Analysis/Topology_Euclidean_Space.thy Thu Apr 05 06:15:02 2018 +0000 +++ b/src/HOL/Analysis/Topology_Euclidean_Space.thy Fri Apr 06 17:34:50 2018 +0200 @@ -131,7 +131,7 @@ context topological_space begin -definition "topological_basis B \ +definition%important "topological_basis B \ (\b\B. open b) \ (\x. open x \ (\B'. B' \ B \ \B' = x))" lemma topological_basis: @@ -257,7 +257,7 @@ subsection \Countable Basis\ -locale countable_basis = +locale%important countable_basis = fixes B :: "'a::topological_space set set" assumes is_basis: "topological_basis B" and countable_basis: "countable B" @@ -578,19 +578,19 @@ then show ?thesis using B(1) by auto qed -subsection \Polish spaces\ +subsection%important \Polish spaces\ text \Textbooks define Polish spaces as completely metrizable. We assume the topology to be complete for a given metric.\ -class polish_space = complete_space + second_countable_topology +class%important polish_space = complete_space + second_countable_topology subsection \General notion of a topology as a value\ -definition "istopology L \ +definition%important "istopology L \ L {} \ (\S T. L S \ L T \ L (S \ T)) \ (\K. Ball K L \ L (\K))" -typedef 'a topology = "{L::('a set) \ bool. istopology L}" +typedef%important 'a topology = "{L::('a set) \ bool. istopology L}" morphisms "openin" "topology" unfolding istopology_def by blast @@ -620,7 +620,7 @@ subsubsection \Main properties of open sets\ -lemma openin_clauses: +lemma%important openin_clauses: fixes U :: "'a topology" shows "openin U {}" @@ -683,7 +683,7 @@ subsubsection \Closed sets\ -definition "closedin U S \ S \ topspace U \ openin U (topspace U - S)" +definition%important "closedin U S \ S \ topspace U \ openin U (topspace U - S)" lemma closedin_subset: "closedin U S \ S \ topspace U" by (metis closedin_def) @@ -755,7 +755,7 @@ subsubsection \Subspace topology\ -definition "subtopology U V = topology (\T. \S. T = S \ V \ openin U S)" +definition%important "subtopology U V = topology (\T. \S. T = S \ V \ openin U S)" lemma istopology_subtopology: "istopology (\T. \S. T = S \ V \ openin U S)" (is "istopology ?L") @@ -870,7 +870,7 @@ subsubsection \The standard Euclidean topology\ -definition euclidean :: "'a::topological_space topology" +definition%important euclidean :: "'a::topological_space topology" where "euclidean = topology open" lemma open_openin: "open S \ openin euclidean S" @@ -1054,13 +1054,13 @@ subsection \Open and closed balls\ -definition ball :: "'a::metric_space \ real \ 'a set" +definition%important ball :: "'a::metric_space \ real \ 'a set" where "ball x e = {y. dist x y < e}" -definition cball :: "'a::metric_space \ real \ 'a set" +definition%important cball :: "'a::metric_space \ real \ 'a set" where "cball x e = {y. dist x y \ e}" -definition sphere :: "'a::metric_space \ real \ 'a set" +definition%important sphere :: "'a::metric_space \ real \ 'a set" where "sphere x e = {y. dist x y = e}" lemma mem_ball [simp]: "y \ ball x e \ dist x y < e" @@ -1327,11 +1327,11 @@ corollary Zero_neq_One[iff]: "0 \ One" by (metis One_non_0) -definition (in euclidean_space) eucl_less (infix " (\i\Basis. a \ i < b \ i)" -definition box_eucl_less: "box a b = {x. a x i\Basis. a \ i \ x \ i \ x \ i \ b \ i}" +definition%important box_eucl_less: "box a b = {x. a x i\Basis. a \ i \ x \ i \ x \ i \ b \ i}" lemma box_def: "box a b = {x. \i\Basis. a \ i < x \ i \ x \ i < b \ i}" and in_box_eucl_less: "x \ box a b \ a x Intervals in general, including infinite and mixtures of open and closed.\ - -definition "is_interval (s::('a::euclidean_space) set) \ +subsection \Intervals in general, including infinite and mixtures of open and closed.\ + +definition%important "is_interval (s::('a::euclidean_space) set) \ (\a\s. \b\s. \x. (\i\Basis. ((a\i \ x\i \ x\i \ b\i) \ (b\i \ x\i \ x\i \ a\i))) \ x \ s)" lemma is_interval_1: @@ -2053,7 +2053,7 @@ subsection \Limit points\ -definition (in topological_space) islimpt:: "'a \ 'a set \ bool" (infixr "islimpt" 60) +definition%important (in topological_space) islimpt:: "'a \ 'a set \ bool" (infixr "islimpt" 60) where "x islimpt S \ (\T. x\T \ open T \ (\y\S. y\T \ y\x))" lemma islimptI: @@ -2191,7 +2191,7 @@ subsection \Interior of a Set\ -definition "interior S = \{T. open T \ T \ S}" +definition%important "interior S = \{T. open T \ T \ S}" lemma interiorI [intro?]: assumes "open T" and "x \ T" and "T \ S" @@ -2359,7 +2359,7 @@ subsection \Closure of a Set\ -definition "closure S = S \ {x | x. x islimpt S}" +definition%important "closure S = S \ {x | x. x islimpt S}" lemma interior_closure: "interior S = - (closure (- S))" by (auto simp: interior_def closure_def islimpt_def) @@ -2635,7 +2635,7 @@ subsection \Frontier (also known as boundary)\ -definition "frontier S = closure S - interior S" +definition%important "frontier S = closure S - interior S" lemma frontier_closed [iff]: "closed (frontier S)" by (simp add: frontier_def closed_Diff) @@ -2726,7 +2726,7 @@ qed -subsection \Filters and the ``eventually true'' quantifier\ +subsection%unimportant \Filters and the ``eventually true'' quantifier\ definition indirection :: "'a::real_normed_vector \ 'a \ 'a filter" (infixr "indirection" 70) where "a indirection v = at a within {b. \c\0. b - a = scaleR c v}" @@ -2794,16 +2794,16 @@ subsection \Limits\ -lemma Lim: "(f \ l) net \ trivial_limit net \ (\e>0. eventually (\x. dist (f x) l < e) net)" +lemma%important Lim: "(f \ l) net \ trivial_limit net \ (\e>0. eventually (\x. dist (f x) l < e) net)" by (auto simp: tendsto_iff trivial_limit_eq) text \Show that they yield usual definitions in the various cases.\ -lemma Lim_within_le: "(f \ l)(at a within S) \ +lemma%important Lim_within_le: "(f \ l)(at a within S) \ (\e>0. \d>0. \x\S. 0 < dist x a \ dist x a \ d \ dist (f x) l < e)" by (auto simp: tendsto_iff eventually_at_le) -lemma Lim_within: "(f \ l) (at a within S) \ +lemma%important Lim_within: "(f \ l) (at a within S) \ (\e >0. \d>0. \x \ S. 0 < dist x a \ dist x a < d \ dist (f x) l < e)" by (auto simp: tendsto_iff eventually_at) @@ -2814,11 +2814,11 @@ apply (rule ex_forward [OF assms [OF half_gt_zero]], auto) done -lemma Lim_at: "(f \ l) (at a) \ +lemma%important Lim_at: "(f \ l) (at a) \ (\e >0. \d>0. \x. 0 < dist x a \ dist x a < d \ dist (f x) l < e)" by (auto simp: tendsto_iff eventually_at) -lemma Lim_at_infinity: "(f \ l) at_infinity \ (\e>0. \b. \x. norm x \ b \ dist (f x) l < e)" +lemma%important Lim_at_infinity: "(f \ l) at_infinity \ (\e>0. \b. \x. norm x \ b \ dist (f x) l < e)" by (auto simp: tendsto_iff eventually_at_infinity) corollary Lim_at_infinityI [intro?]: @@ -3411,7 +3411,7 @@ subsection \Boundedness\ (* FIXME: This has to be unified with BSEQ!! *) -definition (in metric_space) bounded :: "'a set \ bool" +definition%important (in metric_space) bounded :: "'a set \ bool" where "bounded S \ (\x e. \y\S. dist x y \ e)" lemma bounded_subset_cball: "bounded S \ (\e x. S \ cball x e \ 0 \ e)" @@ -3690,12 +3690,12 @@ subsubsection \Bolzano-Weierstrass property\ -lemma heine_borel_imp_bolzano_weierstrass: +lemma%important heine_borel_imp_bolzano_weierstrass: assumes "compact s" and "infinite t" and "t \ s" shows "\x \ s. x islimpt t" -proof (rule ccontr) +proof%unimportant (rule ccontr) assume "\ (\x \ s. x islimpt t)" then obtain f where f: "\x\s. x \ f x \ open (f x) \ (\y\t. y \ f x \ y = x)" unfolding islimpt_def @@ -4157,7 +4157,7 @@ with \U \ \A = {}\ show False by auto qed -definition "countably_compact U \ +definition%important "countably_compact U \ (\A. countable A \ (\a\A. open a) \ U \ \A \ (\T\A. finite T \ U \ \T))" lemma countably_compactE: @@ -4208,9 +4208,9 @@ unfolding C_def by (intro exI[of _ "f`T"]) fastforce qed -lemma countably_compact_imp_compact_second_countable: +lemma%important countably_compact_imp_compact_second_countable: "countably_compact U \ compact (U :: 'a :: second_countable_topology set)" -proof (rule countably_compact_imp_compact) +proof%unimportant (rule countably_compact_imp_compact) fix T and x :: 'a assume "open T" "x \ T" from topological_basisE[OF is_basis this] obtain b where @@ -4225,7 +4225,7 @@ subsubsection\Sequential compactness\ -definition seq_compact :: "'a::topological_space set \ bool" +definition%important seq_compact :: "'a::topological_space set \ bool" where "seq_compact S \ (\f. (\n. f n \ S) \ (\l\S. \r::nat\nat. strict_mono r \ ((f \ r) \ l) sequentially))" @@ -4486,10 +4486,10 @@ shows "seq_compact U \ compact U" using seq_compact_eq_countably_compact countably_compact_eq_compact by blast -lemma bolzano_weierstrass_imp_seq_compact: +lemma%important bolzano_weierstrass_imp_seq_compact: fixes s :: "'a::{t1_space, first_countable_topology} set" shows "\t. infinite t \ t \ s \ (\x \ s. x islimpt t) \ seq_compact s" - by (rule countable_acc_point_imp_seq_compact) (metis islimpt_eq_acc_point) + by%unimportant (rule countable_acc_point_imp_seq_compact) (metis islimpt_eq_acc_point) subsubsection\Totally bounded\ @@ -4497,10 +4497,10 @@ lemma cauchy_def: "Cauchy s \ (\e>0. \N. \m n. m \ N \ n \ N \ dist (s m) (s n) < e)" unfolding Cauchy_def by metis -lemma seq_compact_imp_totally_bounded: +lemma%important seq_compact_imp_totally_bounded: assumes "seq_compact s" shows "\e>0. \k. finite k \ k \ s \ s \ (\x\k. ball x e)" -proof - +proof%unimportant - { fix e::real assume "e > 0" assume *: "\k. finite k \ k \ s \ \ s \ (\x\k. ball x e)" let ?Q = "\x n r. r \ s \ (\m < (n::nat). \ (dist (x m) r < e))" have "\x. \n::nat. ?Q x n (x n)" @@ -4529,11 +4529,11 @@ subsubsection\Heine-Borel theorem\ -lemma seq_compact_imp_heine_borel: +lemma%important seq_compact_imp_heine_borel: fixes s :: "'a :: metric_space set" assumes "seq_compact s" shows "compact s" -proof - +proof%unimportant - from seq_compact_imp_totally_bounded[OF \seq_compact s\] obtain f where f: "\e>0. finite (f e) \ f e \ s \ s \ (\x\f e. ball x e)" unfolding choice_iff' .. @@ -4574,22 +4574,22 @@ qed qed -lemma compact_eq_seq_compact_metric: +lemma%important compact_eq_seq_compact_metric: "compact (s :: 'a::metric_space set) \ seq_compact s" using compact_imp_seq_compact seq_compact_imp_heine_borel by blast -lemma compact_def: \ \this is the definition of compactness in HOL Light\ +lemma%important compact_def: \ \this is the definition of compactness in HOL Light\ "compact (S :: 'a::metric_space set) \ (\f. (\n. f n \ S) \ (\l\S. \r::nat\nat. strict_mono r \ (f \ r) \ l))" unfolding compact_eq_seq_compact_metric seq_compact_def by auto subsubsection \Complete the chain of compactness variants\ -lemma compact_eq_bolzano_weierstrass: +lemma%important compact_eq_bolzano_weierstrass: fixes s :: "'a::metric_space set" shows "compact s \ (\t. infinite t \ t \ s --> (\x \ s. x islimpt t))" (is "?lhs = ?rhs") -proof +proof%unimportant assume ?lhs then show ?rhs using heine_borel_imp_bolzano_weierstrass[of s] by auto @@ -4599,7 +4599,7 @@ unfolding compact_eq_seq_compact_metric by (rule bolzano_weierstrass_imp_seq_compact) qed -lemma bolzano_weierstrass_imp_bounded: +lemma%important bolzano_weierstrass_imp_bounded: "\t. infinite t \ t \ s \ (\x \ s. x islimpt t) \ bounded s" using compact_imp_bounded unfolding compact_eq_bolzano_weierstrass . @@ -4611,16 +4611,16 @@ Heine-Borel property if every closed and bounded subset is compact. \ -class heine_borel = metric_space + +class%important heine_borel = metric_space + assumes bounded_imp_convergent_subsequence: "bounded (range f) \ \l r. strict_mono (r::nat\nat) \ ((f \ r) \ l) sequentially" -lemma bounded_closed_imp_seq_compact: +lemma%important bounded_closed_imp_seq_compact: fixes s::"'a::heine_borel set" assumes "bounded s" and "closed s" shows "seq_compact s" -proof (unfold seq_compact_def, clarify) +proof%unimportant (unfold seq_compact_def, clarify) fix f :: "nat \ 'a" assume f: "\n. f n \ s" with \bounded s\ have "bounded (range f)" @@ -4690,8 +4690,8 @@ by (metis of_nat_le_iff Int_subset_iff \K \ S\ real_arch_simple subset_cball subset_trans) qed auto -instance real :: heine_borel -proof +instance%important real :: heine_borel +proof%unimportant fix f :: "nat \ real" assume f: "bounded (range f)" obtain r :: "nat \ nat" where r: "strict_mono r" "monoseq (f \ r)" @@ -4771,8 +4771,8 @@ (auto intro!: assms bounded_linear_inner_left bounded_linear_image simp: euclidean_representation) -instance euclidean_space \ heine_borel -proof +instance%important euclidean_space \ heine_borel +proof%unimportant fix f :: "nat \ 'a" assume f: "bounded (range f)" then obtain l::'a and r where r: "strict_mono r" @@ -4818,8 +4818,8 @@ unfolding bounded_def by (metis (no_types, hide_lams) dist_snd_le image_iff order.trans) -instance prod :: (heine_borel, heine_borel) heine_borel -proof +instance%important prod :: (heine_borel, heine_borel) heine_borel +proof%unimportant fix f :: "nat \ 'a \ 'b" assume f: "bounded (range f)" then have "bounded (fst ` range f)" @@ -4845,12 +4845,12 @@ subsubsection \Completeness\ -lemma (in metric_space) completeI: +lemma%important (in metric_space) completeI: assumes "\f. \n. f n \ s \ Cauchy f \ \l\s. f \ l" shows "complete s" using assms unfolding complete_def by fast -lemma (in metric_space) completeE: +lemma%important (in metric_space) completeE: assumes "complete s" and "\n. f n \ s" and "Cauchy f" obtains l where "l \ s" and "f \ l" using assms unfolding complete_def by fast @@ -4900,10 +4900,10 @@ then show ?thesis unfolding complete_def by auto qed -lemma compact_eq_totally_bounded: +lemma%important compact_eq_totally_bounded: "compact s \ complete s \ (\e>0. \k. finite k \ s \ (\x\k. ball x e))" (is "_ \ ?rhs") -proof +proof%unimportant assume assms: "?rhs" then obtain k where k: "\e. 0 < e \ finite (k e)" "\e. 0 < e \ s \ (\x\k e. ball x e)" by (auto simp: choice_iff') @@ -5107,7 +5107,7 @@ text\Derive the epsilon-delta forms, which we often use as "definitions"\ -lemma continuous_within_eps_delta: +lemma%important continuous_within_eps_delta: "continuous (at x within s) f \ (\e>0. \d>0. \x'\ s. dist x' x < d --> dist (f x') (f x) < e)" unfolding continuous_within and Lim_within by fastforce @@ -5435,7 +5435,7 @@ by (force intro: Lim_transform_within) -subsubsection \Structural rules for pointwise continuity\ +subsubsection%unimportant \Structural rules for pointwise continuity\ lemma continuous_infnorm[continuous_intros]: "continuous F f \ continuous F (\x. infnorm (f x))" @@ -5447,7 +5447,7 @@ shows "continuous F (\x. inner (f x) (g x))" using assms unfolding continuous_def by (rule tendsto_inner) -subsubsection \Structural rules for setwise continuity\ +subsubsection%unimportant \Structural rules for setwise continuity\ lemma continuous_on_infnorm[continuous_intros]: "continuous_on s f \ continuous_on s (\x. infnorm (f x))" @@ -5461,7 +5461,7 @@ using bounded_bilinear_inner assms by (rule bounded_bilinear.continuous_on) -subsubsection \Structural rules for uniform continuity\ +subsubsection%unimportant \Structural rules for uniform continuity\ lemma uniformly_continuous_on_dist[continuous_intros]: fixes f g :: "'a::metric_space \ 'b::metric_space" @@ -5653,7 +5653,7 @@ shows "closedin (subtopology euclidean S) (S \ f -` T)" using assms continuous_on_closed by blast -subsection \Half-global and completely global cases.\ +subsection%unimportant \Half-global and completely global cases.\ lemma continuous_openin_preimage_gen: assumes "continuous_on S f" "open T" @@ -5743,7 +5743,7 @@ with \x = f y\ show "x \ f ` interior S" .. qed -subsection \Topological properties of linear functions.\ +subsection%unimportant \Topological properties of linear functions.\ lemma linear_lim_0: assumes "bounded_linear f" @@ -5771,7 +5771,7 @@ "bounded_linear f \ continuous_on s f" using continuous_at_imp_continuous_on[of s f] using linear_continuous_at[of f] by auto -subsection \Intervals\ +subsection%unimportant \Intervals\ text \Openness of halfspaces.\