|
1 | | -import Munkres.Defs.Countable |
| 1 | +import Munkres.Mathlib.AccPt.Basic |
| 2 | +import Munkres.Mathlib.AccPt.Countable |
| 3 | +set_option linter.style.longLine false |
2 | 4 |
|
3 | | -open Filter Set Munkres |
4 | | -open scoped Topology |
5 | | - |
6 | | -universe u v |
7 | | - |
8 | | -variable {α : Type u} [TopologicalSpace α] |
9 | | - {β : Type v} |
10 | | - {A : Set α} {x : α} |
11 | | - |
12 | | -/-- Munkres defines that x is a limit point of A if every open U ⊆ X containing |
13 | | -x intersects with A \ {x}. This is equivalent to Mathlib's `AccPt x (𝓟 A)`. -/ |
14 | | -protected theorem AccPt.iff {x : α} : AccPt x (𝓟 A) ↔ ∀ U ∈ nhds' x, (U ∩ (A \ {x})).Nonempty |
15 | | - := by -- |
16 | | - rw [accPt_principal_iff_clusterPt, clusterPt_principal_iff] |
17 | | - simp only [mem_nhds_iff] |
18 | | - refine ⟨fun h U ⟨hU, hxU⟩ ↦ (h U ⟨U, le_refl _, hU, hxU⟩), ?_⟩ |
19 | | - intro h S ⟨U, hUS, hU, hxU⟩ |
20 | | - let ⟨t, htU, htA, hne⟩ := h U ⟨hU, hxU⟩ |
21 | | - exact ⟨t, hUS htU, htA, hne⟩ -- ∎ |
22 | | - |
23 | | ---* closure A = A ∪ A' |
24 | | -theorem AccPt.union_eq_closure : A ∪ { x | AccPt x (𝓟 A)} = closure A |
25 | | - := by -- |
26 | | - refine le_antisymm ?_ ?_ |
27 | | - · intro x hx |
28 | | - rcases hx with h | (h : AccPt x (𝓟 A)) |
29 | | - · exact subset_closure h |
30 | | - · rw [AccPt.iff] at h |
31 | | - rw [mem_closure_iff] |
32 | | - intro U hU hxU |
33 | | - obtain ⟨t, htU, htA, htx⟩ := h U ⟨hU, hxU⟩ |
34 | | - exact ⟨t, htU, htA⟩ |
35 | | - · intro x hx |
36 | | - refine or_iff_not_imp_left.mpr fun h ↦ ?_ |
37 | | - simp |
38 | | - refine AccPt.iff.mpr ?_ |
39 | | - intro U ⟨hU, hxU⟩ |
40 | | - rw [mem_closure_iff] at hx |
41 | | - obtain ⟨y, hyU, hyA⟩ := hx U hU hxU |
42 | | - have : y ≠ x := ne_of_mem_of_not_mem hyA h |
43 | | - refine ⟨y, hyU, hyA, this⟩ -- ∎ |
44 | | - |
45 | | -theorem AccPt.mem_closure (h : AccPt x (𝓟 A)) : x ∈ closure A |
46 | | - := by -- |
47 | | - exact mem_closure_iff_clusterPt.mpr h.clusterPt -- ∎ |
48 | | - |
49 | | --- Alternative proof. |
50 | | -example (h : AccPt x (𝓟 A)) : x ∈ closure A |
51 | | - := by -- |
52 | | - have : x ∈ A ∪ { x | AccPt x (𝓟 A) } := Set.mem_union_right A h |
53 | | - rw [AccPt.union_eq_closure] at this |
54 | | - exact this -- ∎ |
55 | | - |
56 | | -theorem AccPt.of_tendsto [Nonempty β] [SemilatticeSup β] {f : β → α} |
57 | | - (hA : ∀ᶠ n in atTop, f n ∈ A) (htt : Tendsto f atTop (𝓝[≠] x)) |
58 | | - : AccPt x (𝓟 A) |
59 | | - := by -- |
60 | | - rw [AccPt.iff] |
61 | | - intro U ⟨hU, hxU⟩ |
62 | | - rw [tendsto_nhdsWithin_iff] at htt |
63 | | - obtain ⟨htt, hne⟩ := htt |
64 | | - rw [tendsto_atTop_nhds] at htt |
65 | | - rw [eventually_atTop] at hne hA |
66 | | - specialize htt U hxU hU |
67 | | - obtain ⟨N₁, htt⟩ := htt |
68 | | - obtain ⟨N₂, hne⟩ := hne |
69 | | - obtain ⟨N₃, hA⟩ := hA |
70 | | - let N := (N₁ ⊔ N₂) ⊔ N₃ |
71 | | - have hN₁ : N₁ ≤ N := le_sup_left.trans le_sup_left |
72 | | - have hN₂ : N₂ ≤ N := le_sup_right.trans le_sup_left |
73 | | - have hN₃ : N₃ ≤ N := le_sup_right |
74 | | - specialize htt N hN₁ |
75 | | - specialize hne N hN₂ |
76 | | - specialize hA N hN₃ |
77 | | - exact ⟨f N, htt, hA, hne⟩ -- ∎ |
78 | | - |
79 | | -theorem AccPt.of_tendsto_nat {f : ℕ → α} (hA : ∀ᶠ n in atTop, f n ∈ A) |
80 | | - (htt : Tendsto f atTop (𝓝[≠] x)) : AccPt x (𝓟 A) |
81 | | - := by -- |
82 | | - exact AccPt.of_tendsto hA htt -- ∎ |
83 | | - |
84 | | --- And this is the reason why we need (𝓝[≠] x) above, and not just (𝓝 x). |
85 | | -example [h₀ : Nonempty α] : ∃ (A : Set α) (x : α) (f : ℕ → α), |
86 | | - (∀ᶠ n in atTop, f n ∈ A) ∧ Tendsto f atTop (𝓝 x) ∧ ¬AccPt x (𝓟 A) |
87 | | - := by -- |
88 | | - let x := h₀.some |
89 | | - refine ⟨{x}, x, fun _ ↦ x, ?_, ?_, ?_⟩ |
90 | | - · exact eventually_const.mpr rfl |
91 | | - · exact tendsto_const_nhds |
92 | | - · by_contra! h |
93 | | - rw [AccPt.iff] at h |
94 | | - specialize h univ ⟨isOpen_univ, trivial⟩ |
95 | | - rw [sdiff_self, bot_eq_empty, inter_empty] at h |
96 | | - exact Set.not_nonempty_empty h -- ∎ |
97 | | - |
98 | | -theorem AccPt.exists_tendsto [h₁ : FirstCountableTopology α] |
99 | | - : AccPt x (𝓟 A) → ∃ (f : ℕ → α), (∀ n, f n ∈ A) ∧ Tendsto f atTop (𝓝 x) |
100 | | - := by -- |
101 | | - intro hx |
102 | | - rw [AccPt.iff] at hx |
103 | | - rw [FirstCountableTopology.iff] at h₁ |
104 | | - specialize h₁ x |
105 | | - obtain ⟨β, hβ_countable, hβx⟩ := h₁ |
106 | | - haveI : Countable β := hβ_countable |
107 | | - obtain ⟨B, hB_anti, hB⟩ := hβx.exists_antitone_eq_range |
108 | | - let hδ (n : ℕ) := hx (B n) (hB.nhds' ⟨n, rfl⟩) |
109 | | - let f (n : ℕ) : α := (hδ n).some |
110 | | - use f |
111 | | - refine ⟨?_, ?_⟩ |
112 | | - · intro n |
113 | | - obtain ⟨hfB : f n ∈ B n, hfA : f n ∈ A \ {x}⟩ := (hδ n).some_mem |
114 | | - exact hfA.1 |
115 | | - · rw [tendsto_atTop_nhds] |
116 | | - intro U hxU hU |
117 | | - obtain ⟨b, ⟨N, heq⟩, hbU⟩ := hB.exists_mem_subset' hU hxU |
118 | | - subst heq |
119 | | - use N |
120 | | - intro n hn |
121 | | - obtain ⟨hfB : f n ∈ B n, hfA : f n ∈ A \ {x}⟩ := (hδ n).some_mem |
122 | | - exact hbU <| hB_anti hn hfB -- ∎ |
| 5 | +-- WARNING: THIS FILE IS AUTO-GENERATED. |
0 commit comments