@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Johannes Hölzl, Mario Carneiro, Jeremy Avigad
5
5
-/
6
6
7
- import order.filter
7
+ import order.filter order.filter.bases
8
8
9
9
/-!
10
10
# Basic theory of topological spaces.
@@ -387,41 +387,29 @@ localized "notation `𝓝` := nhds" in topological_space
387
387
388
388
lemma nhds_def (a : α) : 𝓝 a = (⨅ s ∈ {s : set α | a ∈ s ∧ is_open s}, principal s) := rfl
389
389
390
+ lemma nhds_basis_opens (a : α) : (𝓝 a).has_basis (λ s : set α, a ∈ s ∧ is_open s) id :=
391
+ has_basis_binfi_principal
392
+ (λ s ⟨has, hs⟩ t ⟨hat, ht⟩, ⟨s ∩ t, ⟨⟨has, hat⟩, is_open_inter hs ht⟩,
393
+ ⟨inter_subset_left _ _, inter_subset_right _ _⟩⟩)
394
+ ⟨univ, ⟨mem_univ a, is_open_univ⟩⟩
395
+
390
396
lemma le_nhds_iff {f a} : f ≤ 𝓝 a ↔ ∀ s : set α, a ∈ s → is_open s → s ∈ f :=
391
397
by simp [nhds_def]
392
398
393
399
lemma nhds_le_of_le {f a} {s : set α} (h : a ∈ s) (o : is_open s) (sf : principal s ≤ f) : 𝓝 a ≤ f :=
394
400
by rw nhds_def; exact infi_le_of_le s (infi_le_of_le ⟨h, o⟩ sf)
395
401
396
- lemma nhds_sets {a : α} : (𝓝 a).sets = {s | ∃t⊆s, is_open t ∧ a ∈ t} :=
397
- calc (𝓝 a).sets = (⋃s∈{s : set α| a ∈ s ∧ is_open s}, (principal s).sets) : binfi_sets_eq
398
- (assume x ⟨hx₁, hx₂⟩ y ⟨hy₁, hy₂⟩,
399
- ⟨x ∩ y, ⟨⟨hx₁, hy₁⟩, is_open_inter hx₂ hy₂⟩,
400
- le_principal_iff.2 (inter_subset_left _ _),
401
- le_principal_iff.2 (inter_subset_right _ _)⟩)
402
- ⟨univ, mem_univ _, is_open_univ⟩
403
- ... = {s | ∃t⊆s, is_open t ∧ a ∈ t} :
404
- le_antisymm
405
- (supr_le $ assume i, supr_le $ assume ⟨hi₁, hi₂⟩ t ht, ⟨i, ht, hi₂, hi₁⟩)
406
- (assume t ⟨i, hi₁, hi₂, hi₃⟩, mem_Union.2 ⟨i, mem_Union.2 ⟨⟨hi₃, hi₂⟩, hi₁⟩⟩)
402
+ lemma mem_nhds_sets_iff {a : α} {s : set α} :
403
+ s ∈ 𝓝 a ↔ ∃t⊆s, is_open t ∧ a ∈ t :=
404
+ (nhds_basis_opens a).mem_iff.trans
405
+ ⟨λ ⟨t, ⟨hat, ht⟩, hts⟩, ⟨t, hts, ht, hat⟩, λ ⟨t, hts, ht, hat⟩, ⟨t, ⟨hat, ht⟩, hts⟩⟩
407
406
408
407
lemma map_nhds {a : α} {f : α → β} :
409
408
map f (𝓝 a) = (⨅ s ∈ {s : set α | a ∈ s ∧ is_open s}, principal (image f s)) :=
410
- calc map f (𝓝 a) = (⨅ s ∈ {s : set α | a ∈ s ∧ is_open s}, map f (principal s)) :
411
- map_binfi_eq
412
- (assume x ⟨hx₁, hx₂⟩ y ⟨hy₁, hy₂⟩,
413
- ⟨x ∩ y, ⟨⟨hx₁, hy₁⟩, is_open_inter hx₂ hy₂⟩,
414
- le_principal_iff.2 (inter_subset_left _ _),
415
- le_principal_iff.2 (inter_subset_right _ _)⟩)
416
- ⟨univ, mem_univ _, is_open_univ⟩
417
- ... = _ : by simp only [map_principal]
409
+ ((nhds_basis_opens a).map f).eq_binfi
418
410
419
411
attribute [irreducible] nhds
420
412
421
- lemma mem_nhds_sets_iff {a : α} {s : set α} :
422
- s ∈ 𝓝 a ↔ ∃t⊆s, is_open t ∧ a ∈ t :=
423
- by simp only [nhds_sets, mem_set_of_eq, exists_prop]
424
-
425
413
lemma mem_of_nhds {a : α} {s : set α} : s ∈ 𝓝 a → a ∈ s :=
426
414
λ H, let ⟨t, ht, _, hs⟩ := mem_nhds_sets_iff.1 H in ht hs
427
415
@@ -435,8 +423,8 @@ iff.intro
435
423
(λ h s os xs, h s (mem_nhds_sets os xs))
436
424
(λ h t,
437
425
begin
438
- change t ∈ ( 𝓝 x).sets → P t,
439
- rw nhds_sets ,
426
+ change t ∈ 𝓝 x → P t,
427
+ rw mem_nhds_sets_iff ,
440
428
rintros ⟨s, hs, opens, xs⟩,
441
429
exact hP _ _ hs (h s opens xs),
442
430
end )
@@ -512,6 +500,14 @@ mem_closure_iff.trans
512
500
(H _ is_open_interior (mem_interior_iff_mem_nhds.2 ht)),
513
501
λ H o oo ao, H _ (mem_nhds_sets oo ao)⟩
514
502
503
+ theorem mem_closure_iff_nhds_basis {a : α} {p : β → Prop } {s : β → set α} (h : (𝓝 a).has_basis p s)
504
+ {t : set α} :
505
+ a ∈ closure t ↔ ∀ i, p i → ∃ y ∈ t, y ∈ s i :=
506
+ mem_closure_iff_nhds.trans
507
+ ⟨λ H i hi, let ⟨x, hx⟩ := (H _ $ h.mem_of_mem hi) in ⟨x, hx.2 , hx.1 ⟩,
508
+ λ H t' ht', let ⟨i, hi, hit⟩ := (h t').1 ht', ⟨x, xt, hx⟩ := H i hi in
509
+ ⟨x, hit hx, xt⟩⟩
510
+
515
511
/-- `x` belongs to the closure of `s` if and only if some ultrafilter
516
512
supported on `s` converges to `x`. -/
517
513
lemma mem_closure_iff_ultrafilter {s : set α} {x : α} :
@@ -611,8 +607,8 @@ lemma is_closed_Union_of_locally_finite {f : β → set α}
611
607
is_open_iff_nhds.mpr $ assume a, assume h : a ∉ (⋃i, f i),
612
608
have ∀i, a ∈ -f i,
613
609
from assume i hi, h $ mem_Union.2 ⟨i, hi⟩,
614
- have ∀i, - f i ∈ (𝓝 a).sets ,
615
- by rw [nhds_sets ]; exact assume i, ⟨- f i, subset.refl _, h₂ i, this i⟩,
610
+ have ∀i, - f i ∈ (𝓝 a),
611
+ by simp only [mem_nhds_sets_iff ]; exact assume i, ⟨- f i, subset.refl _, h₂ i, this i⟩,
616
612
let ⟨t, h_sets, (h_fin : finite {i | (f i ∩ t).nonempty })⟩ := h₁ a in
617
613
618
614
calc 𝓝 a ≤ principal (t ∩ (⋂ i∈{i | (f i ∩ t).nonempty }, - f i)) :
@@ -664,11 +660,9 @@ lemma continuous_at.comp {g : β → γ} {f : α → β} {x : α}
664
660
hg.comp hf
665
661
666
662
lemma continuous.tendsto {f : α → β} (hf : continuous f) (x) :
667
- tendsto f (𝓝 x) (𝓝 (f x)) | s :=
668
- show s ∈ 𝓝 (f x) → s ∈ map f (𝓝 x),
669
- by simp [nhds_sets]; exact
670
- assume t t_subset t_open fx_in_t,
671
- ⟨f ⁻¹' t, preimage_mono t_subset, hf t t_open, fx_in_t⟩
663
+ tendsto f (𝓝 x) (𝓝 (f x)) :=
664
+ ((nhds_basis_opens x).tendsto_iff $ nhds_basis_opens $ f x).2 $
665
+ λ t ⟨hxt, ht⟩, ⟨f ⁻¹' t, ⟨hxt, hf _ ht⟩, subset.refl _⟩
672
666
673
667
lemma continuous.continuous_at {f : α → β} {x : α} (h : continuous f) :
674
668
continuous_at f x :=
@@ -679,9 +673,9 @@ lemma continuous_iff_continuous_at {f : α → β} : continuous f ↔ ∀ x, con
679
673
assume hf : ∀x, tendsto f (𝓝 x) (𝓝 (f x)),
680
674
assume s, assume hs : is_open s,
681
675
have ∀a, f a ∈ s → s ∈ 𝓝 (f a),
682
- by simp [nhds_sets]; exact assume a ha, ⟨s, subset.refl s, hs, ha⟩ ,
676
+ from λ a ha, mem_nhds_sets hs ha,
683
677
show is_open (f ⁻¹' s),
684
- by simp [ is_open_iff_nhds]; exact assume a ha, hf a (this a ha)⟩
678
+ from is_open_iff_nhds. 2 $ λ a ha, le_principal_iff. 2 $ hf _ (this a ha)⟩
685
679
686
680
lemma continuous_const {b : β} : continuous (λa:α, b) :=
687
681
continuous_iff_continuous_at.mpr $ assume a, tendsto_const_nhds
@@ -755,9 +749,7 @@ lemma pcontinuous_iff' {f : α →. β} :
755
749
begin
756
750
split,
757
751
{ intros h x y h',
758
- rw [ptendsto'_def],
759
- change ∀ (s : set β), s ∈ (𝓝 y).sets → pfun.preimage f s ∈ (𝓝 x).sets,
760
- rw [nhds_sets, nhds_sets],
752
+ simp only [ptendsto'_def, mem_nhds_sets_iff],
761
753
rintros s ⟨t, tsubs, opent, yt⟩,
762
754
exact ⟨f.preimage t, pfun.preimage_mono _ tsubs, h _ opent, ⟨y, yt, h'⟩⟩
763
755
},
0 commit comments