Skip to content

Commit

Permalink
chore(topology/instances/real): golf (#6945)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkud committed Mar 29, 2021
1 parent 3fdf529 commit 8b7c8a4
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/topology/instances/real.lean
Expand Up @@ -108,6 +108,11 @@ instance : topological_add_group ℚ := by apply_instance
instance : order_topology ℚ :=
induced_order_topology _ (λ x y, rat.cast_lt) (@exists_rat_btwn _ _ _)

instance : proper_space ℝ :=
{ compact_ball := λx r, by { rw closed_ball_Icc, apply compact_Icc } }

instance : second_countable_topology ℝ := second_countable_of_proper

lemma real.is_topological_basis_Ioo_rat :
@is_topological_basis ℝ _ (⋃(a b : ℚ) (h : a < b), {Ioo a b}) :=
is_topological_basis_of_open_of_nhds
Expand All @@ -120,11 +125,6 @@ is_topological_basis_of_open_of_nhds
by { simp only [mem_Union], exact ⟨q, p, rat.cast_lt.1 $ hqa.trans hap, rfl⟩ },
⟨hqa, hap⟩, assume a' ⟨hqa', ha'p⟩, h ⟨hlq.trans hqa', ha'p.trans hpu⟩⟩)

instance : second_countable_topology ℝ :=
⟨⟨(⋃(a b : ℚ) (h : a < b), {Ioo a b}),
by simp [countable_Union, countable_Union_Prop],
real.is_topological_basis_Ioo_rat.2.2⟩⟩

/- TODO(Mario): Prove that these are uniform isomorphisms instead of uniform embeddings
lemma uniform_embedding_add_rat {r : ℚ} : uniform_embedding (λp:ℚ, p + r) :=
_
Expand Down Expand Up @@ -258,9 +258,6 @@ lemma closure_of_rat_image_le_le_eq {a b : ℚ} (hab : a ≤ b) :
closure (of_rat '' {q:ℚ | a ≤ q ∧ q ≤ b}) = {r:ℝ | of_rat a ≤ r ∧ r ≤ of_rat b} :=
_-/

instance : proper_space ℝ :=
{ compact_ball := λx r, by rw closed_ball_Icc; apply compact_Icc }

lemma real.bounded_iff_bdd_below_bdd_above {s : set ℝ} : bounded s ↔ bdd_below s ∧ bdd_above s :=
begin
assume bdd,
Expand Down

0 comments on commit 8b7c8a4

Please sign in to comment.