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

Commit c59dbf3

Browse files
committed
chore(topology/basic): add cluster_pt.map, rename mem_closure (#5065)
* add `filter.prod_pure`, `filter.pure_prod`, `cluster_pt.map`, and `set.maps_to.closure`; * rename `mem_closure` to `map_mem_closure`; * rename `mem_closure2` to `map_mem_closure2`.
1 parent a649851 commit c59dbf3

File tree

5 files changed

+31
-22
lines changed

5 files changed

+31
-22
lines changed

src/order/filter/basic.lean

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2286,8 +2286,14 @@ by simp only [filter.prod, comap_inf, inf_comm, inf_assoc, inf_left_comm]
22862286
(𝓟 s) ×ᶠ (𝓟 t) = 𝓟 (set.prod s t) :=
22872287
by simp only [filter.prod, comap_principal, principal_eq_iff_eq, comap_principal, inf_principal]; refl
22882288

2289-
@[simp] lemma prod_pure_pure {a : α} {b : β} : (pure a) ×ᶠ (pure b) = pure (a, b) :=
2290-
by simp only [← principal_singleton, prod_principal_principal, singleton_prod_singleton]
2289+
@[simp] lemma pure_prod {a : α} {f : filter β} : pure a ×ᶠ f = map (prod.mk a) f :=
2290+
by rw [prod_eq, map_pure, pure_seq_eq_map]
2291+
2292+
@[simp] lemma prod_pure {f : filter α} {b : β} : f ×ᶠ pure b = map (λ a, (a, b)) f :=
2293+
by rw [prod_eq, seq_pure, map_map]
2294+
2295+
lemma prod_pure_pure {a : α} {b : β} : (pure a) ×ᶠ (pure b) = pure (a, b) :=
2296+
by simp
22912297

22922298
lemma prod_eq_bot {f : filter α} {g : filter β} : f ×ᶠ g = ⊥ ↔ (f = ⊥ ∨ g = ⊥) :=
22932299
begin

src/topology/algebra/ring.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ def ideal.closure (S : ideal α) : ideal α :=
5252
{ carrier := closure S,
5353
zero_mem' := subset_closure S.zero_mem,
5454
add_mem' := assume x y hx hy,
55-
mem_closure2 continuous_add hx hy $ assume a b, S.add_mem,
55+
map_mem_closure2 continuous_add hx hy $ assume a b, S.add_mem,
5656
smul_mem' := assume c x hx,
5757
have continuous (λx:α, c * x) := continuous_const.mul continuous_id,
58-
mem_closure this hx $ assume a, S.mul_mem_left }
58+
map_mem_closure this hx $ assume a, S.mul_mem_left }
5959

6060
@[simp] lemma ideal.coe_closure (S : ideal α) :
6161
(S.closure : set α) = closure S := rfl

src/topology/basic.lean

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ noncomputable theory
1414
The main definition is the type class `topological space α` which endows a type `α` with a topology.
1515
Then `set α` gets predicates `is_open`, `is_closed` and functions `interior`, `closure` and
1616
`frontier`. Each point `x` of `α` gets a neighborhood filter `𝓝 x`. A filter `F` on `α` has
17-
`x` as a cluster point if `is_cluster_pt x F : 𝓝 x ⊓ F ≠ ⊥`. A map `f : ι → α` clusters at `x`
17+
`x` as a cluster point if `cluster_pt x F : 𝓝 x ⊓ F ≠ ⊥`. A map `f : ι → α` clusters at `x`
1818
along `F : filter ι` if `map_cluster_pt x F f : cluster_pt x (map f F)`. In particular
1919
the notion of cluster point of a sequence `u` is `map_cluster_pt x at_top u`.
2020
@@ -969,6 +969,11 @@ lemma continuous_at.preimage_mem_nhds {f : α → β} {x : α} {t : set β} (h :
969969
(ht : t ∈ 𝓝 (f x)) : f ⁻¹' t ∈ 𝓝 x :=
970970
h ht
971971

972+
lemma cluster_pt.map {x : α} {la : filter α} {lb : filter β} (H : cluster_pt x la)
973+
{f : α → β} (hfc : continuous_at f x) (hf : tendsto f la lb) :
974+
cluster_pt (f x) lb :=
975+
ne_bot_of_le_ne_bot ((map_ne_bot_iff f).2 H) $ hfc.tendsto.inf hf
976+
972977
lemma preimage_interior_subset_interior_preimage {f : α → β} {s : set β}
973978
(hf : continuous f) : f⁻¹' (interior s) ⊆ interior (f⁻¹' s) :=
974979
interior_maximal (preimage_mono interior_subset) (is_open_interior.preimage hf)
@@ -1110,23 +1115,21 @@ begin
11101115
apply h', rw mem_nhds_sets_iff, exact ⟨s, set.subset.refl _, os, ys⟩
11111116
end
11121117

1118+
/-- If a continuous map `f` maps `s` to `t`, then it maps `closure s` to `closure t`. -/
1119+
lemma set.maps_to.closure {s : set α} {t : set β} {f : α → β} (h : maps_to f s t)
1120+
(hc : continuous f) : maps_to f (closure s) (closure t) :=
1121+
begin
1122+
simp only [maps_to, mem_closure_iff_cluster_pt],
1123+
exact λ x hx, hx.map hc.continuous_at (tendsto_principal_principal.2 h)
1124+
end
1125+
11131126
lemma image_closure_subset_closure_image {f : α → β} {s : set α} (h : continuous f) :
11141127
f '' closure s ⊆ closure (f '' s) :=
1115-
have ∀ (a : α), cluster_pt a (𝓟 s) → cluster_pt (f a) (𝓟 (f '' s)),
1116-
from assume a ha,
1117-
have h₁ : ¬ map f (𝓝 a ⊓ 𝓟 s) = ⊥,
1118-
by rwa[map_eq_bot_iff],
1119-
have h₂ : map f (𝓝 a ⊓ 𝓟 s) ≤ 𝓝 (f a) ⊓ 𝓟 (f '' s),
1120-
from le_inf
1121-
(le_trans (map_mono inf_le_left) $ by rw [continuous_iff_continuous_at] at h; exact h a)
1122-
(le_trans (map_mono inf_le_right) $ by simp [subset_preimage_image] ),
1123-
ne_bot_of_le_ne_bot h₁ h₂,
1124-
by simp [image_subset_iff, closure_eq_cluster_pts]; assumption
1125-
1126-
lemma mem_closure {s : set α} {t : set β} {f : α → β} {a : α}
1128+
((maps_to_image f s).closure h).image_subset
1129+
1130+
lemma map_mem_closure {s : set α} {t : set β} {f : α → β} {a : α}
11271131
(hf : continuous f) (ha : a ∈ closure s) (ht : ∀a∈s, f a ∈ t) : f a ∈ closure t :=
1128-
subset.trans (image_closure_subset_closure_image hf) (closure_mono $ image_subset_iff.2 ht) $
1129-
(mem_image_of_mem f ha)
1132+
set.maps_to.closure ht hf ha
11301133

11311134
/-!
11321135
### Function with dense range

src/topology/constructions.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,13 @@ have (𝓝 a ×ᶠ 𝓝 b) ⊓ 𝓟 (set.prod s t) = (𝓝 a ⊓ 𝓟 s) ×ᶠ (
303303
by rw [←prod_inf_prod, prod_principal_principal],
304304
by simp [closure_eq_cluster_pts, cluster_pt, nhds_prod_eq, this]; exact prod_ne_bot
305305

306-
lemma mem_closure2 {s : set α} {t : set β} {u : set γ} {f : α → β → γ} {a : α} {b : β}
306+
lemma map_mem_closure2 {s : set α} {t : set β} {u : set γ} {f : α → β → γ} {a : α} {b : β}
307307
(hf : continuous (λp:α×β, f p.1 p.2)) (ha : a ∈ closure s) (hb : b ∈ closure t)
308308
(hu : ∀a b, a ∈ s → b ∈ t → f a b ∈ u) :
309309
f a b ∈ closure u :=
310310
have (a, b) ∈ closure (set.prod s t), by rw [closure_prod_eq]; from ⟨ha, hb⟩,
311311
show (λp:α×β, f p.1 p.2) (a, b) ∈ closure u, from
312-
mem_closure hf this $ assume ⟨a, b⟩ ⟨ha, hb⟩, hu a b ha hb
312+
map_mem_closure hf this $ assume ⟨a, b⟩ ⟨ha, hb⟩, hu a b ha hb
313313

314314
lemma is_closed.prod {s₁ : set α} {s₂ : set β} (h₁ : is_closed s₁) (h₂ : is_closed s₂) :
315315
is_closed (set.prod s₁ s₂) :=

src/topology/metric_space/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,7 @@ begin
14751475
intros x y x_in y_in,
14761476
exact this (x, y) (mk_mem_prod x_in y_in) },
14771477
intros p p_in,
1478-
have := mem_closure continuous_dist p_in h,
1478+
have := map_mem_closure continuous_dist p_in h,
14791479
rwa (is_closed_le' C).closure_eq at this
14801480
end
14811481

0 commit comments

Comments
 (0)