# HG changeset patch # User huffman # Date 1243617996 25200 # Node ID c13b080bfb34127d06bfa025db7e8cddbd5ef2b1 # Parent 5cddd98abe147f835f8f0b3c268b33f0c21b35a4 remove duplicate cauchy constant diff -r 5cddd98abe14 -r c13b080bfb34 src/HOL/Library/Topology_Euclidean_Space.thy --- a/src/HOL/Library/Topology_Euclidean_Space.thy Fri May 29 10:02:47 2009 -0700 +++ b/src/HOL/Library/Topology_Euclidean_Space.thy Fri May 29 10:26:36 2009 -0700 @@ -2270,16 +2270,14 @@ subsection{* Completeness. *} - (* FIXME: Unify this with Cauchy from SEQ!!!!!*) - -definition - cauchy :: "(nat \ real ^ 'n::finite) \ bool" where - "cauchy s \ (\e>0. \N. \m n. m \ N \ n \ N --> dist(s m)(s n) < e)" - -definition complete_def:"complete s \ (\f::(nat=>real^'a::finite). (\n. f n \ s) \ cauchy f +lemma cauchy_def: + "Cauchy s \ (\e>0. \N. \m n. m \ N \ n \ N --> dist(s m)(s n) < e)" +unfolding Cauchy_def by blast + +definition complete_def:"complete s \ (\f::(nat=>real^'a::finite). (\n. f n \ s) \ Cauchy f --> (\l \ s. (f ---> l) sequentially))" -lemma cauchy: "cauchy s \ (\e>0.\ N::nat. \n\N. dist(s n)(s N) < e)" (is "?lhs = ?rhs") +lemma cauchy: "Cauchy s \ (\e>0.\ N::nat. \n\N. dist(s n)(s N) < e)" (is "?lhs = ?rhs") proof- { assume ?rhs { fix e::real @@ -2306,14 +2304,14 @@ qed lemma convergent_imp_cauchy: - "(s ---> l) sequentially ==> cauchy s" + "(s ---> l) sequentially ==> Cauchy s" proof(simp only: cauchy_def, rule, rule) fix e::real assume "e>0" "(s ---> l) sequentially" then obtain N::nat where N:"\n\N. dist (s n) l < e/2" unfolding Lim_sequentially by(erule_tac x="e/2" in allE) auto 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 {y. (\n::nat. y = s n)}" 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 @@ -2332,7 +2330,7 @@ lemma compact_imp_complete: assumes "compact s" shows "complete s" proof- - { fix f assume as: "(\n::nat. f n \ s)" "cauchy f" + { fix f assume as: "(\n::nat. f n \ s)" "Cauchy f" from as(1) obtain l r where lr: "l\s" "(\m n. m < n \ r m < r n)" "((f \ r) ---> l) sequentially" using assms unfolding compact_def by blast { fix n :: nat have lr':"n \ r n" @@ -2358,11 +2356,11 @@ lemma complete_univ: "complete UNIV" proof(simp add: complete_def, rule, rule) - fix f::"nat \ real^'n::finite" assume "cauchy f" + fix f::"nat \ real^'n::finite" assume "Cauchy f" hence "bounded (f`UNIV)" using cauchy_imp_bounded[of f] unfolding image_def by auto hence "compact (closure (f`UNIV))" using bounded_closed_imp_compact[of "closure (range f)"] by auto hence "complete (closure (range f))" using compact_imp_complete by auto - thus "\l. (f ---> l) sequentially" unfolding complete_def[of "closure (range f)"] using `cauchy f` unfolding closure_def by auto + thus "\l. (f ---> l) sequentially" unfolding complete_def[of "closure (range f)"] using `Cauchy f` unfolding closure_def by auto qed lemma complete_eq_closed: "complete s \ closed s" (is "?lhs = ?rhs") @@ -2375,13 +2373,13 @@ thus ?rhs unfolding closed_limpt by auto next assume ?rhs - { fix f assume as:"\n::nat. f n \ s" "cauchy f" + { fix f assume as:"\n::nat. f n \ s" "Cauchy f" then obtain l where "(f ---> l) sequentially" using complete_univ[unfolded complete_def, THEN spec[where x=f]] by auto hence "\l\s. (f ---> l) sequentially" using `?rhs`[unfolded closed_sequential_limits, THEN spec[where x=f], THEN spec[where x=l]] using as(1) by auto } thus ?lhs unfolding complete_def by auto qed -lemma convergent_eq_cauchy: "(\l. (s ---> l) sequentially) \ cauchy s" (is "?lhs = ?rhs") +lemma convergent_eq_cauchy: "(\l. (s ---> l) sequentially) \ Cauchy s" (is "?lhs = ?rhs") proof assume ?lhs then obtain l where "(s ---> l) sequentially" by auto thus ?rhs using convergent_imp_cauchy by auto @@ -2420,7 +2418,7 @@ qed } hence "\n::nat. x n \ s" and x:"\n. \m < n. \ (dist (x m) (x n) < e)" by blast+ then obtain l r where "l\s" and r:"\m n. m < n \ r m < r n" and "((x \ r) ---> l) sequentially" using assms(1)[unfolded compact_def, THEN spec[where x=x]] by auto - from this(3) have "cauchy (x \ r)" using convergent_imp_cauchy by auto + from this(3) have "Cauchy (x \ r)" using convergent_imp_cauchy by auto then obtain N::nat where N:"\m n. N \ m \ N \ n \ dist ((x \ r) m) ((x \ r) n) < e" unfolding cauchy_def using `e>0` by auto show False using N[THEN spec[where x=N], THEN spec[where x="N+1"]] @@ -2824,7 +2822,7 @@ } hence "\N. \m n. N \ m \ N \ n \ dist (t m) (t n) < e" by auto } - hence "cauchy t" unfolding cauchy_def by auto + hence "Cauchy t" unfolding cauchy_def by auto then obtain l where l:"(t ---> l) sequentially" using complete_univ unfolding complete_def by auto { fix n::nat { fix e::real assume "e>0" @@ -2876,7 +2874,7 @@ thus ?rhs by auto next assume ?rhs - hence "\x. P x \ cauchy (\n. s n x)" unfolding cauchy_def apply auto by (erule_tac x=e in allE)auto + hence "\x. P x \ Cauchy (\n. s n x)" unfolding cauchy_def apply auto by (erule_tac x=e in allE)auto then obtain l where l:"\x. P x \ ((\n. s n x) ---> l x) sequentially" unfolding convergent_eq_cauchy[THEN sym] using choice[of "\x l. P x \ ((\n. s n x) ---> l) sequentially"] by auto { fix e::real assume "e>0" @@ -4738,7 +4736,7 @@ using set_eq_subset[of "{a .. b}" "{c .. d}"] using subset_interval_1(1)[of a b c d] using subset_interval_1(1)[of c d a b] -by auto +by auto (* FIXME: slow *) lemma disjoint_interval_1: fixes a :: "real^1" shows "{a .. b} \ {c .. d} = {} \ dest_vec1 b < dest_vec1 a \ dest_vec1 d < dest_vec1 c \ dest_vec1 b < dest_vec1 c \ dest_vec1 d < dest_vec1 a" @@ -5145,8 +5143,9 @@ text{* "Isometry" (up to constant bounds) of injective linear map etc. *} lemma cauchy_isometric: - assumes e:"0 < e" and s:"subspace s" and f:"linear f" and normf:"\x\s. norm(f x) \ e * norm(x)" and xs:"\n::nat. x n \ s" and cf:"cauchy(f o x)" - shows "cauchy x" + fixes x :: "nat \ real ^ 'n::finite" + assumes e:"0 < e" and s:"subspace s" and f:"linear f" and normf:"\x\s. norm(f x) \ e * norm(x)" and xs:"\n::nat. x n \ s" and cf:"Cauchy(f o x)" + shows "Cauchy x" proof- { fix d::real assume "d>0" then obtain N where N:"\n\N. norm (f (x n) - f (x N)) < e * d" @@ -5166,7 +5165,7 @@ assumes "0 < e" and s:"subspace s" and f:"linear f" and normf:"\x\s. norm(f x) \ e * norm(x)" and cs:"complete s" shows "complete(f ` s)" proof- - { fix g assume as:"\n::nat. g n \ f ` s" and cfg:"cauchy g" + { fix g assume as:"\n::nat. g n \ f ` s" and cfg:"Cauchy g" then obtain x where "\n. x n \ s \ g n = f (x n)" unfolding image_iff and Bex_def using choice[of "\ n xa. xa \ s \ g n = f xa"] by auto hence x:"\n. x n \ s" "\n. g n = f (x n)" by auto @@ -5559,7 +5558,7 @@ thus ?thesis by auto qed } - hence "cauchy z" unfolding cauchy_def by auto + hence "Cauchy z" unfolding cauchy_def by auto then obtain x where "x\s" and x:"(z ---> x) sequentially" using s(1)[unfolded compact_def complete_def, THEN spec[where x=z]] and z_in_s by auto def e \ "dist (f x) x"