equal
deleted
inserted
replaced
1947 then show "\<exists>M. \<forall>m\<ge>M. \<forall>n>m. dist (f m) (f n) < e" |
1947 then show "\<exists>M. \<forall>m\<ge>M. \<forall>n>m. dist (f m) (f n) < e" |
1948 by (intro exI[of _ M]) force |
1948 by (intro exI[of _ M]) force |
1949 qed |
1949 qed |
1950 qed |
1950 qed |
1951 |
1951 |
|
1952 lemma (in metric_space) Cauchy_altdef2: "Cauchy s \<longleftrightarrow> (\<forall>e>0. \<exists>N::nat. \<forall>n\<ge>N. dist(s n)(s N) < e)" (is "?lhs = ?rhs") |
|
1953 proof |
|
1954 assume "Cauchy s" |
|
1955 then show ?rhs by (force simp add: Cauchy_def) |
|
1956 next |
|
1957 assume ?rhs |
|
1958 { |
|
1959 fix e::real |
|
1960 assume "e>0" |
|
1961 with \<open>?rhs\<close> obtain N where N: "\<forall>n\<ge>N. dist (s n) (s N) < e/2" |
|
1962 by (erule_tac x="e/2" in allE) auto |
|
1963 { |
|
1964 fix n m |
|
1965 assume nm: "N \<le> m \<and> N \<le> n" |
|
1966 then have "dist (s m) (s n) < e" using N |
|
1967 using dist_triangle_half_l[of "s m" "s N" "e" "s n"] |
|
1968 by blast |
|
1969 } |
|
1970 then have "\<exists>N. \<forall>m n. N \<le> m \<and> N \<le> n \<longrightarrow> dist (s m) (s n) < e" |
|
1971 by blast |
|
1972 } |
|
1973 then have ?lhs |
|
1974 unfolding Cauchy_def by blast |
|
1975 then show ?lhs |
|
1976 by blast |
|
1977 qed |
|
1978 |
1952 lemma (in metric_space) metric_CauchyI: |
1979 lemma (in metric_space) metric_CauchyI: |
1953 "(\<And>e. 0 < e \<Longrightarrow> \<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. dist (X m) (X n) < e) \<Longrightarrow> Cauchy X" |
1980 "(\<And>e. 0 < e \<Longrightarrow> \<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. dist (X m) (X n) < e) \<Longrightarrow> Cauchy X" |
1954 by (simp add: Cauchy_def) |
1981 by (simp add: Cauchy_def) |
1955 |
1982 |
1956 lemma (in metric_space) CauchyI': |
1983 lemma (in metric_space) CauchyI': |