src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy
changeset 56544 b60d5d119489
parent 56541 0e3abadbef39
child 56742 678a52e676b6
equal deleted inserted replaced
56543:9bd56f2e4c10 56544:b60d5d119489
  2830       done
  2830       done
  2831   }
  2831   }
  2832   then show ?thesis
  2832   then show ?thesis
  2833     unfolding bounded_pos
  2833     unfolding bounded_pos
  2834     apply (rule_tac x="b*B" in exI)
  2834     apply (rule_tac x="b*B" in exI)
  2835     using b B mult_pos_pos [of b B]
  2835     using b B by (auto simp add: mult_commute)
  2836     apply (auto simp add: mult_commute)
       
  2837     done
       
  2838 qed
  2836 qed
  2839 
  2837 
  2840 lemma bounded_scaling:
  2838 lemma bounded_scaling:
  2841   fixes S :: "'a::real_normed_vector set"
  2839   fixes S :: "'a::real_normed_vector set"
  2842   shows "bounded S \<Longrightarrow> bounded ((\<lambda>x. c *\<^sub>R x) ` S)"
  2840   shows "bounded S \<Longrightarrow> bounded ((\<lambda>x. c *\<^sub>R x) ` S)"
  4136   fixes e::real
  4134   fixes e::real
  4137   assumes "0 < e"
  4135   assumes "0 < e"
  4138   obtains n :: nat where "1 / (Suc n) < e"
  4136   obtains n :: nat where "1 / (Suc n) < e"
  4139 proof atomize_elim
  4137 proof atomize_elim
  4140   have " 1 / real (Suc (nat (ceiling (1/e)))) < 1 / (ceiling (1/e))"
  4138   have " 1 / real (Suc (nat (ceiling (1/e)))) < 1 / (ceiling (1/e))"
  4141     by (rule divide_strict_left_mono) (auto intro!: mult_pos_pos simp: `0 < e`)
  4139     by (rule divide_strict_left_mono) (auto simp: `0 < e`)
  4142   also have "1 / (ceiling (1/e)) \<le> 1 / (1/e)"
  4140   also have "1 / (ceiling (1/e)) \<le> 1 / (1/e)"
  4143     by (rule divide_left_mono) (auto simp: `0 < e`)
  4141     by (rule divide_left_mono) (auto simp: `0 < e`)
  4144   also have "\<dots> = e" by simp
  4142   also have "\<dots> = e" by simp
  4145   finally show  "\<exists>n. 1 / real (Suc n) < e" ..
  4143   finally show  "\<exists>n. 1 / real (Suc n) < e" ..
  4146 qed
  4144 qed
  5319     assume "x \<in> s"
  5317     assume "x \<in> s"
  5320     then obtain e where "e>0"
  5318     then obtain e where "e>0"
  5321       and e:"\<forall>x'. dist x' x < e \<longrightarrow> x' \<in> s" using assms(2)[unfolded open_dist, THEN bspec[where x=x]]
  5319       and e:"\<forall>x'. dist x' x < e \<longrightarrow> x' \<in> s" using assms(2)[unfolded open_dist, THEN bspec[where x=x]]
  5322       by auto
  5320       by auto
  5323     have "e * abs c > 0"
  5321     have "e * abs c > 0"
  5324       using assms(1)[unfolded zero_less_abs_iff[symmetric]]
  5322       using assms(1)[unfolded zero_less_abs_iff[symmetric]] `e>0` by auto
  5325       using mult_pos_pos[OF `e>0`]
       
  5326       by auto
       
  5327     moreover
  5323     moreover
  5328     {
  5324     {
  5329       fix y
  5325       fix y
  5330       assume "dist y (c *\<^sub>R x) < e * \<bar>c\<bar>"
  5326       assume "dist y (c *\<^sub>R x) < e * \<bar>c\<bar>"
  5331       then have "norm ((1 / c) *\<^sub>R y - x) < e"
  5327       then have "norm ((1 / c) *\<^sub>R y - x) < e"
  7034   interpret f: bounded_linear f by fact
  7030   interpret f: bounded_linear f by fact
  7035   {
  7031   {
  7036     fix d :: real
  7032     fix d :: real
  7037     assume "d > 0"
  7033     assume "d > 0"
  7038     then obtain N where N:"\<forall>n\<ge>N. norm (f (x n) - f (x N)) < e * d"
  7034     then obtain N where N:"\<forall>n\<ge>N. norm (f (x n) - f (x N)) < e * d"
  7039       using cf[unfolded cauchy o_def dist_norm, THEN spec[where x="e*d"]]
  7035       using cf[unfolded cauchy o_def dist_norm, THEN spec[where x="e*d"]] e
  7040         and e and mult_pos_pos[of e d]
       
  7041       by auto
  7036       by auto
  7042     {
  7037     {
  7043       fix n
  7038       fix n
  7044       assume "n\<ge>N"
  7039       assume "n\<ge>N"
  7045       have "e * norm (x n - x N) \<le> norm (f (x n - x N))"
  7040       have "e * norm (x n - x N) \<le> norm (f (x n - x N))"
  7398     next
  7393     next
  7399       case False
  7394       case False
  7400       then have "d>0" unfolding d_def using zero_le_dist[of "z 0" "z 1"]
  7395       then have "d>0" unfolding d_def using zero_le_dist[of "z 0" "z 1"]
  7401         by (metis False d_def less_le)
  7396         by (metis False d_def less_le)
  7402       hence "0 < e * (1 - c) / d"
  7397       hence "0 < e * (1 - c) / d"
  7403         using `e>0` and `1-c>0` mult_pos_pos[of e "1 - c"] by auto
  7398         using `e>0` and `1-c>0` by auto
  7404       then obtain N where N:"c ^ N < e * (1 - c) / d"
  7399       then obtain N where N:"c ^ N < e * (1 - c) / d"
  7405         using real_arch_pow_inv[of "e * (1 - c) / d" c] and c by auto
  7400         using real_arch_pow_inv[of "e * (1 - c) / d" c] and c by auto
  7406       {
  7401       {
  7407         fix m n::nat
  7402         fix m n::nat
  7408         assume "m>n" and as:"m\<ge>N" "n\<ge>N"
  7403         assume "m>n" and as:"m\<ge>N" "n\<ge>N"
  7409         have *:"c ^ n \<le> c ^ N" using `n\<ge>N` and c
  7404         have *:"c ^ n \<le> c ^ N" using `n\<ge>N` and c
  7410           using power_decreasing[OF `n\<ge>N`, of c] by auto
  7405           using power_decreasing[OF `n\<ge>N`, of c] by auto
  7411         have "1 - c ^ (m - n) > 0"
  7406         have "1 - c ^ (m - n) > 0"
  7412           using c and power_strict_mono[of c 1 "m - n"] using `m>n` by auto
  7407           using c and power_strict_mono[of c 1 "m - n"] using `m>n` by auto
  7413         hence **: "d * (1 - c ^ (m - n)) / (1 - c) > 0"
  7408         hence **: "d * (1 - c ^ (m - n)) / (1 - c) > 0"
  7414           using mult_pos_pos[OF `d>0`, of "1 - c ^ (m - n)"] `0 < 1 - c` by auto
  7409           using `d>0` `0 < 1 - c` by auto
  7415 
  7410 
  7416         have "dist (z m) (z n) \<le> c ^ n * d * (1 - c ^ (m - n)) / (1 - c)"
  7411         have "dist (z m) (z n) \<le> c ^ n * d * (1 - c ^ (m - n)) / (1 - c)"
  7417           using cf_z2[of n "m - n"] and `m>n`
  7412           using cf_z2[of n "m - n"] and `m>n`
  7418           unfolding pos_le_divide_eq[OF `1-c>0`]
  7413           unfolding pos_le_divide_eq[OF `1-c>0`]
  7419           by (auto simp add: mult_commute dist_commute)
  7414           by (auto simp add: mult_commute dist_commute)