609 shows "\<lbrakk>(f \<longlongrightarrow> 0) F; (g \<longlongrightarrow> 0) F\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> 0) F" |
609 shows "\<lbrakk>(f \<longlongrightarrow> 0) F; (g \<longlongrightarrow> 0) F\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> 0) F" |
610 by (drule (1) tendsto_add, simp) |
610 by (drule (1) tendsto_add, simp) |
611 |
611 |
612 lemma tendsto_setsum [tendsto_intros]: |
612 lemma tendsto_setsum [tendsto_intros]: |
613 fixes f :: "'a \<Rightarrow> 'b \<Rightarrow> 'c::topological_comm_monoid_add" |
613 fixes f :: "'a \<Rightarrow> 'b \<Rightarrow> 'c::topological_comm_monoid_add" |
614 assumes "\<And>i. i \<in> S \<Longrightarrow> (f i \<longlongrightarrow> a i) F" |
614 assumes "\<And>i. i \<in> I \<Longrightarrow> (f i \<longlongrightarrow> a i) F" |
615 shows "((\<lambda>x. \<Sum>i\<in>S. f i x) \<longlongrightarrow> (\<Sum>i\<in>S. a i)) F" |
615 shows "((\<lambda>x. \<Sum>i\<in>I. f i x) \<longlongrightarrow> (\<Sum>i\<in>I. a i)) F" |
616 proof (cases "finite S") |
616 proof (cases "finite I") |
617 assume "finite S" thus ?thesis using assms |
617 assume "finite I" thus ?thesis using assms |
618 by (induct, simp, simp add: tendsto_add) |
618 by (induct, simp, simp add: tendsto_add) |
619 qed simp |
619 qed simp |
620 |
620 |
621 lemma continuous_setsum [continuous_intros]: |
621 lemma continuous_setsum [continuous_intros]: |
622 fixes f :: "'a \<Rightarrow> 'b::t2_space \<Rightarrow> 'c::topological_comm_monoid_add" |
622 fixes f :: "'a \<Rightarrow> 'b::t2_space \<Rightarrow> 'c::topological_comm_monoid_add" |
623 shows "(\<And>i. i \<in> S \<Longrightarrow> continuous F (f i)) \<Longrightarrow> continuous F (\<lambda>x. \<Sum>i\<in>S. f i x)" |
623 shows "(\<And>i. i \<in> I \<Longrightarrow> continuous F (f i)) \<Longrightarrow> continuous F (\<lambda>x. \<Sum>i\<in>I. f i x)" |
624 unfolding continuous_def by (rule tendsto_setsum) |
624 unfolding continuous_def by (rule tendsto_setsum) |
625 |
625 |
626 lemma continuous_on_setsum [continuous_intros]: |
626 lemma continuous_on_setsum [continuous_intros]: |
627 fixes f :: "'a \<Rightarrow> 'b::topological_space \<Rightarrow> 'c::topological_comm_monoid_add" |
627 fixes f :: "'a \<Rightarrow> 'b::topological_space \<Rightarrow> 'c::topological_comm_monoid_add" |
628 shows "(\<And>i. i \<in> S \<Longrightarrow> continuous_on s (f i)) \<Longrightarrow> continuous_on s (\<lambda>x. \<Sum>i\<in>S. f i x)" |
628 shows "(\<And>i. i \<in> I \<Longrightarrow> continuous_on S (f i)) \<Longrightarrow> continuous_on S (\<lambda>x. \<Sum>i\<in>I. f i x)" |
629 unfolding continuous_on_def by (auto intro: tendsto_setsum) |
629 unfolding continuous_on_def by (auto intro: tendsto_setsum) |
630 |
630 |
631 instance nat :: topological_comm_monoid_add |
631 instance nat :: topological_comm_monoid_add |
632 proof qed (simp add: nhds_discrete principal_prod_principal filterlim_principal eventually_principal) |
632 proof qed (simp add: nhds_discrete principal_prod_principal filterlim_principal eventually_principal) |
633 |
633 |