src/HOL/Library/Topology_Euclidean_Space.thy
changeset 30649 57753e0ec1d4
parent 30582 638b088bb840
child 30658 79e2d95649fe
equal deleted inserted replaced
30617:620db300c038 30649:57753e0ec1d4
  1492     hence *:"norm x' < 1 + norm x"  by auto
  1492     hence *:"norm x' < 1 + norm x"  by auto
  1493 
  1493 
  1494     have thy: "norm (y' - y) * norm x' < e / (2 * norm x + 2 * norm y + 2) * (1 + norm x)"
  1494     have thy: "norm (y' - y) * norm x' < e / (2 * norm x + 2 * norm y + 2) * (1 + norm x)"
  1495       using mult_strict_mono'[OF h(4) * norm_ge_zero norm_ge_zero] by auto
  1495       using mult_strict_mono'[OF h(4) * norm_ge_zero norm_ge_zero] by auto
  1496     also have "\<dots> \<le> e/2" apply simp unfolding divide_le_eq
  1496     also have "\<dots> \<le> e/2" apply simp unfolding divide_le_eq
  1497       using th1 th0 `e>0` apply auto
  1497       using th1 th0 `e>0` by auto
  1498       unfolding mult_assoc and real_mult_le_cancel_iff2[OF `e>0`] by auto
       
  1499 
  1498 
  1500     finally have "norm x' * norm (y' - y) + norm (x' - x) * norm y < e"
  1499     finally have "norm x' * norm (y' - y) + norm (x' - x) * norm y < e"
  1501       using thx and e by (simp add: field_simps)  }
  1500       using thx and e by (simp add: field_simps)  }
  1502   ultimately show ?thesis apply(rule_tac x="min 1 (e / 2 / (norm x + norm y + 1))" in exI) by auto
  1501   ultimately show ?thesis apply(rule_tac x="min 1 (e / 2 / (norm x + norm y + 1))" in exI) by auto
  1503 qed
  1502 qed
  3556     have "e * abs c > 0" using assms(1)[unfolded zero_less_abs_iff[THEN sym]] using real_mult_order[OF `e>0`] by auto
  3555     have "e * abs c > 0" using assms(1)[unfolded zero_less_abs_iff[THEN sym]] using real_mult_order[OF `e>0`] by auto
  3557     moreover
  3556     moreover
  3558     { fix y assume "dist y (c *s x) < e * \<bar>c\<bar>"
  3557     { fix y assume "dist y (c *s x) < e * \<bar>c\<bar>"
  3559       hence "norm ((1 / c) *s y - x) < e" unfolding dist_def
  3558       hence "norm ((1 / c) *s y - x) < e" unfolding dist_def
  3560 	using norm_mul[of c "(1 / c) *s y - x", unfolded vector_ssub_ldistrib, unfolded vector_smult_assoc] assms(1)
  3559 	using norm_mul[of c "(1 / c) *s y - x", unfolded vector_ssub_ldistrib, unfolded vector_smult_assoc] assms(1)
  3561 	  mult_less_imp_less_left[of "abs c" "norm ((1 / c) *s y - x)" e, unfolded real_mult_commute[of "abs c" e]] assms(1)[unfolded zero_less_abs_iff[THEN sym]] by simp
  3560 	  assms(1)[unfolded zero_less_abs_iff[THEN sym]] by (simp del:zero_less_abs_iff)
  3562       hence "y \<in> op *s c ` s" using rev_image_eqI[of "(1 / c) *s y" s y "op *s c"]  e[THEN spec[where x="(1 / c) *s y"]]  assms(1) unfolding dist_def vector_smult_assoc by auto  }
  3561       hence "y \<in> op *s c ` s" using rev_image_eqI[of "(1 / c) *s y" s y "op *s c"]  e[THEN spec[where x="(1 / c) *s y"]]  assms(1) unfolding dist_def vector_smult_assoc by auto  }
  3563     ultimately have "\<exists>e>0. \<forall>x'. dist x' (c *s x) < e \<longrightarrow> x' \<in> op *s c ` s" apply(rule_tac x="e * abs c" in exI) by auto  }
  3562     ultimately have "\<exists>e>0. \<forall>x'. dist x' (c *s x) < e \<longrightarrow> x' \<in> op *s c ` s" apply(rule_tac x="e * abs c" in exI) by auto  }
  3564   thus ?thesis unfolding open_def by auto
  3563   thus ?thesis unfolding open_def by auto
  3565 qed
  3564 qed
  3566 
  3565