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.\