2643 qed |
2643 qed |
2644 |
2644 |
2645 |
2645 |
2646 lemma continuous_map_uniform_limit_alt: |
2646 lemma continuous_map_uniform_limit_alt: |
2647 assumes contf: "\<forall>\<^sub>F \<xi> in F. continuous_map X mtopology (f \<xi>)" |
2647 assumes contf: "\<forall>\<^sub>F \<xi> in F. continuous_map X mtopology (f \<xi>)" |
2648 and gim: "g ` (topspace X) \<subseteq> M" |
2648 and gim: "g \<in> topspace X \<rightarrow> M" |
2649 and dfg: "\<And>\<epsilon>. 0 < \<epsilon> \<Longrightarrow> \<forall>\<^sub>F \<xi> in F. \<forall>x \<in> topspace X. d (f \<xi> x) (g x) < \<epsilon>" |
2649 and dfg: "\<And>\<epsilon>. 0 < \<epsilon> \<Longrightarrow> \<forall>\<^sub>F \<xi> in F. \<forall>x \<in> topspace X. d (f \<xi> x) (g x) < \<epsilon>" |
2650 and nontriv: "\<not> trivial_limit F" |
2650 and nontriv: "\<not> trivial_limit F" |
2651 shows "continuous_map X mtopology g" |
2651 shows "continuous_map X mtopology g" |
2652 proof (rule continuous_map_uniform_limit [OF contf]) |
2652 proof (rule continuous_map_uniform_limit [OF contf]) |
2653 fix \<epsilon> :: real |
2653 fix \<epsilon> :: real |
2654 assume "\<epsilon> > 0" |
2654 assume "\<epsilon> > 0" |
2655 with gim dfg show "\<forall>\<^sub>F \<xi> in F. \<forall>x\<in>topspace X. g x \<in> M \<and> d (f \<xi> x) (g x) < \<epsilon>" |
2655 with gim dfg show "\<forall>\<^sub>F \<xi> in F. \<forall>x\<in>topspace X. g x \<in> M \<and> d (f \<xi> x) (g x) < \<epsilon>" |
2656 by (simp add: image_subset_iff) |
2656 by (simp add: Pi_iff) |
2657 qed (use nontriv in auto) |
2657 qed (use nontriv in auto) |
2658 |
2658 |
2659 |
2659 |
2660 lemma continuous_map_uniformly_Cauchy_limit: |
2660 lemma continuous_map_uniformly_Cauchy_limit: |
2661 assumes "mcomplete" |
2661 assumes "mcomplete" |
2798 qed |
2798 qed |
2799 |
2799 |
2800 lemma completely_metrizable_space_cbox: "completely_metrizable_space (top_of_set (cbox a b))" |
2800 lemma completely_metrizable_space_cbox: "completely_metrizable_space (top_of_set (cbox a b))" |
2801 using closed_closedin completely_metrizable_space_closedin completely_metrizable_space_euclidean by blast |
2801 using closed_closedin completely_metrizable_space_closedin completely_metrizable_space_euclidean by blast |
2802 |
2802 |
|
2803 |
2803 lemma homeomorphic_completely_metrizable_space_aux: |
2804 lemma homeomorphic_completely_metrizable_space_aux: |
2804 assumes homXY: "X homeomorphic_space Y" and X: "completely_metrizable_space X" |
2805 assumes homXY: "X homeomorphic_space Y" and X: "completely_metrizable_space X" |
2805 shows "completely_metrizable_space Y" |
2806 shows "completely_metrizable_space Y" |
2806 proof - |
2807 proof - |
2807 obtain f g where hmf: "homeomorphic_map X Y f" and hmg: "homeomorphic_map Y X g" |
2808 obtain f g where hmf: "homeomorphic_map X Y f" and hmg: "homeomorphic_map Y X g" |
2808 and fg: "(\<forall>x \<in> topspace X. g(f x) = x) \<and> (\<forall>y \<in> topspace Y. f(g y) = y)" |
2809 and fg: "\<And>x. x \<in> topspace X \<Longrightarrow> g(f x) = x" "\<And>y. y \<in> topspace Y \<Longrightarrow> f(g y) = y" |
2809 and fim: "f ` (topspace X) = topspace Y" and gim: "g ` (topspace Y) = topspace X" |
2810 and fim: "f \<in> topspace X \<rightarrow> topspace Y" and gim: "g \<in> topspace Y \<rightarrow> topspace X" |
2810 by (smt (verit, best) homXY homeomorphic_imp_surjective_map homeomorphic_maps_map homeomorphic_space_def) |
2811 using homXY |
|
2812 using homeomorphic_space_unfold by blast |
2811 obtain M d where Md: "Metric_space M d" "Metric_space.mcomplete M d" and Xeq: "X = Metric_space.mtopology M d" |
2813 obtain M d where Md: "Metric_space M d" "Metric_space.mcomplete M d" and Xeq: "X = Metric_space.mtopology M d" |
2812 using X by (auto simp: completely_metrizable_space_def) |
2814 using X by (auto simp: completely_metrizable_space_def) |
2813 then interpret MX: Metric_space M d by metis |
2815 then interpret MX: Metric_space M d by metis |
2814 define D where "D \<equiv> \<lambda>x y. d (g x) (g y)" |
2816 define D where "D \<equiv> \<lambda>x y. d (g x) (g y)" |
2815 have "Metric_space (topspace Y) D" |
2817 have "Metric_space (topspace Y) D" |
2816 proof |
2818 proof |
2817 show "(D x y = 0) \<longleftrightarrow> (x = y)" if "x \<in> topspace Y" "y \<in> topspace Y" for x y |
2819 show "(D x y = 0) \<longleftrightarrow> (x = y)" if "x \<in> topspace Y" "y \<in> topspace Y" for x y |
2818 unfolding D_def |
2820 unfolding D_def |
2819 by (metis that MX.topspace_mtopology MX.zero Xeq fg gim imageI) |
2821 by (metis that MX.topspace_mtopology MX.zero Xeq fg gim Pi_iff) |
2820 show "D x z \<le> D x y +D y z" |
2822 show "D x z \<le> D x y +D y z" |
2821 if "x \<in> topspace Y" "y \<in> topspace Y" "z \<in> topspace Y" for x y z |
2823 if "x \<in> topspace Y" "y \<in> topspace Y" "z \<in> topspace Y" for x y z |
2822 using that MX.triangle Xeq gim by (auto simp: D_def) |
2824 using that MX.triangle Xeq gim by (auto simp: D_def) |
2823 qed (auto simp: D_def MX.commute) |
2825 qed (auto simp: D_def MX.commute) |
2824 then interpret MY: Metric_space "topspace Y" "\<lambda>x y. D x y" by metis |
2826 then interpret MY: Metric_space "topspace Y" "\<lambda>x y. D x y" by metis |
3781 |
3783 |
3782 subsubsection \<open>Lipschitz continuity\<close> |
3784 subsubsection \<open>Lipschitz continuity\<close> |
3783 |
3785 |
3784 definition Lipschitz_continuous_map |
3786 definition Lipschitz_continuous_map |
3785 where "Lipschitz_continuous_map \<equiv> |
3787 where "Lipschitz_continuous_map \<equiv> |
3786 \<lambda>m1 m2 f. f ` mspace m1 \<subseteq> mspace m2 \<and> |
3788 \<lambda>m1 m2 f. f \<in> mspace m1 \<rightarrow> mspace m2 \<and> |
3787 (\<exists>B. \<forall>x \<in> mspace m1. \<forall>y \<in> mspace m1. mdist m2 (f x) (f y) \<le> B * mdist m1 x y)" |
3789 (\<exists>B. \<forall>x \<in> mspace m1. \<forall>y \<in> mspace m1. mdist m2 (f x) (f y) \<le> B * mdist m1 x y)" |
3788 |
3790 |
3789 lemma Lipschitz_continuous_map_image: |
3791 lemma Lipschitz_continuous_map_image: |
3790 "Lipschitz_continuous_map m1 m2 f \<Longrightarrow> f ` mspace m1 \<subseteq> mspace m2" |
3792 "Lipschitz_continuous_map m1 m2 f \<Longrightarrow> f \<in> mspace m1 \<rightarrow> mspace m2" |
3791 by (simp add: Lipschitz_continuous_map_def) |
3793 by (simp add: Lipschitz_continuous_map_def) |
3792 |
3794 |
3793 lemma Lipschitz_continuous_map_pos: |
3795 lemma Lipschitz_continuous_map_pos: |
3794 "Lipschitz_continuous_map m1 m2 f \<longleftrightarrow> |
3796 "Lipschitz_continuous_map m1 m2 f \<longleftrightarrow> |
3795 f ` mspace m1 \<subseteq> mspace m2 \<and> |
3797 f \<in> mspace m1 \<rightarrow> mspace m2 \<and> |
3796 (\<exists>B>0. \<forall>x \<in> mspace m1. \<forall>y \<in> mspace m1. mdist m2 (f x) (f y) \<le> B * mdist m1 x y)" |
3798 (\<exists>B>0. \<forall>x \<in> mspace m1. \<forall>y \<in> mspace m1. mdist m2 (f x) (f y) \<le> B * mdist m1 x y)" |
3797 proof - |
3799 proof - |
3798 have "B * mdist m1 x y \<le> (\<bar>B\<bar> + 1) * mdist m1 x y" "\<bar>B\<bar> + 1 > 0" for x y B |
3800 have "B * mdist m1 x y \<le> (\<bar>B\<bar> + 1) * mdist m1 x y" "\<bar>B\<bar> + 1 > 0" for x y B |
3799 by (auto simp add: mult_right_mono) |
3801 by (auto simp add: mult_right_mono) |
3800 then show ?thesis |
3802 then show ?thesis |
3803 |
3805 |
3804 |
3806 |
3805 lemma Lipschitz_continuous_map_eq: |
3807 lemma Lipschitz_continuous_map_eq: |
3806 assumes "Lipschitz_continuous_map m1 m2 f" "\<And>x. x \<in> mspace m1 \<Longrightarrow> f x = g x" |
3808 assumes "Lipschitz_continuous_map m1 m2 f" "\<And>x. x \<in> mspace m1 \<Longrightarrow> f x = g x" |
3807 shows "Lipschitz_continuous_map m1 m2 g" |
3809 shows "Lipschitz_continuous_map m1 m2 g" |
3808 using Lipschitz_continuous_map_def assms |
3810 using Lipschitz_continuous_map_def assms by (simp add: Lipschitz_continuous_map_pos Pi_iff) |
3809 by (metis (no_types, opaque_lifting) image_subset_iff) |
|
3810 |
3811 |
3811 lemma Lipschitz_continuous_map_from_submetric: |
3812 lemma Lipschitz_continuous_map_from_submetric: |
3812 assumes "Lipschitz_continuous_map m1 m2 f" |
3813 assumes "Lipschitz_continuous_map m1 m2 f" |
3813 shows "Lipschitz_continuous_map (submetric m1 S) m2 f" |
3814 shows "Lipschitz_continuous_map (submetric m1 S) m2 f" |
3814 unfolding Lipschitz_continuous_map_def |
3815 unfolding Lipschitz_continuous_map_def |
3815 proof |
3816 proof |
3816 show "f ` mspace (submetric m1 S) \<subseteq> mspace m2" |
3817 show "f \<in> mspace (submetric m1 S) \<rightarrow> mspace m2" |
3817 using Lipschitz_continuous_map_pos assms by fastforce |
3818 using Lipschitz_continuous_map_pos assms by fastforce |
3818 qed (use assms in \<open>fastforce simp: Lipschitz_continuous_map_def\<close>) |
3819 qed (use assms in \<open>fastforce simp: Lipschitz_continuous_map_def\<close>) |
3819 |
3820 |
3820 lemma Lipschitz_continuous_map_from_submetric_mono: |
3821 lemma Lipschitz_continuous_map_from_submetric_mono: |
3821 "\<lbrakk>Lipschitz_continuous_map (submetric m1 T) m2 f; S \<subseteq> T\<rbrakk> |
3822 "\<lbrakk>Lipschitz_continuous_map (submetric m1 T) m2 f; S \<subseteq> T\<rbrakk> |
3822 \<Longrightarrow> Lipschitz_continuous_map (submetric m1 S) m2 f" |
3823 \<Longrightarrow> Lipschitz_continuous_map (submetric m1 S) m2 f" |
3823 by (metis Lipschitz_continuous_map_from_submetric inf.absorb_iff2 submetric_submetric) |
3824 by (metis Lipschitz_continuous_map_from_submetric inf.absorb_iff2 submetric_submetric) |
3824 |
3825 |
3825 lemma Lipschitz_continuous_map_into_submetric: |
3826 lemma Lipschitz_continuous_map_into_submetric: |
3826 "Lipschitz_continuous_map m1 (submetric m2 S) f \<longleftrightarrow> |
3827 "Lipschitz_continuous_map m1 (submetric m2 S) f \<longleftrightarrow> |
3827 f ` mspace m1 \<subseteq> S \<and> Lipschitz_continuous_map m1 m2 f" |
3828 f \<in> mspace m1 \<rightarrow> S \<and> Lipschitz_continuous_map m1 m2 f" |
3828 by (auto simp: Lipschitz_continuous_map_def) |
3829 by (auto simp: Lipschitz_continuous_map_def) |
3829 |
3830 |
3830 lemma Lipschitz_continuous_map_const: |
3831 lemma Lipschitz_continuous_map_const: |
3831 "Lipschitz_continuous_map m1 m2 (\<lambda>x. c) \<longleftrightarrow> |
3832 "Lipschitz_continuous_map m1 m2 (\<lambda>x. c) \<longleftrightarrow> |
3832 mspace m1 = {} \<or> c \<in> mspace m2" |
3833 mspace m1 = {} \<or> c \<in> mspace m2" |
3833 unfolding Lipschitz_continuous_map_def image_subset_iff |
3834 unfolding Lipschitz_continuous_map_def Pi_iff |
3834 by (metis all_not_in_conv mdist_nonneg mdist_zero mult_1) |
3835 by (metis all_not_in_conv mdist_nonneg mdist_zero mult_1) |
3835 |
3836 |
3836 lemma Lipschitz_continuous_map_id: |
3837 lemma Lipschitz_continuous_map_id: |
3837 "Lipschitz_continuous_map m1 m1 (\<lambda>x. x)" |
3838 "Lipschitz_continuous_map m1 m1 (\<lambda>x. x)" |
3838 by (metis Lipschitz_continuous_map_def image_ident mult_1 order_refl) |
3839 unfolding Lipschitz_continuous_map_def by (metis funcset_id mult_1 order_refl) |
3839 |
3840 |
3840 lemma Lipschitz_continuous_map_compose: |
3841 lemma Lipschitz_continuous_map_compose: |
3841 assumes f: "Lipschitz_continuous_map m1 m2 f" and g: "Lipschitz_continuous_map m2 m3 g" |
3842 assumes f: "Lipschitz_continuous_map m1 m2 f" and g: "Lipschitz_continuous_map m2 m3 g" |
3842 shows "Lipschitz_continuous_map m1 m3 (g \<circ> f)" |
3843 shows "Lipschitz_continuous_map m1 m3 (g \<circ> f)" |
3843 unfolding Lipschitz_continuous_map_def image_subset_iff |
3844 unfolding Lipschitz_continuous_map_def |
3844 proof |
3845 proof |
3845 show "\<forall>x\<in>mspace m1. (g \<circ> f) x \<in> mspace m3" |
3846 show "g \<circ> f \<in> mspace m1 \<rightarrow> mspace m3" |
3846 by (metis Lipschitz_continuous_map_def assms comp_apply image_subset_iff) |
3847 by (smt (verit, best) Lipschitz_continuous_map_image Pi_iff comp_apply f g) |
3847 obtain B where B: "\<forall>x\<in>mspace m1. \<forall>y\<in>mspace m1. mdist m2 (f x) (f y) \<le> B * mdist m1 x y" |
3848 obtain B where B: "\<forall>x\<in>mspace m1. \<forall>y\<in>mspace m1. mdist m2 (f x) (f y) \<le> B * mdist m1 x y" |
3848 using assms unfolding Lipschitz_continuous_map_def by presburger |
3849 using assms unfolding Lipschitz_continuous_map_def by presburger |
3849 obtain C where "C>0" and C: "\<forall>x\<in>mspace m2. \<forall>y\<in>mspace m2. mdist m3 (g x) (g y) \<le> C * mdist m2 x y" |
3850 obtain C where "C>0" and C: "\<forall>x\<in>mspace m2. \<forall>y\<in>mspace m2. mdist m3 (g x) (g y) \<le> C * mdist m2 x y" |
3850 using assms unfolding Lipschitz_continuous_map_pos by metis |
3851 using assms unfolding Lipschitz_continuous_map_pos by metis |
3851 show "\<exists>B. \<forall>x\<in>mspace m1. \<forall>y\<in>mspace m1. mdist m3 ((g \<circ> f) x) ((g \<circ> f) y) \<le> B * mdist m1 x y" |
3852 show "\<exists>B. \<forall>x\<in>mspace m1. \<forall>y\<in>mspace m1. mdist m3 ((g \<circ> f) x) ((g \<circ> f) y) \<le> B * mdist m1 x y" |
3852 apply (rule_tac x="C*B" in exI) |
3853 proof (intro strip exI) |
3853 proof clarify |
|
3854 fix x y |
3854 fix x y |
3855 assume \<section>: "x \<in> mspace m1" "y \<in> mspace m1" |
3855 assume \<section>: "x \<in> mspace m1" "y \<in> mspace m1" |
3856 then have "mdist m3 ((g \<circ> f) x) ((g \<circ> f) y) \<le> C * mdist m2 (f x) (f y)" |
3856 then have "mdist m3 ((g \<circ> f) x) ((g \<circ> f) y) \<le> C * mdist m2 (f x) (f y)" |
3857 by (metis C Lipschitz_continuous_map_def f comp_apply image_subset_iff) |
3857 using C Lipschitz_continuous_map_image f by fastforce |
3858 also have "\<dots> \<le> C * B * mdist m1 x y" |
3858 also have "\<dots> \<le> C * B * mdist m1 x y" |
3859 by (simp add: "\<section>" B \<open>0 < C\<close>) |
3859 by (simp add: "\<section>" B \<open>0 < C\<close>) |
3860 finally show "mdist m3 ((g \<circ> f) x) ((g \<circ> f) y) \<le> C * B * mdist m1 x y" . |
3860 finally show "mdist m3 ((g \<circ> f) x) ((g \<circ> f) y) \<le> C * B * mdist m1 x y" . |
3861 qed |
3861 qed |
3862 qed |
3862 qed |
3863 |
3863 |
3864 subsubsection \<open>Uniform continuity\<close> |
3864 subsubsection \<open>Uniform continuity\<close> |
3865 |
3865 |
3866 definition uniformly_continuous_map |
3866 definition uniformly_continuous_map |
3867 where "uniformly_continuous_map \<equiv> |
3867 where "uniformly_continuous_map \<equiv> |
3868 \<lambda>m1 m2 f. f ` mspace m1 \<subseteq> mspace m2 \<and> |
3868 \<lambda>m1 m2 f. f \<in> mspace m1 \<rightarrow> mspace m2 \<and> |
3869 (\<forall>\<epsilon>>0. \<exists>\<delta>>0. \<forall>x \<in> mspace m1. \<forall>y \<in> mspace m1. |
3869 (\<forall>\<epsilon>>0. \<exists>\<delta>>0. \<forall>x \<in> mspace m1. \<forall>y \<in> mspace m1. |
3870 mdist m1 y x < \<delta> \<longrightarrow> mdist m2 (f y) (f x) < \<epsilon>)" |
3870 mdist m1 y x < \<delta> \<longrightarrow> mdist m2 (f y) (f x) < \<epsilon>)" |
3871 |
3871 |
3872 lemma uniformly_continuous_map_image: |
3872 lemma uniformly_continuous_map_funspace: |
3873 "uniformly_continuous_map m1 m2 f \<Longrightarrow> f ` mspace m1 \<subseteq> mspace m2" |
3873 "uniformly_continuous_map m1 m2 f \<Longrightarrow> f \<in> mspace m1 \<rightarrow> mspace m2" |
3874 by (simp add: uniformly_continuous_map_def) |
3874 by (simp add: uniformly_continuous_map_def) |
3875 |
3875 |
3876 lemma ucmap_A: |
3876 lemma ucmap_A: |
3877 assumes "uniformly_continuous_map m1 m2 f" |
3877 assumes "uniformly_continuous_map m1 m2 f" |
3878 and "(\<lambda>n. mdist m1 (\<rho> n) (\<sigma> n)) \<longlonglongrightarrow> 0" |
3878 and "(\<lambda>n. mdist m1 (\<rho> n) (\<sigma> n)) \<longlonglongrightarrow> 0" |
3919 by (fastforce simp: uniformly_continuous_map_def) |
3919 by (fastforce simp: uniformly_continuous_map_def) |
3920 qed |
3920 qed |
3921 |
3921 |
3922 lemma uniformly_continuous_map_sequentially: |
3922 lemma uniformly_continuous_map_sequentially: |
3923 "uniformly_continuous_map m1 m2 f \<longleftrightarrow> |
3923 "uniformly_continuous_map m1 m2 f \<longleftrightarrow> |
3924 f ` mspace m1 \<subseteq> mspace m2 \<and> |
3924 f \<in> mspace m1 \<rightarrow> mspace m2 \<and> |
3925 (\<forall>\<rho> \<sigma>. range \<rho> \<subseteq> mspace m1 \<and> range \<sigma> \<subseteq> mspace m1 \<and> (\<lambda>n. mdist m1 (\<rho> n) (\<sigma> n)) \<longlonglongrightarrow> 0 |
3925 (\<forall>\<rho> \<sigma>. range \<rho> \<subseteq> mspace m1 \<and> range \<sigma> \<subseteq> mspace m1 \<and> (\<lambda>n. mdist m1 (\<rho> n) (\<sigma> n)) \<longlonglongrightarrow> 0 |
3926 \<longrightarrow> (\<lambda>n. mdist m2 (f (\<rho> n)) (f (\<sigma> n))) \<longlonglongrightarrow> 0)" |
3926 \<longrightarrow> (\<lambda>n. mdist m2 (f (\<rho> n)) (f (\<sigma> n))) \<longlonglongrightarrow> 0)" |
3927 (is "?lhs \<longleftrightarrow> ?rhs") |
3927 (is "?lhs \<longleftrightarrow> ?rhs") |
3928 proof |
3928 proof |
3929 show "?lhs \<Longrightarrow> ?rhs" |
3929 show "?lhs \<Longrightarrow> ?rhs" |
3930 by (simp add: ucmap_A uniformly_continuous_map_image) |
3930 by (simp add: ucmap_A uniformly_continuous_map_funspace) |
3931 show "?rhs \<Longrightarrow> ?lhs" |
3931 show "?rhs \<Longrightarrow> ?lhs" |
3932 by (intro ucmap_B ucmap_C) auto |
3932 by (intro ucmap_B ucmap_C) auto |
3933 qed |
3933 qed |
3934 |
3934 |
3935 |
3935 |
3936 lemma uniformly_continuous_map_sequentially_alt: |
3936 lemma uniformly_continuous_map_sequentially_alt: |
3937 "uniformly_continuous_map m1 m2 f \<longleftrightarrow> |
3937 "uniformly_continuous_map m1 m2 f \<longleftrightarrow> |
3938 f ` mspace m1 \<subseteq> mspace m2 \<and> |
3938 f \<in> mspace m1 \<rightarrow> mspace m2 \<and> |
3939 (\<forall>\<epsilon>>0. \<forall>\<rho> \<sigma>. range \<rho> \<subseteq> mspace m1 \<and> range \<sigma> \<subseteq> mspace m1 \<and> |
3939 (\<forall>\<epsilon>>0. \<forall>\<rho> \<sigma>. range \<rho> \<subseteq> mspace m1 \<and> range \<sigma> \<subseteq> mspace m1 \<and> |
3940 ((\<lambda>n. mdist m1 (\<rho> n) (\<sigma> n)) \<longlonglongrightarrow> 0) |
3940 ((\<lambda>n. mdist m1 (\<rho> n) (\<sigma> n)) \<longlonglongrightarrow> 0) |
3941 \<longrightarrow> (\<exists>n. mdist m2 (f (\<rho> n)) (f (\<sigma> n)) < \<epsilon>))" |
3941 \<longrightarrow> (\<exists>n. mdist m2 (f (\<rho> n)) (f (\<sigma> n)) < \<epsilon>))" |
3942 (is "?lhs \<longleftrightarrow> ?rhs") |
3942 (is "?lhs \<longleftrightarrow> ?rhs") |
3943 proof |
3943 proof |
3944 show "?lhs \<Longrightarrow> ?rhs" |
3944 show "?lhs \<Longrightarrow> ?rhs" |
3945 using uniformly_continuous_map_image by (intro conjI strip ucmap_B | force simp: ucmap_A)+ |
3945 using uniformly_continuous_map_funspace by (intro conjI strip ucmap_B | fastforce simp: ucmap_A)+ |
3946 show "?rhs \<Longrightarrow> ?lhs" |
3946 show "?rhs \<Longrightarrow> ?lhs" |
3947 by (intro ucmap_C) auto |
3947 by (intro ucmap_C) auto |
3948 qed |
3948 qed |
3949 |
3949 |
3950 |
3950 |
3951 lemma uniformly_continuous_map_eq: |
3951 lemma uniformly_continuous_map_eq: |
3952 "\<lbrakk>\<And>x. x \<in> mspace m1 \<Longrightarrow> f x = g x; uniformly_continuous_map m1 m2 f\<rbrakk> |
3952 "\<lbrakk>\<And>x. x \<in> mspace m1 \<Longrightarrow> f x = g x; uniformly_continuous_map m1 m2 f\<rbrakk> |
3953 \<Longrightarrow> uniformly_continuous_map m1 m2 g" |
3953 \<Longrightarrow> uniformly_continuous_map m1 m2 g" |
3954 by (simp add: uniformly_continuous_map_def) |
3954 by (simp add: uniformly_continuous_map_def Pi_iff) |
3955 |
3955 |
3956 lemma uniformly_continuous_map_from_submetric: |
3956 lemma uniformly_continuous_map_from_submetric: |
3957 assumes "uniformly_continuous_map m1 m2 f" |
3957 assumes "uniformly_continuous_map m1 m2 f" |
3958 shows "uniformly_continuous_map (submetric m1 S) m2 f" |
3958 shows "uniformly_continuous_map (submetric m1 S) m2 f" |
3959 unfolding uniformly_continuous_map_def |
3959 unfolding uniformly_continuous_map_def |
3960 proof |
3960 proof |
3961 show "f ` mspace (submetric m1 S) \<subseteq> mspace m2" |
3961 show "f \<in> mspace (submetric m1 S) \<rightarrow> mspace m2" |
3962 using assms by (auto simp: uniformly_continuous_map_def) |
3962 using assms by (auto simp: uniformly_continuous_map_def) |
3963 qed (use assms in \<open>force simp: uniformly_continuous_map_def\<close>) |
3963 qed (use assms in \<open>force simp: uniformly_continuous_map_def\<close>) |
3964 |
3964 |
3965 lemma uniformly_continuous_map_from_submetric_mono: |
3965 lemma uniformly_continuous_map_from_submetric_mono: |
3966 "\<lbrakk>uniformly_continuous_map (submetric m1 T) m2 f; S \<subseteq> T\<rbrakk> |
3966 "\<lbrakk>uniformly_continuous_map (submetric m1 T) m2 f; S \<subseteq> T\<rbrakk> |
3967 \<Longrightarrow> uniformly_continuous_map (submetric m1 S) m2 f" |
3967 \<Longrightarrow> uniformly_continuous_map (submetric m1 S) m2 f" |
3968 by (metis uniformly_continuous_map_from_submetric inf.absorb_iff2 submetric_submetric) |
3968 by (metis uniformly_continuous_map_from_submetric inf.absorb_iff2 submetric_submetric) |
3969 |
3969 |
3970 lemma uniformly_continuous_map_into_submetric: |
3970 lemma uniformly_continuous_map_into_submetric: |
3971 "uniformly_continuous_map m1 (submetric m2 S) f \<longleftrightarrow> |
3971 "uniformly_continuous_map m1 (submetric m2 S) f \<longleftrightarrow> |
3972 f ` mspace m1 \<subseteq> S \<and> uniformly_continuous_map m1 m2 f" |
3972 f \<in> mspace m1 \<rightarrow> S \<and> uniformly_continuous_map m1 m2 f" |
3973 by (auto simp: uniformly_continuous_map_def) |
3973 by (auto simp: uniformly_continuous_map_def) |
3974 |
3974 |
3975 lemma uniformly_continuous_map_const: |
3975 lemma uniformly_continuous_map_const: |
3976 "uniformly_continuous_map m1 m2 (\<lambda>x. c) \<longleftrightarrow> |
3976 "uniformly_continuous_map m1 m2 (\<lambda>x. c) \<longleftrightarrow> |
3977 mspace m1 = {} \<or> c \<in> mspace m2" |
3977 mspace m1 = {} \<or> c \<in> mspace m2" |
3978 unfolding uniformly_continuous_map_def image_subset_iff |
3978 unfolding uniformly_continuous_map_def Pi_iff |
3979 by (metis empty_iff equals0I mdist_zero) |
3979 by (metis empty_iff equals0I mdist_zero) |
3980 |
3980 |
3981 lemma uniformly_continuous_map_id [simp]: |
3981 lemma uniformly_continuous_map_id [simp]: |
3982 "uniformly_continuous_map m1 m1 (\<lambda>x. x)" |
3982 "uniformly_continuous_map m1 m1 (\<lambda>x. x)" |
3983 by (metis image_ident order_refl uniformly_continuous_map_def) |
3983 by (metis funcset_id uniformly_continuous_map_def) |
3984 |
3984 |
3985 lemma uniformly_continuous_map_compose: |
3985 lemma uniformly_continuous_map_compose: |
3986 assumes f: "uniformly_continuous_map m1 m2 f" and g: "uniformly_continuous_map m2 m3 g" |
3986 assumes f: "uniformly_continuous_map m1 m2 f" and g: "uniformly_continuous_map m2 m3 g" |
3987 shows "uniformly_continuous_map m1 m3 (g \<circ> f)" |
3987 shows "uniformly_continuous_map m1 m3 (g \<circ> f)" |
3988 by (smt (verit, ccfv_threshold) comp_apply f g image_subset_iff uniformly_continuous_map_def) |
3988 by (smt (verit, ccfv_threshold) comp_apply f g Pi_iff uniformly_continuous_map_def) |
3989 |
3989 |
3990 lemma uniformly_continuous_map_real_const [simp]: |
3990 lemma uniformly_continuous_map_real_const [simp]: |
3991 "uniformly_continuous_map m euclidean_metric (\<lambda>x. c)" |
3991 "uniformly_continuous_map m euclidean_metric (\<lambda>x. c)" |
3992 by (simp add: euclidean_metric_def uniformly_continuous_map_const) |
3992 by (simp add: euclidean_metric_def uniformly_continuous_map_const) |
3993 |
3993 |
4040 \<Longrightarrow> Cauchy_continuous_map (submetric m1 S) m2 f" |
4040 \<Longrightarrow> Cauchy_continuous_map (submetric m1 S) m2 f" |
4041 by (metis Cauchy_continuous_map_from_submetric inf.absorb_iff2 submetric_submetric) |
4041 by (metis Cauchy_continuous_map_from_submetric inf.absorb_iff2 submetric_submetric) |
4042 |
4042 |
4043 lemma Cauchy_continuous_map_into_submetric: |
4043 lemma Cauchy_continuous_map_into_submetric: |
4044 "Cauchy_continuous_map m1 (submetric m2 S) f \<longleftrightarrow> |
4044 "Cauchy_continuous_map m1 (submetric m2 S) f \<longleftrightarrow> |
4045 f ` mspace m1 \<subseteq> S \<and> Cauchy_continuous_map m1 m2 f" (is "?lhs \<longleftrightarrow> ?rhs") |
4045 f \<in> mspace m1 \<rightarrow> S \<and> Cauchy_continuous_map m1 m2 f" (is "?lhs \<longleftrightarrow> ?rhs") |
4046 proof - |
4046 proof - |
4047 have "?lhs \<Longrightarrow> Cauchy_continuous_map m1 m2 f" |
4047 have "?lhs \<Longrightarrow> Cauchy_continuous_map m1 m2 f" |
4048 by (simp add: Cauchy_continuous_map_def Metric_space.MCauchy_def [OF Metric_space_mspace_mdist]) |
4048 by (simp add: Cauchy_continuous_map_def Metric_space.MCauchy_def [OF Metric_space_mspace_mdist]) |
4049 moreover have "?rhs \<Longrightarrow> ?lhs" |
4049 moreover have "?rhs \<Longrightarrow> ?lhs" |
4050 by (bestsimp simp add: Cauchy_continuous_map_def Metric_space.MCauchy_def [OF Metric_space_mspace_mdist]) |
4050 by (auto simp: Cauchy_continuous_map_def Metric_space.MCauchy_def [OF Metric_space_mspace_mdist]) |
4051 ultimately show ?thesis |
4051 ultimately show ?thesis |
4052 by (metis Cauchy_continuous_map_image le_inf_iff mspace_submetric) |
4052 by (metis Cauchy_continuous_map_funspace Int_iff funcsetI funcset_mem mspace_submetric) |
4053 qed |
4053 qed |
4054 |
4054 |
4055 lemma Cauchy_continuous_map_const [simp]: |
4055 lemma Cauchy_continuous_map_const [simp]: |
4056 "Cauchy_continuous_map m1 m2 (\<lambda>x. c) \<longleftrightarrow> mspace m1 = {} \<or> c \<in> mspace m2" |
4056 "Cauchy_continuous_map m1 m2 (\<lambda>x. c) \<longleftrightarrow> mspace m1 = {} \<or> c \<in> mspace m2" |
4057 proof - |
4057 proof - |
4058 have "mspace m1 = {} \<Longrightarrow> Cauchy_continuous_map m1 m2 (\<lambda>x. c)" |
4058 have "mspace m1 = {} \<Longrightarrow> Cauchy_continuous_map m1 m2 (\<lambda>x. c)" |
4059 by (simp add: Cauchy_continuous_map_def Metric_space.MCauchy_def Metric_space_mspace_mdist) |
4059 by (simp add: Cauchy_continuous_map_def Metric_space.MCauchy_def Metric_space_mspace_mdist) |
4060 moreover have "c \<in> mspace m2 \<Longrightarrow> Cauchy_continuous_map m1 m2 (\<lambda>x. c)" |
4060 moreover have "c \<in> mspace m2 \<Longrightarrow> Cauchy_continuous_map m1 m2 (\<lambda>x. c)" |
4061 by (simp add: Cauchy_continuous_map_def o_def Metric_space.MCauchy_const [OF Metric_space_mspace_mdist]) |
4061 by (simp add: Cauchy_continuous_map_def o_def Metric_space.MCauchy_const [OF Metric_space_mspace_mdist]) |
4062 ultimately show ?thesis |
4062 ultimately show ?thesis |
4063 using Cauchy_continuous_map_image by blast |
4063 using Cauchy_continuous_map_funspace by blast |
4064 qed |
4064 qed |
4065 |
4065 |
4066 lemma Cauchy_continuous_map_id [simp]: |
4066 lemma Cauchy_continuous_map_id [simp]: |
4067 "Cauchy_continuous_map m1 m1 (\<lambda>x. x)" |
4067 "Cauchy_continuous_map m1 m1 (\<lambda>x. x)" |
4068 by (simp add: Cauchy_continuous_map_def o_def) |
4068 by (simp add: Cauchy_continuous_map_def o_def) |
4341 if f1: "uniformly_continuous_map m m1 f1" and f2: "uniformly_continuous_map m m2 f2" for f1 f2 |
4341 if f1: "uniformly_continuous_map m m1 f1" and f2: "uniformly_continuous_map m m2 f2" for f1 f2 |
4342 proof - |
4342 proof - |
4343 show ?thesis |
4343 show ?thesis |
4344 unfolding uniformly_continuous_map_def |
4344 unfolding uniformly_continuous_map_def |
4345 proof (intro conjI strip) |
4345 proof (intro conjI strip) |
4346 have f1im: "f1 ` mspace m \<subseteq> mspace m1" |
4346 have f1im: "f1 \<in> mspace m \<rightarrow> mspace m1" |
4347 by (simp add: uniformly_continuous_map_image f1) |
4347 by (simp add: uniformly_continuous_map_funspace f1) |
4348 moreover have f2im: "f2 ` mspace m \<subseteq> mspace m2" |
4348 moreover have f2im: "f2 \<in> mspace m \<rightarrow> mspace m2" |
4349 by (simp add: uniformly_continuous_map_image f2) |
4349 by (simp add: uniformly_continuous_map_funspace f2) |
4350 ultimately show "(\<lambda>x. (f1 x, f2 x)) ` mspace m \<subseteq> mspace (prod_metric m1 m2)" |
4350 ultimately show "(\<lambda>x. (f1 x, f2 x)) \<in> mspace m \<rightarrow> mspace (prod_metric m1 m2)" |
4351 by auto |
4351 by auto |
4352 fix \<epsilon>:: real |
4352 fix \<epsilon>:: real |
4353 assume "\<epsilon> > 0" |
4353 assume "\<epsilon> > 0" |
4354 obtain \<delta>1 where "\<delta>1>0" |
4354 obtain \<delta>1 where "\<delta>1>0" |
4355 and \<delta>1: "\<And>x y. \<lbrakk>x \<in> mspace m; y \<in> mspace m; mdist m y x < \<delta>1\<rbrakk> \<Longrightarrow> mdist m1 (f1 y) (f1 x) < \<epsilon>/2" |
4355 and \<delta>1: "\<And>x y. \<lbrakk>x \<in> mspace m; y \<in> mspace m; mdist m y x < \<delta>1\<rbrakk> \<Longrightarrow> mdist m1 (f1 y) (f1 x) < \<epsilon>/2" |
4561 by (simp add: continuous_map_mdist) |
4561 by (simp add: continuous_map_mdist) |
4562 |
4562 |
4563 subsection \<open>Isometries\<close> |
4563 subsection \<open>Isometries\<close> |
4564 |
4564 |
4565 lemma (in Metric_space12) isometry_imp_embedding_map: |
4565 lemma (in Metric_space12) isometry_imp_embedding_map: |
4566 assumes fim: "f ` M1 \<subseteq> M2" and d: "\<And>x y. \<lbrakk>x \<in> M1; y \<in> M1\<rbrakk> \<Longrightarrow> d2 (f x) (f y) = d1 x y" |
4566 assumes fim: "f \<in> M1 \<rightarrow> M2" and d: "\<And>x y. \<lbrakk>x \<in> M1; y \<in> M1\<rbrakk> \<Longrightarrow> d2 (f x) (f y) = d1 x y" |
4567 shows "embedding_map M1.mtopology M2.mtopology f" |
4567 shows "embedding_map M1.mtopology M2.mtopology f" |
4568 proof - |
4568 proof - |
4569 have "inj_on f M1" |
4569 have "inj_on f M1" |
4570 by (metis M1.zero d inj_onI) |
4570 by (metis M1.zero d inj_onI) |
4571 then obtain g where g: "\<And>x. x \<in> M1 \<Longrightarrow> g (f x) = x" |
4571 then obtain g where g: "\<And>x. x \<in> M1 \<Longrightarrow> g (f x) = x" |
4572 by (metis inv_into_f_f) |
4572 by (metis inv_into_f_f) |
4573 have "homeomorphic_maps M1.mtopology (subtopology M2.mtopology (f ` topspace M1.mtopology)) f g" |
4573 have "homeomorphic_maps M1.mtopology (subtopology M2.mtopology (f ` topspace M1.mtopology)) f g" |
4574 unfolding homeomorphic_maps_def |
4574 unfolding homeomorphic_maps_def |
4575 proof (intro conjI; clarsimp) |
4575 proof (intro conjI; clarsimp) |
4576 show "continuous_map M1.mtopology (subtopology M2.mtopology (f ` M1)) f" |
4576 show "continuous_map M1.mtopology (subtopology M2.mtopology (f ` M1)) f" |
4577 by (metis M1.metric_continuous_map M1.topspace_mtopology M2.Metric_space_axioms continuous_map_into_subtopology d fim order_refl) |
4577 proof (rule continuous_map_into_subtopology) |
|
4578 show "continuous_map M1.mtopology M2.mtopology f" |
|
4579 by (metis M1.metric_continuous_map M2.Metric_space_axioms d fim image_subset_iff_funcset) |
|
4580 qed simp |
4578 have "Lipschitz_continuous_map (submetric (metric(M2,d2)) (f ` M1)) (metric(M1,d1)) g" |
4581 have "Lipschitz_continuous_map (submetric (metric(M2,d2)) (f ` M1)) (metric(M1,d1)) g" |
4579 unfolding Lipschitz_continuous_map_def |
4582 unfolding Lipschitz_continuous_map_def |
4580 proof (intro conjI exI strip; simp) |
4583 proof (intro conjI exI strip; simp) |
4581 show "d1 (g x) (g y) \<le> 1 * d2 x y" if "x \<in> f ` M1 \<and> x \<in> M2" and "y \<in> f ` M1 \<and> y \<in> M2" for x y |
4584 show "d1 (g x) (g y) \<le> 1 * d2 x y" if "x \<in> f ` M1 \<and> x \<in> M2" and "y \<in> f ` M1 \<and> y \<in> M2" for x y |
4582 using that d g by force |
4585 using that d g by force |