# HG changeset patch # User huffman # Date 1259086499 28800 # Node ID 22758f95e624e44117b85b4de0f27bb0fa2bd017 # Parent 9095ba4d2cd49dc41a3dc79399e72a17d32549cb re-state lemmas using 'range' diff -r 9095ba4d2cd4 -r 22758f95e624 src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy --- a/src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy Sun Nov 29 22:27:47 2009 -0800 +++ b/src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy Tue Nov 24 10:14:59 2009 -0800 @@ -2437,7 +2437,7 @@ thus "\N. \m n. N \ m \ N \ n \ dist (s m) (s n) < e" using dist_triangle_half_l[of _ l e _] by (rule_tac x=N in exI) auto qed -lemma cauchy_imp_bounded: assumes "Cauchy s" shows "bounded {y. (\n::nat. y = s n)}" +lemma cauchy_imp_bounded: assumes "Cauchy s" shows "bounded (range s)" proof- from assms obtain N::nat where "\m n. N \ m \ N \ n \ dist (s m) (s n) < 1" unfolding cauchy_def apply(erule_tac x= 1 in allE) by auto hence N:"\n. N \ n \ dist (s N) (s n) < 1" by auto @@ -2448,7 +2448,7 @@ ultimately show "?thesis" unfolding bounded_any_center [where a="s N"] apply(rule_tac x="max a 1" in exI) apply auto - apply(erule_tac x=n in allE) apply(erule_tac x=n in ballE) by auto + apply(erule_tac x=y in allE) apply(erule_tac x=y in ballE) by auto qed lemma compact_imp_complete: assumes "compact s" shows "complete s" @@ -2474,12 +2474,12 @@ instance heine_borel < complete_space proof fix f :: "nat \ 'a" assume "Cauchy f" - hence "bounded (range f)" unfolding image_def - using cauchy_imp_bounded [of f] by auto + hence "bounded (range f)" + by (rule cauchy_imp_bounded) hence "compact (closure (range f))" using bounded_closed_imp_compact [of "closure (range f)"] by auto hence "complete (closure (range f))" - using compact_imp_complete by auto + by (rule compact_imp_complete) moreover have "\n. f n \ closure (range f)" using closure_subset [of "range f"] by auto ultimately have "\l\closure (range f). (f ---> l) sequentially" @@ -2732,10 +2732,10 @@ lemma sequence_infinite_lemma: fixes l :: "'a::metric_space" (* TODO: generalize *) assumes "\n::nat. (f n \ l)" "(f ---> l) sequentially" - shows "infinite {y. (\ n. y = f n)}" -proof(rule ccontr) - let ?A = "(\x. dist x l) ` {y. \n. y = f n}" - assume "\ infinite {y. \n. y = f n}" + shows "infinite (range f)" +proof + let ?A = "(\x. dist x l) ` range f" + assume "finite (range f)" hence **:"finite ?A" "?A \ {}" by auto obtain k where k:"dist (f k) l = Min ?A" using Min_in[OF **] by auto have "0 < Min ?A" using assms(1) unfolding dist_nz unfolding Min_gr_iff[OF **] by auto @@ -2746,7 +2746,7 @@ lemma sequence_unique_limpt: fixes l :: "'a::metric_space" (* TODO: generalize *) - assumes "\n::nat. (f n \ l)" "(f ---> l) sequentially" "l' islimpt {y. (\n. y = f n)}" + assumes "\n::nat. (f n \ l)" "(f ---> l) sequentially" "l' islimpt (range f)" shows "l' = l" proof(rule ccontr) def e \ "dist l' l" @@ -2773,8 +2773,8 @@ case False thus "l\s" using as(1) by auto next case True note cas = this - with as(2) have "infinite {y. \n. y = x n}" using sequence_infinite_lemma[of x l] by auto - then obtain l' where "l'\s" "l' islimpt {y. \n. y = x n}" using assms[THEN spec[where x="{y. \n. y = x n}"]] as(1) by auto + with as(2) have "infinite (range x)" using sequence_infinite_lemma[of x l] by auto + then obtain l' where "l'\s" "l' islimpt (range x)" using assms[THEN spec[where x="range x"]] as(1) by auto thus "l\s" using sequence_unique_limpt[of x l l'] using as cas by auto qed } thus ?thesis unfolding closed_sequential_limits by fast @@ -3031,21 +3031,22 @@ text{* Strengthen it to the intersection actually being a singleton. *} lemma decreasing_closed_nest_sing: + fixes s :: "nat \ 'a::heine_borel set" assumes "\n. closed(s n)" "\n. s n \ {}" "\m n. m \ n --> s n \ s m" "\e>0. \n. \x \ (s n). \ y\(s n). dist x y < e" - shows "\a::'a::heine_borel. \ {t. (\n::nat. t = s n)} = {a}" + shows "\a. \(range s) = {a}" proof- obtain a where a:"\n. a \ s n" using decreasing_closed_nest[of s] using assms by auto - { fix b assume b:"b \ \{t. \n. t = s n}" + { fix b assume b:"b \ \(range s)" { fix e::real assume "e>0" hence "dist a b < e" using assms(4 )using b using a by blast } hence "dist a b = 0" by (metis dist_eq_0_iff dist_nz real_less_def) } - with a have "\{t. \n. t = s n} = {a}" by auto - thus ?thesis by auto + with a have "\(range s) = {a}" unfolding image_def by auto + thus ?thesis .. qed text{* Cauchy-type criteria for uniform convergence. *}