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 |
634 instance int :: topological_comm_monoid_add |
634 instance int :: topological_comm_monoid_add |
635 proof qed (simp add: nhds_discrete principal_prod_principal filterlim_principal eventually_principal) |
635 proof qed (simp add: nhds_discrete principal_prod_principal filterlim_principal eventually_principal) |
636 |
636 |
637 subsubsection \<open>Addition and subtraction\<close> |
637 subsubsection \<open>Topological group\<close> |
638 |
638 |
639 instance real_normed_vector < topological_comm_monoid_add |
639 class topological_group_add = topological_monoid_add + group_add + |
|
640 assumes tendsto_uminus_nhds: "(uminus \<longlongrightarrow> - a) (nhds a)" |
|
641 begin |
|
642 |
|
643 lemma tendsto_minus [tendsto_intros]: "(f \<longlongrightarrow> a) F \<Longrightarrow> ((\<lambda>x. - f x) \<longlongrightarrow> -a) F" |
|
644 by (rule filterlim_compose[OF tendsto_uminus_nhds]) |
|
645 |
|
646 end |
|
647 |
|
648 class topological_ab_group_add = topological_group_add + ab_group_add |
|
649 |
|
650 instance topological_ab_group_add < topological_comm_monoid_add .. |
|
651 |
|
652 lemma continuous_minus [continuous_intros]: |
|
653 fixes f :: "'a::t2_space \<Rightarrow> 'b::topological_group_add" |
|
654 shows "continuous F f \<Longrightarrow> continuous F (\<lambda>x. - f x)" |
|
655 unfolding continuous_def by (rule tendsto_minus) |
|
656 |
|
657 lemma continuous_on_minus [continuous_intros]: |
|
658 fixes f :: "_ \<Rightarrow> 'b::topological_group_add" |
|
659 shows "continuous_on s f \<Longrightarrow> continuous_on s (\<lambda>x. - f x)" |
|
660 unfolding continuous_on_def by (auto intro: tendsto_minus) |
|
661 |
|
662 lemma tendsto_minus_cancel: |
|
663 fixes a :: "'a::topological_group_add" |
|
664 shows "((\<lambda>x. - f x) \<longlongrightarrow> - a) F \<Longrightarrow> (f \<longlongrightarrow> a) F" |
|
665 by (drule tendsto_minus, simp) |
|
666 |
|
667 lemma tendsto_minus_cancel_left: |
|
668 "(f \<longlongrightarrow> - (y::_::topological_group_add)) F \<longleftrightarrow> ((\<lambda>x. - f x) \<longlongrightarrow> y) F" |
|
669 using tendsto_minus_cancel[of f "- y" F] tendsto_minus[of f "- y" F] |
|
670 by auto |
|
671 |
|
672 lemma tendsto_diff [tendsto_intros]: |
|
673 fixes a b :: "'a::topological_group_add" |
|
674 shows "\<lbrakk>(f \<longlongrightarrow> a) F; (g \<longlongrightarrow> b) F\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x - g x) \<longlongrightarrow> a - b) F" |
|
675 using tendsto_add [of f a F "\<lambda>x. - g x" "- b"] by (simp add: tendsto_minus) |
|
676 |
|
677 lemma continuous_diff [continuous_intros]: |
|
678 fixes f g :: "'a::t2_space \<Rightarrow> 'b::topological_group_add" |
|
679 shows "continuous F f \<Longrightarrow> continuous F g \<Longrightarrow> continuous F (\<lambda>x. f x - g x)" |
|
680 unfolding continuous_def by (rule tendsto_diff) |
|
681 |
|
682 lemma continuous_on_diff [continuous_intros]: |
|
683 fixes f g :: "_ \<Rightarrow> 'b::topological_group_add" |
|
684 shows "continuous_on s f \<Longrightarrow> continuous_on s g \<Longrightarrow> continuous_on s (\<lambda>x. f x - g x)" |
|
685 unfolding continuous_on_def by (auto intro: tendsto_diff) |
|
686 |
|
687 lemma continuous_on_op_minus: "continuous_on (s::'a::topological_group_add set) (op - x)" |
|
688 by (rule continuous_intros | simp)+ |
|
689 |
|
690 instance real_normed_vector < topological_ab_group_add |
640 proof |
691 proof |
641 fix a b :: 'a show "((\<lambda>x. fst x + snd x) \<longlongrightarrow> a + b) (nhds a \<times>\<^sub>F nhds b)" |
692 fix a b :: 'a show "((\<lambda>x. fst x + snd x) \<longlongrightarrow> a + b) (nhds a \<times>\<^sub>F nhds b)" |
642 unfolding tendsto_Zfun_iff add_diff_add |
693 unfolding tendsto_Zfun_iff add_diff_add |
643 using tendsto_fst[OF filterlim_ident, of "(a,b)"] tendsto_snd[OF filterlim_ident, of "(a,b)"] |
694 using tendsto_fst[OF filterlim_ident, of "(a,b)"] tendsto_snd[OF filterlim_ident, of "(a,b)"] |
644 by (intro Zfun_add) |
695 by (intro Zfun_add) |
645 (auto simp add: tendsto_Zfun_iff[symmetric] nhds_prod[symmetric] intro!: tendsto_fst) |
696 (auto simp add: tendsto_Zfun_iff[symmetric] nhds_prod[symmetric] intro!: tendsto_fst) |
646 qed |
697 show "(uminus \<longlongrightarrow> - a) (nhds a)" |
647 |
698 unfolding tendsto_Zfun_iff minus_diff_minus |
648 lemma tendsto_minus [tendsto_intros]: |
699 using filterlim_ident[of "nhds a"] |
649 fixes a :: "'a::real_normed_vector" |
700 by (intro Zfun_minus) (simp add: tendsto_Zfun_iff) |
650 shows "(f \<longlongrightarrow> a) F \<Longrightarrow> ((\<lambda>x. - f x) \<longlongrightarrow> - a) F" |
701 qed |
651 by (simp only: tendsto_Zfun_iff minus_diff_minus Zfun_minus) |
|
652 |
|
653 lemma continuous_minus [continuous_intros]: |
|
654 fixes f :: "'a::t2_space \<Rightarrow> 'b::real_normed_vector" |
|
655 shows "continuous F f \<Longrightarrow> continuous F (\<lambda>x. - f x)" |
|
656 unfolding continuous_def by (rule tendsto_minus) |
|
657 |
|
658 lemma continuous_on_minus [continuous_intros]: |
|
659 fixes f :: "_ \<Rightarrow> 'b::real_normed_vector" |
|
660 shows "continuous_on s f \<Longrightarrow> continuous_on s (\<lambda>x. - f x)" |
|
661 unfolding continuous_on_def by (auto intro: tendsto_minus) |
|
662 |
|
663 lemma tendsto_minus_cancel: |
|
664 fixes a :: "'a::real_normed_vector" |
|
665 shows "((\<lambda>x. - f x) \<longlongrightarrow> - a) F \<Longrightarrow> (f \<longlongrightarrow> a) F" |
|
666 by (drule tendsto_minus, simp) |
|
667 |
|
668 lemma tendsto_minus_cancel_left: |
|
669 "(f \<longlongrightarrow> - (y::_::real_normed_vector)) F \<longleftrightarrow> ((\<lambda>x. - f x) \<longlongrightarrow> y) F" |
|
670 using tendsto_minus_cancel[of f "- y" F] tendsto_minus[of f "- y" F] |
|
671 by auto |
|
672 |
|
673 lemma tendsto_diff [tendsto_intros]: |
|
674 fixes a b :: "'a::real_normed_vector" |
|
675 shows "\<lbrakk>(f \<longlongrightarrow> a) F; (g \<longlongrightarrow> b) F\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x - g x) \<longlongrightarrow> a - b) F" |
|
676 using tendsto_add [of f a F "\<lambda>x. - g x" "- b"] by (simp add: tendsto_minus) |
|
677 |
|
678 lemma continuous_diff [continuous_intros]: |
|
679 fixes f g :: "'a::t2_space \<Rightarrow> 'b::real_normed_vector" |
|
680 shows "continuous F f \<Longrightarrow> continuous F g \<Longrightarrow> continuous F (\<lambda>x. f x - g x)" |
|
681 unfolding continuous_def by (rule tendsto_diff) |
|
682 |
|
683 lemma continuous_on_diff [continuous_intros]: |
|
684 fixes f g :: "_ \<Rightarrow> 'b::real_normed_vector" |
|
685 shows "continuous_on s f \<Longrightarrow> continuous_on s g \<Longrightarrow> continuous_on s (\<lambda>x. f x - g x)" |
|
686 unfolding continuous_on_def by (auto intro: tendsto_diff) |
|
687 |
|
688 lemma continuous_on_op_minus: "continuous_on (s::'a::real_normed_vector set) (op - x)" |
|
689 by (rule continuous_intros | simp)+ |
|
690 |
702 |
691 lemmas real_tendsto_sandwich = tendsto_sandwich[where 'b=real] |
703 lemmas real_tendsto_sandwich = tendsto_sandwich[where 'b=real] |
692 |
704 |
693 subsubsection \<open>Linear operators and multiplication\<close> |
705 subsubsection \<open>Linear operators and multiplication\<close> |
694 |
706 |