equal
deleted
inserted
replaced
18 show "(\<lambda>P. True) \<in> ?filter" by simp |
18 show "(\<lambda>P. True) \<in> ?filter" by simp |
19 qed |
19 qed |
20 |
20 |
21 definition |
21 definition |
22 eventually :: "('a \<Rightarrow> bool) \<Rightarrow> 'a filter \<Rightarrow> bool" where |
22 eventually :: "('a \<Rightarrow> bool) \<Rightarrow> 'a filter \<Rightarrow> bool" where |
23 "eventually P F \<longleftrightarrow> Rep_filter F P" |
23 [simp del]: "eventually P F \<longleftrightarrow> Rep_filter F P" |
24 |
24 |
25 lemma eventually_True [simp]: "eventually (\<lambda>x. True) F" |
25 lemma eventually_True [simp]: "eventually (\<lambda>x. True) F" |
26 unfolding eventually_def using Rep_filter [of F] by blast |
26 unfolding eventually_def using Rep_filter [of F] by blast |
27 |
27 |
28 lemma eventually_mono: |
28 lemma eventually_mono: |
83 |
83 |
84 subsection {* Convergence to Zero *} |
84 subsection {* Convergence to Zero *} |
85 |
85 |
86 definition |
86 definition |
87 Zfun :: "('a \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'a filter \<Rightarrow> bool" where |
87 Zfun :: "('a \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'a filter \<Rightarrow> bool" where |
88 "Zfun S F = (\<forall>r>0. eventually (\<lambda>i. norm (S i) < r) F)" |
88 [code del]: "Zfun S F = (\<forall>r>0. eventually (\<lambda>i. norm (S i) < r) F)" |
89 |
89 |
90 lemma ZfunI: |
90 lemma ZfunI: |
91 "(\<And>r. 0 < r \<Longrightarrow> eventually (\<lambda>i. norm (S i) < r) F) \<Longrightarrow> Zfun S F" |
91 "(\<And>r. 0 < r \<Longrightarrow> eventually (\<lambda>i. norm (S i) < r) F) \<Longrightarrow> Zfun S F" |
92 unfolding Zfun_def by simp |
92 unfolding Zfun_def by simp |
93 |
93 |
226 |
226 |
227 subsection{* Limits *} |
227 subsection{* Limits *} |
228 |
228 |
229 definition |
229 definition |
230 tendsto :: "('a \<Rightarrow> 'b::metric_space) \<Rightarrow> 'b \<Rightarrow> 'a filter \<Rightarrow> bool" where |
230 tendsto :: "('a \<Rightarrow> 'b::metric_space) \<Rightarrow> 'b \<Rightarrow> 'a filter \<Rightarrow> bool" where |
231 "tendsto f l net \<longleftrightarrow> (\<forall>e>0. eventually (\<lambda>x. dist (f x) l < e) net)" |
231 [code del]: "tendsto f l net \<longleftrightarrow> (\<forall>e>0. eventually (\<lambda>x. dist (f x) l < e) net)" |
232 |
232 |
233 lemma tendstoI: |
233 lemma tendstoI: |
234 "(\<And>e. 0 < e \<Longrightarrow> eventually (\<lambda>x. dist (f x) l < e) net) |
234 "(\<And>e. 0 < e \<Longrightarrow> eventually (\<lambda>x. dist (f x) l < e) net) |
235 \<Longrightarrow> tendsto f l net" |
235 \<Longrightarrow> tendsto f l net" |
236 unfolding tendsto_def by auto |
236 unfolding tendsto_def by auto |