4992 unfolding closure_open_interval[OF assms, THEN sym] unfolding open_inter_closure_eq_empty[OF open_interval] .. |
4992 unfolding closure_open_interval[OF assms, THEN sym] unfolding open_inter_closure_eq_empty[OF open_interval] .. |
4993 |
4993 |
4994 |
4994 |
4995 (* Some stuff for half-infinite intervals too; FIXME: notation? *) |
4995 (* Some stuff for half-infinite intervals too; FIXME: notation? *) |
4996 |
4996 |
4997 lemma closed_interval_left: fixes b::"'a::ordered_euclidean_space" |
4997 lemma closed_interval_left: fixes b::"'a::euclidean_space" |
4998 shows "closed {x::'a. \<forall>i<DIM('a). x$$i \<le> b$$i}" |
4998 shows "closed {x::'a. \<forall>i<DIM('a). x$$i \<le> b$$i}" |
4999 proof- |
4999 proof- |
5000 { fix i assume i:"i<DIM('a)" |
5000 { fix i assume i:"i<DIM('a)" |
5001 fix x::"'a" assume x:"\<forall>e>0. \<exists>x'\<in>{x. \<forall>i<DIM('a). x $$ i \<le> b $$ i}. x' \<noteq> x \<and> dist x' x < e" |
5001 fix x::"'a" assume x:"\<forall>e>0. \<exists>x'\<in>{x. \<forall>i<DIM('a). x $$ i \<le> b $$ i}. x' \<noteq> x \<and> dist x' x < e" |
5002 { assume "x$$i > b$$i" |
5002 { assume "x$$i > b$$i" |
5006 by auto } |
5006 by auto } |
5007 hence "x$$i \<le> b$$i" by(rule ccontr)auto } |
5007 hence "x$$i \<le> b$$i" by(rule ccontr)auto } |
5008 thus ?thesis unfolding closed_limpt unfolding islimpt_approachable by blast |
5008 thus ?thesis unfolding closed_limpt unfolding islimpt_approachable by blast |
5009 qed |
5009 qed |
5010 |
5010 |
5011 lemma closed_interval_right: fixes a::"'a::ordered_euclidean_space" |
5011 lemma closed_interval_right: fixes a::"'a::euclidean_space" |
5012 shows "closed {x::'a. \<forall>i<DIM('a). a$$i \<le> x$$i}" |
5012 shows "closed {x::'a. \<forall>i<DIM('a). a$$i \<le> x$$i}" |
5013 proof- |
5013 proof- |
5014 { fix i assume i:"i<DIM('a)" |
5014 { fix i assume i:"i<DIM('a)" |
5015 fix x::"'a" assume x:"\<forall>e>0. \<exists>x'\<in>{x. \<forall>i<DIM('a). a $$ i \<le> x $$ i}. x' \<noteq> x \<and> dist x' x < e" |
5015 fix x::"'a" assume x:"\<forall>e>0. \<exists>x'\<in>{x. \<forall>i<DIM('a). a $$ i \<le> x $$ i}. x' \<noteq> x \<and> dist x' x < e" |
5016 { assume "a$$i > x$$i" |
5016 { assume "a$$i > x$$i" |
5074 have "{x. inner a x = b} = {x. inner a x \<ge> b} \<inter> {x. inner a x \<le> b}" by auto |
5074 have "{x. inner a x = b} = {x. inner a x \<ge> b} \<inter> {x. inner a x \<le> b}" by auto |
5075 thus ?thesis using closed_halfspace_le[of a b] and closed_halfspace_ge[of b a] using closed_Int by auto |
5075 thus ?thesis using closed_halfspace_le[of a b] and closed_halfspace_ge[of b a] using closed_Int by auto |
5076 qed |
5076 qed |
5077 |
5077 |
5078 lemma closed_halfspace_component_le: |
5078 lemma closed_halfspace_component_le: |
5079 shows "closed {x::'a::ordered_euclidean_space. x$$i \<le> a}" |
5079 shows "closed {x::'a::euclidean_space. x$$i \<le> a}" |
5080 using closed_halfspace_le[of "(basis i)::'a" a] unfolding euclidean_component_def . |
5080 using closed_halfspace_le[of "(basis i)::'a" a] unfolding euclidean_component_def . |
5081 |
5081 |
5082 lemma closed_halfspace_component_ge: |
5082 lemma closed_halfspace_component_ge: |
5083 shows "closed {x::'a::ordered_euclidean_space. x$$i \<ge> a}" |
5083 shows "closed {x::'a::euclidean_space. x$$i \<ge> a}" |
5084 using closed_halfspace_ge[of a "(basis i)::'a"] unfolding euclidean_component_def . |
5084 using closed_halfspace_ge[of a "(basis i)::'a"] unfolding euclidean_component_def . |
5085 |
5085 |
5086 text{* Openness of halfspaces. *} |
5086 text{* Openness of halfspaces. *} |
5087 |
5087 |
5088 lemma open_halfspace_lt: "open {x. inner a x < b}" |
5088 lemma open_halfspace_lt: "open {x. inner a x < b}" |
5096 have "- {x. b \<ge> inner a x} = {x. inner a x > b}" by auto |
5096 have "- {x. b \<ge> inner a x} = {x. inner a x > b}" by auto |
5097 thus ?thesis using closed_halfspace_le[unfolded closed_def, of a b] by auto |
5097 thus ?thesis using closed_halfspace_le[unfolded closed_def, of a b] by auto |
5098 qed |
5098 qed |
5099 |
5099 |
5100 lemma open_halfspace_component_lt: |
5100 lemma open_halfspace_component_lt: |
5101 shows "open {x::'a::ordered_euclidean_space. x$$i < a}" |
5101 shows "open {x::'a::euclidean_space. x$$i < a}" |
5102 using open_halfspace_lt[of "(basis i)::'a" a] unfolding euclidean_component_def . |
5102 using open_halfspace_lt[of "(basis i)::'a" a] unfolding euclidean_component_def . |
5103 |
5103 |
5104 lemma open_halfspace_component_gt: |
5104 lemma open_halfspace_component_gt: |
5105 shows "open {x::'a::ordered_euclidean_space. x$$i > a}" |
5105 shows "open {x::'a::euclidean_space. x$$i > a}" |
5106 using open_halfspace_gt[of a "(basis i)::'a"] unfolding euclidean_component_def . |
5106 using open_halfspace_gt[of a "(basis i)::'a"] unfolding euclidean_component_def . |
5107 |
5107 |
5108 text{* This gives a simple derivation of limit component bounds. *} |
5108 text{* This gives a simple derivation of limit component bounds. *} |
5109 |
5109 |
5110 lemma Lim_component_le: fixes f :: "'a \<Rightarrow> 'b::ordered_euclidean_space" |
5110 lemma Lim_component_le: fixes f :: "'a \<Rightarrow> 'b::euclidean_space" |
5111 assumes "(f ---> l) net" "\<not> (trivial_limit net)" "eventually (\<lambda>x. f(x)$$i \<le> b) net" |
5111 assumes "(f ---> l) net" "\<not> (trivial_limit net)" "eventually (\<lambda>x. f(x)$$i \<le> b) net" |
5112 shows "l$$i \<le> b" |
5112 shows "l$$i \<le> b" |
5113 proof- |
5113 proof- |
5114 { fix x have "x \<in> {x::'b. inner (basis i) x \<le> b} \<longleftrightarrow> x$$i \<le> b" |
5114 { fix x have "x \<in> {x::'b. inner (basis i) x \<le> b} \<longleftrightarrow> x$$i \<le> b" |
5115 unfolding euclidean_component_def by auto } note * = this |
5115 unfolding euclidean_component_def by auto } note * = this |
5116 show ?thesis using Lim_in_closed_set[of "{x. inner (basis i) x \<le> b}" f net l] unfolding * |
5116 show ?thesis using Lim_in_closed_set[of "{x. inner (basis i) x \<le> b}" f net l] unfolding * |
5117 using closed_halfspace_le[of "(basis i)::'b" b] and assms(1,2,3) by auto |
5117 using closed_halfspace_le[of "(basis i)::'b" b] and assms(1,2,3) by auto |
5118 qed |
5118 qed |
5119 |
5119 |
5120 lemma Lim_component_ge: fixes f :: "'a \<Rightarrow> 'b::ordered_euclidean_space" |
5120 lemma Lim_component_ge: fixes f :: "'a \<Rightarrow> 'b::euclidean_space" |
5121 assumes "(f ---> l) net" "\<not> (trivial_limit net)" "eventually (\<lambda>x. b \<le> (f x)$$i) net" |
5121 assumes "(f ---> l) net" "\<not> (trivial_limit net)" "eventually (\<lambda>x. b \<le> (f x)$$i) net" |
5122 shows "b \<le> l$$i" |
5122 shows "b \<le> l$$i" |
5123 proof- |
5123 proof- |
5124 { fix x have "x \<in> {x::'b. inner (basis i) x \<ge> b} \<longleftrightarrow> x$$i \<ge> b" |
5124 { fix x have "x \<in> {x::'b. inner (basis i) x \<ge> b} \<longleftrightarrow> x$$i \<ge> b" |
5125 unfolding euclidean_component_def by auto } note * = this |
5125 unfolding euclidean_component_def by auto } note * = this |
5126 show ?thesis using Lim_in_closed_set[of "{x. inner (basis i) x \<ge> b}" f net l] unfolding * |
5126 show ?thesis using Lim_in_closed_set[of "{x. inner (basis i) x \<ge> b}" f net l] unfolding * |
5127 using closed_halfspace_ge[of b "(basis i)"] and assms(1,2,3) by auto |
5127 using closed_halfspace_ge[of b "(basis i)"] and assms(1,2,3) by auto |
5128 qed |
5128 qed |
5129 |
5129 |
5130 lemma Lim_component_eq: fixes f :: "'a \<Rightarrow> 'b::ordered_euclidean_space" |
5130 lemma Lim_component_eq: fixes f :: "'a \<Rightarrow> 'b::euclidean_space" |
5131 assumes net:"(f ---> l) net" "~(trivial_limit net)" and ev:"eventually (\<lambda>x. f(x)$$i = b) net" |
5131 assumes net:"(f ---> l) net" "~(trivial_limit net)" and ev:"eventually (\<lambda>x. f(x)$$i = b) net" |
5132 shows "l$$i = b" |
5132 shows "l$$i = b" |
5133 using ev[unfolded order_eq_iff eventually_and] using Lim_component_ge[OF net, of b i] and Lim_component_le[OF net, of i b] by auto |
5133 using ev[unfolded order_eq_iff eventually_and] using Lim_component_ge[OF net, of b i] and Lim_component_le[OF net, of i b] by auto |
5134 text{* Limits relative to a union. *} |
5134 text{* Limits relative to a union. *} |
5135 |
5135 |
5185 moreover have "?A \<inter> ?B = {}" by auto |
5185 moreover have "?A \<inter> ?B = {}" by auto |
5186 moreover have "s \<subseteq> ?A \<union> ?B" using as by auto |
5186 moreover have "s \<subseteq> ?A \<union> ?B" using as by auto |
5187 ultimately show False using assms(1)[unfolded connected_def not_ex, THEN spec[where x="?A"], THEN spec[where x="?B"]] and assms(2-5) by auto |
5187 ultimately show False using assms(1)[unfolded connected_def not_ex, THEN spec[where x="?A"], THEN spec[where x="?B"]] and assms(2-5) by auto |
5188 qed |
5188 qed |
5189 |
5189 |
5190 lemma connected_ivt_component: fixes x::"'a::ordered_euclidean_space" shows |
5190 lemma connected_ivt_component: fixes x::"'a::euclidean_space" shows |
5191 "connected s \<Longrightarrow> x \<in> s \<Longrightarrow> y \<in> s \<Longrightarrow> x$$k \<le> a \<Longrightarrow> a \<le> y$$k \<Longrightarrow> (\<exists>z\<in>s. z$$k = a)" |
5191 "connected s \<Longrightarrow> x \<in> s \<Longrightarrow> y \<in> s \<Longrightarrow> x$$k \<le> a \<Longrightarrow> a \<le> y$$k \<Longrightarrow> (\<exists>z\<in>s. z$$k = a)" |
5192 using connected_ivt_hyperplane[of s x y "(basis k)::'a" a] |
5192 using connected_ivt_hyperplane[of s x y "(basis k)::'a" a] |
5193 unfolding euclidean_component_def by auto |
5193 unfolding euclidean_component_def by auto |
5194 |
5194 |
5195 subsection {* Homeomorphisms *} |
5195 subsection {* Homeomorphisms *} |