equal
deleted
inserted
replaced
831 instance real :: linorder_topology |
831 instance real :: linorder_topology |
832 proof |
832 proof |
833 show "(open :: real set \<Rightarrow> bool) = generate_topology (range lessThan \<union> range greaterThan)" |
833 show "(open :: real set \<Rightarrow> bool) = generate_topology (range lessThan \<union> range greaterThan)" |
834 proof (rule ext, safe) |
834 proof (rule ext, safe) |
835 fix S :: "real set" assume "open S" |
835 fix S :: "real set" assume "open S" |
836 then guess f unfolding open_real_def bchoice_iff .. |
836 then obtain f where "\<forall>x\<in>S. 0 < f x \<and> (\<forall>y. dist y x < f x \<longrightarrow> y \<in> S)" |
|
837 unfolding open_real_def bchoice_iff .. |
837 then have *: "S = (\<Union>x\<in>S. {x - f x <..} \<inter> {..< x + f x})" |
838 then have *: "S = (\<Union>x\<in>S. {x - f x <..} \<inter> {..< x + f x})" |
838 by (fastforce simp: dist_real_def) |
839 by (fastforce simp: dist_real_def) |
839 show "generate_topology (range lessThan \<union> range greaterThan) S" |
840 show "generate_topology (range lessThan \<union> range greaterThan) S" |
840 apply (subst *) |
841 apply (subst *) |
841 apply (intro generate_topology_Union generate_topology.Int) |
842 apply (intro generate_topology_Union generate_topology.Int) |
1523 proof (rule tendstoI) |
1524 proof (rule tendstoI) |
1524 fix e :: real assume "0 < e" |
1525 fix e :: real assume "0 < e" |
1525 with limseq obtain N :: nat where N: "\<And>n. N \<le> n \<Longrightarrow> \<bar>f (real n) - y\<bar> < e" |
1526 with limseq obtain N :: nat where N: "\<And>n. N \<le> n \<Longrightarrow> \<bar>f (real n) - y\<bar> < e" |
1526 by (auto simp: LIMSEQ_def dist_real_def) |
1527 by (auto simp: LIMSEQ_def dist_real_def) |
1527 { fix x :: real |
1528 { fix x :: real |
1528 from ex_le_of_nat[of x] guess n .. |
1529 obtain n where "x \<le> real_of_nat n" |
|
1530 using ex_le_of_nat[of x] .. |
1529 note monoD[OF mono this] |
1531 note monoD[OF mono this] |
1530 also have "f (real_of_nat n) \<le> y" |
1532 also have "f (real_of_nat n) \<le> y" |
1531 by (rule LIMSEQ_le_const[OF limseq]) |
1533 by (rule LIMSEQ_le_const[OF limseq]) |
1532 (auto intro: exI[of _ n] monoD[OF mono] simp: real_eq_of_nat[symmetric]) |
1534 (auto intro: exI[of _ n] monoD[OF mono] simp: real_eq_of_nat[symmetric]) |
1533 finally have "f x \<le> y" . } |
1535 finally have "f x \<le> y" . } |