Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit b352d2c

Browse files
committed
refactor(topology): topological_space.induced resembles set.image; second_countable_topology on subtypes; simplify filter.map_comap
1 parent 6b6b04a commit b352d2c

File tree

7 files changed

+79
-84
lines changed

7 files changed

+79
-84
lines changed

src/order/filter.lean

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -756,15 +756,10 @@ le_antisymm
756756
union_subset hs₁ hs₂⟩)
757757
(sup_le (comap_mono le_sup_left) (comap_mono le_sup_right))
758758

759-
lemma le_map_comap' {f : filter β} {m : α → β} {s : set β}
760-
(hs : s ∈ f.sets) (hm : ∀b∈s, ∃a, m a = b) : f ≤ map m (comap m f) :=
761-
assume t' ⟨t, ht, (sub : m ⁻¹' t ⊆ m ⁻¹' t')⟩,
762-
by filter_upwards [ht, hs] assume x hxt hxs,
763-
let ⟨y, hy⟩ := hm x hxs in
764-
hy ▸ sub (show m y ∈ t, from hy.symm ▸ hxt)
765-
766-
lemma le_map_comap {f : filter β} {m : α → β} (hm : ∀x, ∃y, m y = x) : f ≤ map m (comap m f) :=
767-
le_map_comap' univ_mem_sets (assume b _, hm b)
759+
lemma map_comap {f : filter β} {m : α → β} (hf : range m ∈ f.sets) : (f.comap m).map m = f :=
760+
le_antisymm
761+
map_comap_le
762+
(assume t' ⟨t, ht, sub⟩, by filter_upwards [ht, hf]; rintros x hxt ⟨y, rfl⟩; exact sub hxt)
768763

769764
lemma comap_map {f : filter α} {m : α → β} (h : ∀ x y, m x = m y → x = y) :
770765
comap m (map m f) = f :=
@@ -1160,12 +1155,9 @@ lemma tendsto_comap_iff {f : α → β} {g : β → γ} {a : filter α} {c : fil
11601155
tendsto f a (c.comap g) ↔ tendsto (g ∘ f) a c :=
11611156
⟨assume h, h.comp tendsto_comap, assume h, map_le_iff_le_comap.mp $ by rwa [map_map]⟩
11621157

1163-
lemma tendsto_comap'' {m : α → β} {f : filter α} {g : filter β} (s : set α)
1164-
{i : γ → α} (hs : s ∈ f.sets) (hi : ∀a∈s, ∃c, i c = a)
1165-
(h : tendsto (m ∘ i) (comap i f) g) : tendsto m f g :=
1166-
have tendsto m (map i $ comap i $ f) g,
1167-
by rwa [tendsto, ←map_compose] at h,
1168-
le_trans (map_mono $ le_map_comap' hs hi) this
1158+
lemma tendsto_comap'_iff {m : α → β} {f : filter α} {g : filter β} {i : γ → α}
1159+
(h : range i ∈ f.sets) : tendsto (m ∘ i) (comap i f) g ↔ tendsto m f g :=
1160+
by rw [tendsto, ← map_compose]; simp only [(∘), map_comap h, tendsto]
11691161

11701162
lemma comap_eq_of_inverse {f : filter α} {g : filter β} {φ : α → β} (ψ : β → α)
11711163
(eq : ψ ∘ φ = id) (hφ : tendsto φ f g) (hψ : tendsto ψ g f) : comap φ g = f :=

src/topology/basic.lean

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,27 +1314,28 @@ variables {α : Type*} {β : Type*} {γ : Type*}
13141314
makes `f` continuous. -/
13151315
def topological_space.induced {α : Type u} {β : Type v} (f : α → β) (t : topological_space β) :
13161316
topological_space α :=
1317-
{ is_open := λs, ∃s', t.is_open s' ∧ s = f ⁻¹' s',
1318-
is_open_univ := ⟨univ, t.is_open_univ, preimage_univ.symm⟩,
1317+
{ is_open := λs, ∃s', t.is_open s' ∧ f ⁻¹' s' = s,
1318+
is_open_univ := ⟨univ, t.is_open_univ, preimage_univ⟩,
13191319
is_open_inter := by rintro s₁ s₂ ⟨s'₁, hs₁, rfl⟩ ⟨s'₂, hs₂, rfl⟩;
13201320
exact ⟨s'₁ ∩ s'₂, t.is_open_inter _ _ hs₁ hs₂, preimage_inter⟩,
13211321
is_open_sUnion := assume s h,
13221322
begin
13231323
simp only [classical.skolem] at h,
13241324
cases h with f hf,
13251325
apply exists.intro (⋃(x : set α) (h : x ∈ s), f x h),
1326-
simp only [sUnion_eq_bUnion, preimage_Union, (λx h, (hf x h).right.symm)], refine ⟨_, rfl⟩,
1326+
simp only [sUnion_eq_bUnion, preimage_Union, (λx h, (hf x h).right)], refine ⟨_, rfl⟩,
13271327
exact (@is_open_Union β _ t _ $ assume i,
13281328
show is_open (⋃h, f i h), from @is_open_Union β _ t _ $ assume h, (hf i h).left)
13291329
end }
13301330

13311331
lemma is_open_induced_iff [t : topological_space β] {s : set α} {f : α → β} :
1332-
@is_open α (t.induced f) s ↔ (∃t, is_open t ∧ s = f ⁻¹' t) :=
1332+
@is_open α (t.induced f) s ↔ (∃t, is_open t ∧ f ⁻¹' t = s) :=
13331333
iff.refl _
13341334

13351335
lemma is_closed_induced_iff [t : topological_space β] {s : set α} {f : α → β} :
13361336
@is_closed α (t.induced f) s ↔ (∃t, is_closed t ∧ s = f ⁻¹' t) :=
1337-
⟨assume ⟨t, ht, heq⟩, ⟨-t, is_closed_compl_iff.2 ht, by simp only [preimage_compl, heq.symm, lattice.neg_neg]⟩,
1337+
⟨assume ⟨t, ht, heq⟩, ⟨-t, is_closed_compl_iff.2 ht,
1338+
by simp only [preimage_compl, heq, lattice.neg_neg]⟩,
13381339
assume ⟨t, ht, heq⟩, ⟨-t, ht, by simp only [preimage_compl, heq.symm]⟩⟩
13391340

13401341
/-- Given `f : α → β` and a topology on `α`, the coinduced topology on `β` is defined
@@ -1359,7 +1360,7 @@ lemma induced_le_iff_le_coinduced {f : α → β } {tα : topological_space α}
13591360
tβ.induced f ≤ tα ↔ tβ ≤ tα.coinduced f :=
13601361
iff.intro
13611362
(assume h s hs, show tα.is_open (f ⁻¹' s), from h _ ⟨s, hs, rfl⟩)
1362-
(assume h s ⟨t, ht, hst⟩, hst.symm ▸ h _ ht)
1363+
(assume h s ⟨t, ht, hst⟩, hst ▸ h _ ht)
13631364

13641365
lemma gc_induced_coinduced (f : α → β) :
13651366
galois_connection (topological_space.induced f) (topological_space.coinduced f) :=
@@ -1393,12 +1394,12 @@ lemma coinduced_mono (h : t₁ ≤ t₂) : t₁.coinduced f ≤ t₂.coinduced f
13931394

13941395
lemma induced_id [t : topological_space α] : t.induced id = t :=
13951396
topological_space_eq $ funext $ assume s, propext $
1396-
⟨assume ⟨s', hs, h⟩, h.symm ▸ hs, assume hs, ⟨s, hs, rfl⟩⟩
1397+
⟨assume ⟨s', hs, h⟩, h ▸ hs, assume hs, ⟨s, hs, rfl⟩⟩
13971398

13981399
lemma induced_compose [tβ : topological_space β] [tγ : topological_space γ]
13991400
{f : α → β} {g : β → γ} : (tγ.induced g).induced f = tγ.induced (g ∘ f) :=
14001401
topological_space_eq $ funext $ assume s, propext $
1401-
⟨assume ⟨s', ⟨s, hs, h₂⟩, h₁⟩, h₁.symm ▸ h₂.symm ▸ ⟨s, hs, rfl⟩,
1402+
⟨assume ⟨s', ⟨s, hs, h₂⟩, h₁⟩, h₁ ▸ h₂ ▸ ⟨s, hs, rfl⟩,
14021403
assume ⟨s, hs, h⟩, ⟨preimage g s, ⟨s, hs, rfl⟩, h ▸ rfl⟩⟩
14031404

14041405
lemma coinduced_id [t : topological_space α] : t.coinduced id = t :=
@@ -1516,6 +1517,13 @@ lemma generate_from_le {t : topological_space α} { g : set (set α) } (h : ∀s
15161517
generate_from g ≤ t :=
15171518
generate_from_le_iff_subset_is_open.2 h
15181519

1520+
lemma induced_generate_from_eq {α β} {b : set (set β)} {f : α → β} :
1521+
(generate_from b).induced f = topological_space.generate_from (preimage f '' b) :=
1522+
le_antisymm
1523+
(induced_le_iff_le_coinduced.2 $ generate_from_le $ assume s hs,
1524+
generate_open.basic _ $ mem_image_of_mem _ hs)
1525+
(generate_from_le $ ball_image_iff.2 $ assume s hs, ⟨s, generate_open.basic _ hs, rfl⟩)
1526+
15191527
protected def topological_space.nhds_adjoint (a : α) (f : filter α) : topological_space α :=
15201528
{ is_open := λs, a ∈ s → s ∈ f.sets,
15211529
is_open_univ := assume s, univ_mem_sets,
@@ -1570,7 +1578,7 @@ instance Pi.t2_space {β : α → Type v} [t₂ : Πa, topological_space (β a)]
15701578
instance {p : α → Prop} [topological_space α] [discrete_topology α] :
15711579
discrete_topology (subtype p) :=
15721580
⟨top_unique $ assume s hs,
1573-
⟨subtype.val '' s, is_open_discrete _, (set.preimage_image_eq _ subtype.val_injective).symm⟩⟩
1581+
⟨subtype.val '' s, is_open_discrete _, (set.preimage_image_eq _ subtype.val_injective)⟩⟩
15741582

15751583
instance sum.discrete_topology [topological_space α] [topological_space β]
15761584
[hα : discrete_topology α] [hβ : discrete_topology β] : discrete_topology (α ⊕ β) :=
@@ -1696,6 +1704,19 @@ let ⟨b, hb, eq⟩ := second_countable_topology.is_open_generated_countable α
16961704
⟨assume a, ⟨{s | a ∈ s ∧ s ∈ b},
16971705
countable_subset (assume x ⟨_, hx⟩, hx) hb, by rw [eq, nhds_generate_from]⟩⟩
16981706

1707+
lemma second_countable_topology_induced (β)
1708+
[t : topological_space β] [second_countable_topology β] (f : α → β) :
1709+
@second_countable_topology α (t.induced f) :=
1710+
begin
1711+
rcases second_countable_topology.is_open_generated_countable β with ⟨b, hb, eq⟩,
1712+
refine { is_open_generated_countable := ⟨preimage f '' b, countable_image _ hb, _⟩ },
1713+
rw [eq, induced_generate_from_eq]
1714+
end
1715+
1716+
instance subtype.second_countable_topology
1717+
(s : set α) [topological_space α] [second_countable_topology α] : second_countable_topology s :=
1718+
second_countable_topology_induced s α coe
1719+
16991720
lemma is_open_generated_countable_inter [second_countable_topology α] :
17001721
∃b:set (set α), countable b ∧ ∅ ∉ b ∧ is_topological_basis b :=
17011722
let ⟨b, hb₁, hb₂⟩ := second_countable_topology.is_open_generated_countable α in

src/topology/continuity.lean

Lines changed: 24 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ assume s h, ⟨_, h, rfl⟩
154154

155155
lemma continuous_induced_rng {g : γ → α} {t₂ : tspace β} {t₁ : tspace γ}
156156
(h : cont t₁ t₂ (f ∘ g)) : cont t₁ (induced f t₂) g :=
157-
assume s ⟨t, ht, s_eq⟩, s_eq.symm ▸ h t ht
157+
assume s ⟨t, ht, s_eq⟩, s_eq ▸ h t ht
158158

159159
lemma continuous_coinduced_rng {t : tspace α} : cont t (coinduced f t) f :=
160160
assume s h, h
@@ -241,39 +241,23 @@ section induced
241241
open topological_space
242242
variables [t : topological_space β] {f : α → β}
243243

244+
theorem is_open_induced_eq {s : set α} :
245+
@_root_.is_open _ (induced f t) s ↔ s ∈ preimage f '' {s | is_open s} :=
246+
iff.refl _
247+
244248
theorem is_open_induced {s : set β} (h : is_open s) : (induced f t).is_open (f ⁻¹' s) :=
245249
⟨s, h, rfl⟩
246250

247251
lemma nhds_induced_eq_comap {a : α} : @nhds α (induced f t) a = comap f (nhds (f a)) :=
248-
le_antisymm
249-
(assume s ⟨s', hs', (h_s : f ⁻¹' s' ⊆ s)⟩,
250-
let ⟨t', hsub, ht', hin⟩ := mem_nhds_sets_iff.1 hs' in
251-
(@nhds α (induced f t) a).sets_of_superset
252-
begin
253-
simp [mem_nhds_sets_iff],
254-
exact ⟨preimage f t', preimage_mono hsub, is_open_induced ht', hin⟩
255-
end
256-
h_s)
257-
(le_infi $ assume s, le_infi $ assume ⟨as, s', is_open_s', s_eq⟩,
258-
begin
259-
simp [comap, mem_nhds_sets_iff, s_eq],
260-
exact ⟨s', ⟨s', subset.refl _, is_open_s', by rwa [s_eq] at as⟩, subset.refl _⟩
261-
end)
252+
calc @nhds α (induced f t) a = (⨅ s (x : s ∈ preimage f '' set_of is_open ∧ a ∈ s), principal s) :
253+
by simp [nhds, is_open_induced_eq, -mem_image, and_comm]
254+
... = (⨅ s (x : is_open s ∧ f a ∈ s), principal (f ⁻¹' s)) :
255+
by simp only [infi_and, infi_image]; refl
256+
... = _ : by simp [nhds, comap_infi, and_comm]
262257

263-
lemma map_nhds_induced_eq {a : α} (h : image f univ ∈ (nhds (f a)).sets) :
258+
lemma map_nhds_induced_eq {a : α} (h : range f ∈ (nhds (f a)).sets) :
264259
map f (@nhds α (induced f t) a) = nhds (f a) :=
265-
le_antisymm
266-
(@continuous.tendsto α β (induced f t) _ _ continuous_induced_dom a)
267-
(assume s, assume hs : f ⁻¹' s ∈ (@nhds α (induced f t) a).sets,
268-
let ⟨t', t_subset, is_open_t, a_in_t⟩ := mem_nhds_sets_iff.mp h in
269-
let ⟨s', s'_subset, ⟨s'', is_open_s'', s'_eq⟩, a_in_s'⟩ := (@mem_nhds_sets_iff _ (induced f t) _ _).mp hs in
270-
by subst s'_eq; exact (mem_nhds_sets_iff.mpr $
271-
⟨t' ∩ s'',
272-
assume x ⟨h₁, h₂⟩, match x, h₂, t_subset h₁ with
273-
| x, h₂, ⟨y, _, y_eq⟩ := begin subst y_eq, exact s'_subset h₂ end
274-
end,
275-
is_open_inter is_open_t is_open_s'',
276-
⟨a_in_t, a_in_s'⟩⟩))
260+
by rw [nhds_induced_eq_comap, filter.map_comap h]
277261

278262
lemma closure_induced [t : topological_space β] {f : α → β} {a : α} {s : set α}
279263
(hf : ∀x y, f x = f y → x = y) :
@@ -331,16 +315,16 @@ lemma embedding_open {f : α → β} {s : set α}
331315
(hf : embedding f) (h : is_open (range f)) (hs : is_open s) : is_open (f '' s) :=
332316
let ⟨t, ht, h_eq⟩ := by rw [hf.right] at hs; exact hs in
333317
have is_open (t ∩ range f), from is_open_inter ht h,
334-
h_eq.symmby rwa [image_preimage_eq_inter_range]
318+
h_eq ▸ by rwa [image_preimage_eq_inter_range]
335319

336320
lemma embedding_is_closed {f : α → β} {s : set α}
337321
(hf : embedding f) (h : is_closed (range f)) (hs : is_closed s) : is_closed (f '' s) :=
338322
let ⟨t, ht, h_eq⟩ := by rw [hf.right, is_closed_induced_iff] at hs; exact hs in
339323
have is_closed (t ∩ range f), from is_closed_inter ht h,
340324
h_eq.symm ▸ by rwa [image_preimage_eq_inter_range]
341325

342-
lemma embedding.map_nhds_eq [topological_space α] [topological_space β] {f : α → β} (hf : embedding f) (a : α)
343-
(h : f '' univ ∈ (nhds (f a)).sets) : (nhds a).map f = nhds (f a) :=
326+
lemma embedding.map_nhds_eq [topological_space α] [topological_space β] {f : α → β}
327+
(hf : embedding f) (a : α) (h : range f ∈ (nhds (f a)).sets) : (nhds a).map f = nhds (f a) :=
344328
by rw [hf.2]; exact map_nhds_induced_eq h
345329

346330
lemma embedding.tendsto_nhds_iff {ι : Type*}
@@ -552,12 +536,8 @@ lemma prod_eq_generate_from [tα : topological_space α] [tβ : topological_spac
552536
generate_from {g | ∃(s:set α) (t:set β), is_open s ∧ is_open t ∧ g = set.prod s t} :=
553537
le_antisymm
554538
(sup_le
555-
(assume s ⟨t, ht, s_eq⟩,
556-
have set.prod t univ = s, by simp [s_eq, preimage, set.prod],
557-
this ▸ (generate_open.basic _ ⟨t, univ, ht, is_open_univ, rfl⟩))
558-
(assume s ⟨t, ht, s_eq⟩,
559-
have set.prod univ t = s, by simp [s_eq, preimage, set.prod],
560-
this ▸ (generate_open.basic _ ⟨univ, t, is_open_univ, ht, rfl⟩)))
539+
(ball_image_of_ball $ λt ht, generate_open.basic _ ⟨t, univ, by simpa [set.prod_eq] using ht⟩)
540+
(ball_image_of_ball $ λt ht, generate_open.basic _ ⟨univ, t, by simpa [set.prod_eq] using ht⟩))
561541
(generate_from_le $ assume g ⟨s, t, hs, ht, g_eq⟩, g_eq.symm ▸ is_open_prod hs ht)
562542

563543
lemma is_open_prod_iff {s : set (α×β)} : is_open s ↔
@@ -801,7 +781,7 @@ lemma embedding_inl : embedding (@sum.inl α β) :=
801781
change
802782
(is_open (sum.inl ⁻¹' (@sum.inl α β '' u)) ∧
803783
is_open (sum.inr ⁻¹' (@sum.inl α β '' u))) ∧
804-
u = sum.inl ⁻¹' (sum.inl '' u),
784+
sum.inl ⁻¹' (sum.inl '' u) = u,
805785
have : sum.inl ⁻¹' (@sum.inl α β '' u) = u :=
806786
preimage_image_eq u (λ _ _, sum.inl.inj_iff.mp), rw this,
807787
have : sum.inr ⁻¹' (@sum.inl α β '' u) = ∅ :=
@@ -819,7 +799,7 @@ lemma embedding_inr : embedding (@sum.inr α β) :=
819799
change
820800
(is_open (sum.inl ⁻¹' (@sum.inr α β '' u)) ∧
821801
is_open (sum.inr ⁻¹' (@sum.inr α β '' u))) ∧
822-
u = sum.inr ⁻¹' (sum.inr '' u),
802+
sum.inr ⁻¹' (sum.inr '' u) = u,
823803
have : sum.inl ⁻¹' (@sum.inr α β '' u) = ∅ :=
824804
eq_empty_iff_forall_not_mem.mpr (assume b ⟨a, _, h⟩, sum.inr_ne_inl h), rw this,
825805
have : sum.inr ⁻¹' (@sum.inr α β '' u) = u :=
@@ -1007,7 +987,7 @@ lemma pi_eq_generate_from [∀a, topological_space (π a)] :
1007987
generate_from {g | ∃(s:Πa, set (π a)) (i : finset ι), (∀a∈i, is_open (s a)) ∧ g = pi ↑i s} :=
1008988
le_antisymm
1009989
(supr_le $ assume a s ⟨t, ht, s_eq⟩, generate_open.basic _ $
1010-
⟨function.update (λa, univ) a t, {a}, by simpa using ht, by ext f; simp [s_eq, pi]⟩)
990+
⟨function.update (λa, univ) a t, {a}, by simpa using ht, by ext f; simp [s_eq.symm, pi]⟩)
1011991
(generate_from_le $ assume g ⟨s, i, hi, eq⟩, eq.symm ▸ is_open_set_pi (finset.finite_to_set _) hi)
1012992

1013993
lemma pi_generate_from_eq {g : Πa, set (set (π a))} :
@@ -1091,7 +1071,8 @@ lemma tendsto_cons_iff [topological_space β]
10911071
tendsto f (nhds (a :: l)) b ↔ tendsto (λp:α×list α, f (p.1 :: p.2)) ((nhds a).prod (nhds l)) b :=
10921072
have nhds (a :: l) = ((nhds a).prod (nhds l)).map (λp:α×list α, (p.1 :: p.2)),
10931073
begin
1094-
simp only [nhds_cons, prod_eq, (filter.map_def _ _).symm, (filter.seq_eq_filter_seq _ _).symm],
1074+
simp only
1075+
[nhds_cons, filter.prod_eq, (filter.map_def _ _).symm, (filter.seq_eq_filter_seq _ _).symm],
10951076
simp [-filter.seq_eq_filter_seq, -filter.map_def, (∘)] with functor_norm,
10961077
end,
10971078
by rw [this, filter.tendsto_map'_iff]
@@ -1127,7 +1108,8 @@ lemma tendsto_insert_nth' {a : α} : ∀{n : ℕ} {l : list α},
11271108
have (nhds a).prod (nhds (a' :: l)) =
11281109
((nhds a).prod ((nhds a').prod (nhds l))).map (λp:α×α×list α, (p.1, p.2.1 :: p.2.2)),
11291110
begin
1130-
simp only [nhds_cons, prod_eq, (filter.map_def _ _).symm, (filter.seq_eq_filter_seq _ _).symm],
1111+
simp only
1112+
[nhds_cons, filter.prod_eq, (filter.map_def _ _).symm, (filter.seq_eq_filter_seq _ _).symm],
11311113
simp [-filter.seq_eq_filter_seq, -filter.map_def, (∘)] with functor_norm
11321114
end,
11331115
begin

src/topology/instances/ennreal.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ end
6464
lemma is_open_ne_top : is_open {a : ennreal | a ≠ ⊤} :=
6565
is_open_neg (is_closed_eq continuous_id continuous_const)
6666

67-
lemma coe_image_univ_mem_nhds : (coe : nnreal → ennreal) '' univ ∈ (nhds (r : ennreal)).sets :=
68-
have {a : ennreal | a ≠ ⊤} = (coe : nnreal → ennreal) '' univ,
67+
lemma coe_range_mem_nhds : range (coe : nnreal → ennreal) ∈ (nhds (r : ennreal)).sets :=
68+
have {a : ennreal | a ≠ ⊤} = range (coe : nnreal → ennreal),
6969
from set.ext $ assume a, by cases a; simp [none_eq_top, some_eq_coe],
7070
this ▸ mem_nhds_sets is_open_ne_top coe_ne_top
7171

@@ -78,14 +78,14 @@ continuous (λa, (f a : ennreal)) ↔ continuous f :=
7878
embedding_coe.continuous_iff.symm
7979

8080
lemma nhds_coe {r : nnreal} : nhds (r : ennreal) = (nhds r).map coe :=
81-
by rw [embedding_coe.2, map_nhds_induced_eq coe_image_univ_mem_nhds]
81+
by rw [embedding_coe.2, map_nhds_induced_eq coe_range_mem_nhds]
8282

8383
lemma nhds_coe_coe {r p : nnreal} : nhds ((r : ennreal), (p : ennreal)) =
8484
(nhds (r, p)).map (λp:nnreal×nnreal, (p.1, p.2)) :=
8585
begin
8686
rw [(embedding_prod_mk embedding_coe embedding_coe).map_nhds_eq],
87-
rw [← univ_prod_univ, ← prod_image_image_eq],
88-
exact prod_mem_nhds_sets coe_image_univ_mem_nhds coe_image_univ_mem_nhds
87+
rw [← prod_range_range_eq],
88+
exact prod_mem_nhds_sets coe_range_mem_nhds coe_range_mem_nhds
8989
end
9090

9191
lemma tendsto_to_nnreal {a : ennreal} : a ≠ ⊤ →

src/topology/instances/nnreal.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ instance : topological_semiring ℝ≥0 :=
2525
(continuous_add (continuous.comp continuous_fst continuous_subtype_val)
2626
(continuous.comp continuous_snd continuous_subtype_val)) }
2727

28+
instance : second_countable_topology nnreal :=
29+
topological_space.subtype.second_countable_topology _ _
30+
2831
instance : orderable_topology ℝ≥0 :=
2932
⟨ le_antisymm
3033
begin

src/topology/uniform_space/basic.lean

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ begin
659659
rcases c f' cf' this with ⟨x, xs, hx⟩,
660660
existsi [m x, mem_image_of_mem m xs],
661661
rw [(uniform_embedding.embedding hm).2, nhds_induced_eq_comap] at hx,
662-
calc f map m f' : le_map_comap' fs (λb ⟨x, hx⟩, ⟨x, hx.2⟩)
662+
calc f = map m f' : (map_comap $ filter.mem_sets_of_superset fs $ image_subset_range _ _).symm
663663
... ≤ map m (comap m (nhds (m x))) : map_mono hx
664664
... ≤ nhds (m x) : map_comap_le }
665665
end
@@ -1342,21 +1342,17 @@ begin
13421342
rw [nhds_subtype_eq_comap] at hc,
13431343
simp [comap_comap_comp] at hc,
13441344
change (tendsto (f ∘ @subtype.val α p) (comap (e ∘ @subtype.val α p) (nhds b)) (nhds c)) at hc,
1345-
rw [←comap_comap_comp] at hc,
1346-
existsi c,
1347-
apply tendsto_comap'' s _ _ hc,
1345+
rw [←comap_comap_comp, tendsto_comap'_iff] at hc,
1346+
exact ⟨c, hc⟩,
13481347
exact ⟨_, hb, assume x,
13491348
begin
1350-
change e x ∈ (closure (e '' s)) → x ∈ s,
1351-
rw [←closure_induced, closure_eq_nhds],
1352-
dsimp,
1353-
rw [nhds_induced_eq_comap, de.induced],
1354-
change x ∈ {x | nhds x ⊓ principal s ≠ ⊥} → x ∈ s,
1349+
change e x ∈ (closure (e '' s)) → x ∈ range subtype.val,
1350+
rw [←closure_induced, closure_eq_nhds, mem_set_of_eq, (≠), nhds_induced_eq_comap, de.induced],
1351+
change x ∈ {x | nhds x ⊓ principal s ≠ ⊥} → x ∈ range subtype.val,
13551352
rw [←closure_eq_nhds, closure_eq_of_is_closed hs],
1356-
exact id,
1353+
exact assume hxs, ⟨⟨x, hp x hxs⟩, rfl⟩,
13571354
exact de.inj
1358-
end⟩,
1359-
exact (assume x hx, ⟨⟨x, hp x hx⟩, rfl⟩)
1355+
end
13601356
end
13611357

13621358
section prod

src/topology/uniform_space/completion.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ instance complete_space_separation [h : complete_space α] :
156156
cauchy_comap comap_quotient_le_uniformity hf $
157157
comap_neq_bot_of_surj hf.left $ assume b, quotient.exists_rep _,
158158
let ⟨x, (hx : f.comap (λx, ⟦x⟧) ≤ nhds x)⟩ := complete_space.complete this in
159-
⟨⟦x⟧, calc f ≤ map (λx, ⟦x⟧) (f.comap (λx, ⟦x⟧)) : le_map_comap $ assume b, quotient.exists_rep _
159+
⟨⟦x⟧, calc f = map (λx, ⟦x⟧) (f.comap (λx, ⟦x⟧)) :
160+
(map_comap $ univ_mem_sets' $ assume b, quotient.exists_rep _).symm
160161
... ≤ map (λx, ⟦x⟧) (nhds x) : map_mono hx
161162
... ≤ _ : continuous_iff_tendsto.mp uniform_continuous_quotient_mk.continuous _⟩⟩
162163

0 commit comments

Comments
 (0)