src/HOL/Limits.thy
changeset 56541 0e3abadbef39
parent 56536 aefb4a8da31f
child 57275 0ddb5b755cdc
equal deleted inserted replaced
56539:1fd920a86173 56541:0e3abadbef39
   281 proof (cases)
   281 proof (cases)
   282   assume K: "0 < K"
   282   assume K: "0 < K"
   283   show ?thesis
   283   show ?thesis
   284   proof (rule ZfunI)
   284   proof (rule ZfunI)
   285     fix r::real assume "0 < r"
   285     fix r::real assume "0 < r"
   286     hence "0 < r / K"
   286     hence "0 < r / K" using K by simp
   287       using K by (rule divide_pos_pos)
       
   288     then have "eventually (\<lambda>x. norm (f x) < r / K) F"
   287     then have "eventually (\<lambda>x. norm (f x) < r / K) F"
   289       using ZfunD [OF f] by fast
   288       using ZfunD [OF f] by fast
   290     with g show "eventually (\<lambda>x. norm (g x) < r) F"
   289     with g show "eventually (\<lambda>x. norm (g x) < r) F"
   291     proof eventually_elim
   290     proof eventually_elim
   292       case (elim x)
   291       case (elim x)
  1709   fix r::real assume r: "0 < r"
  1708   fix r::real assume r: "0 < r"
  1710   obtain K where K: "0 < K" and norm_le: "\<And>x. norm (f x) \<le> norm x * K"
  1709   obtain K where K: "0 < K" and norm_le: "\<And>x. norm (f x) \<le> norm x * K"
  1711     using pos_bounded by fast
  1710     using pos_bounded by fast
  1712   show "\<exists>s>0. \<forall>x y. norm (x - y) < s \<longrightarrow> norm (f x - f y) < r"
  1711   show "\<exists>s>0. \<forall>x y. norm (x - y) < s \<longrightarrow> norm (f x - f y) < r"
  1713   proof (rule exI, safe)
  1712   proof (rule exI, safe)
  1714     from r K show "0 < r / K" by (rule divide_pos_pos)
  1713     from r K show "0 < r / K" by simp
  1715   next
  1714   next
  1716     fix x y :: 'a
  1715     fix x y :: 'a
  1717     assume xy: "norm (x - y) < r / K"
  1716     assume xy: "norm (x - y) < r / K"
  1718     have "norm (f x - f y) = norm (f (x - y))" by (simp only: diff)
  1717     have "norm (f x - f y) = norm (f (x - y))" by (simp only: diff)
  1719     also have "\<dots> \<le> norm (x - y) * K" by (rule norm_le)
  1718     also have "\<dots> \<le> norm (x - y) * K" by (rule norm_le)