|
| 1 | +/- |
| 2 | +Copyright (c) 2020 Yury Kudryashov. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Yury Kudryashov |
| 5 | +-/ |
| 6 | +module |
| 7 | + |
| 8 | +public import Mathlib.Topology.Order.Basic |
| 9 | +public import Mathlib.Order.SuccPred.Limit |
| 10 | +import Mathlib.Topology.Order.IsLUB |
| 11 | + |
| 12 | +/-! |
| 13 | +# `Filter.atTop` and `Filter.atBot` for intervals in a linear order topology |
| 14 | +
|
| 15 | +Let `X` be a linear order with order topology. |
| 16 | +Let `a` be a point that is either the bottom element of `X` or is not isolated on the left, |
| 17 | +see `Order.IsSuccPrelimit`. |
| 18 | +Then the `Filter.atTop` filter on `Set.Iio a` and `𝓝[<] a` are related by the coercion map |
| 19 | +via pushforward and pullback, see `map_coe_Iio_atTop` and `comap_coe_Iio_nhdsLT`. |
| 20 | +
|
| 21 | +We prove several versions of this statement for `Set.Iio`, `Set.Ioi`, and `Set.Ioo`, |
| 22 | +as well as `Filter.atTop` and `Filter.atBot`. |
| 23 | +
|
| 24 | +The assumption on `a` is automatically satisfied for densely ordered types, |
| 25 | +see `Order.IsSuccPrelimit.of_dense`. |
| 26 | +-/ |
| 27 | + |
| 28 | +public section |
| 29 | + |
| 30 | +open Set Filter Order OrderDual |
| 31 | +open scoped Topology |
| 32 | + |
| 33 | +variable {X : Type*} [LinearOrder X] [TopologicalSpace X] [OrderTopology X] |
| 34 | + {s : Set X} {a b : X} |
| 35 | + |
| 36 | +theorem comap_coe_nhdsLT_eq_atTop_iff : |
| 37 | + comap ((↑) : s → X) (𝓝[<] b) = atTop ↔ |
| 38 | + s ⊆ Iio b ∧ (s.Nonempty → ∀ a < b, (s ∩ Ioo a b).Nonempty) := by |
| 39 | + rcases s.eq_empty_or_nonempty with rfl | hsne |
| 40 | + · simp [eq_iff_true_of_subsingleton] |
| 41 | + have := hsne.to_subtype |
| 42 | + simp only [hsne, true_imp_iff] |
| 43 | + by_cases hsub : s ⊆ Iio b |
| 44 | + · simp only [hsub, true_and] |
| 45 | + constructor |
| 46 | + · intro h a ha |
| 47 | + have := preimage_mem_comap (m := ((↑) : s → X)) (Ioo_mem_nhdsLT ha) |
| 48 | + rw [h] at this |
| 49 | + rcases Filter.nonempty_of_mem this with ⟨⟨c, hcs⟩, hc⟩ |
| 50 | + exact ⟨c, hcs, hc⟩ |
| 51 | + · intro h |
| 52 | + refine (nhdsLT_basis_of_exists_lt (hsne.mono hsub)).comap _ |>.ext atTop_basis ?_ ?_ |
| 53 | + · intro a hab |
| 54 | + rcases h a hab with ⟨c, hcs, hc⟩ |
| 55 | + use ⟨c, hcs⟩ |
| 56 | + simp_all [subset_def, hc.1.trans_le] |
| 57 | + · rintro ⟨a, has⟩ - |
| 58 | + use a, hsub has |
| 59 | + simp_all [subset_def, le_of_lt] |
| 60 | + · suffices ¬Tendsto (↑) (atTop : Filter s) (𝓝[<] b) by |
| 61 | + contrapose this |
| 62 | + simp_all [tendsto_iff_comap] |
| 63 | + intro h |
| 64 | + rcases not_subset_iff_exists_mem_notMem.mp hsub with ⟨a, has, ha⟩ |
| 65 | + rcases h.eventually eventually_mem_nhdsWithin |>.and (eventually_ge_atTop ⟨a, has⟩) |>.exists |
| 66 | + with ⟨⟨c, hcs⟩, hcb, hac⟩ |
| 67 | + apply lt_irrefl a |
| 68 | + calc |
| 69 | + a ≤ c := by simpa using hac |
| 70 | + _ < b := by simpa using hcb |
| 71 | + _ ≤ a := by simpa using ha |
| 72 | + |
| 73 | +theorem comap_coe_nhdsGT_eq_atBot_iff : |
| 74 | + comap ((↑) : s → X) (𝓝[>] b) = atBot ↔ |
| 75 | + s ⊆ Ioi b ∧ (s.Nonempty → ∀ a > b, (s ∩ Ioo b a).Nonempty) := by |
| 76 | + refine comap_coe_nhdsLT_eq_atTop_iff (s := OrderDual.ofDual ⁻¹' s) (b := OrderDual.toDual b) |
| 77 | + |>.trans <| .and .rfl <| forall₃_congr fun hne a ha ↦ ?_ |
| 78 | + rw [← a.toDual_ofDual, Ioo_toDual] |
| 79 | + rfl |
| 80 | + |
| 81 | +theorem comap_coe_nhdsLT_of_Ioo_subset (hsb : s ⊆ Iio b) (hs : s.Nonempty → ∃ a < b, Ioo a b ⊆ s) |
| 82 | + (hb : IsSuccPrelimit b := by exact .of_dense _) : |
| 83 | + comap ((↑) : s → X) (𝓝[<] b) = atTop := by |
| 84 | + rw [comap_coe_nhdsLT_eq_atTop_iff] |
| 85 | + refine ⟨hsb, fun hsne a ha ↦ ?_⟩ |
| 86 | + rcases hs hsne with ⟨c, hcb, hcs⟩ |
| 87 | + rcases hb.lt_iff_exists_lt.mp (max_lt ha hcb) with ⟨x, hxb, hacx⟩ |
| 88 | + rw [max_lt_iff] at hacx |
| 89 | + exact ⟨x, hcs ⟨hacx.2, hxb⟩, hacx.1, hxb⟩ |
| 90 | + |
| 91 | +theorem comap_coe_nhdsGT_of_Ioo_subset (hsa : s ⊆ Ioi a) (hs : s.Nonempty → ∃ b > a, Ioo a b ⊆ s) |
| 92 | + (ha : IsPredPrelimit a := by exact .of_dense _) : |
| 93 | + comap ((↑) : s → X) (𝓝[>] a) = atBot := by |
| 94 | + refine comap_coe_nhdsLT_of_Ioo_subset (show ofDual ⁻¹' s ⊆ Iio (toDual a) from hsa) ?_ ha.dual |
| 95 | + simpa only [OrderDual.exists, Ioo_toDual] |
| 96 | + |
| 97 | +theorem map_coe_atTop_of_Ioo_subset (hsb : s ⊆ Iio b) (hs : ∀ a' < b, ∃ a < b, Ioo a b ⊆ s) |
| 98 | + (hb : IsSuccPrelimit b := by exact .of_dense _) : |
| 99 | + map ((↑) : s → X) atTop = 𝓝[<] b := by |
| 100 | + rcases eq_empty_or_nonempty (Iio b) with (hb' | ⟨a, ha⟩) |
| 101 | + · have : IsEmpty s := ⟨fun x => hb'.subset (hsb x.2)⟩ |
| 102 | + rw [filter_eq_bot_of_isEmpty atTop, Filter.map_bot, hb', nhdsWithin_empty] |
| 103 | + · rw [← comap_coe_nhdsLT_of_Ioo_subset hsb (fun _ => hs a ha) hb, map_comap_of_mem] |
| 104 | + rw [Subtype.range_val] |
| 105 | + exact (mem_nhdsLT_iff_exists_Ioo_subset' ha).2 (hs a ha) |
| 106 | + |
| 107 | +theorem map_coe_atBot_of_Ioo_subset (hsa : s ⊆ Ioi a) (hs : ∀ b' > a, ∃ b > a, Ioo a b ⊆ s) |
| 108 | + (ha : IsPredPrelimit a := by exact .of_dense _) : |
| 109 | + map ((↑) : s → X) atBot = 𝓝[>] a := by |
| 110 | + refine map_coe_atTop_of_Ioo_subset (s := ofDual ⁻¹' s) (b := toDual a) hsa ?_ ha.dual |
| 111 | + intro b' hb' |
| 112 | + simpa [OrderDual.exists] using hs (ofDual b') hb' |
| 113 | + |
| 114 | +/-- The `atTop` filter for an open interval `Ioo a b` comes from the left-neighbourhoods filter at |
| 115 | +the right endpoint in the ambient order. -/ |
| 116 | +@[simp] |
| 117 | +theorem comap_coe_Ioo_nhdsLT (a b : X) (hb : IsSuccPrelimit b := by exact .of_dense _) : |
| 118 | + comap ((↑) : Ioo a b → X) (𝓝[<] b) = atTop := |
| 119 | + comap_coe_nhdsLT_of_Ioo_subset Ioo_subset_Iio_self |
| 120 | + (fun h => ⟨a, h.elim fun _x hx ↦ hx.1.trans hx.2, Subset.rfl⟩) hb |
| 121 | + |
| 122 | +/-- The `atBot` filter for an open interval `Ioo a b` comes from the right-neighbourhoods filter at |
| 123 | +the left endpoint in the ambient order. -/ |
| 124 | +@[simp] |
| 125 | +theorem comap_coe_Ioo_nhdsGT (a b : X) (ha : IsPredPrelimit a := by exact .of_dense _) : |
| 126 | + comap ((↑) : Ioo a b → X) (𝓝[>] a) = atBot := |
| 127 | + comap_coe_nhdsGT_of_Ioo_subset Ioo_subset_Ioi_self |
| 128 | + (fun h => ⟨b, h.elim fun _x hx ↦ hx.1.trans hx.2, Subset.rfl⟩) ha |
| 129 | + |
| 130 | +@[simp] |
| 131 | +theorem comap_coe_Ioi_nhdsGT (a : X) (ha : IsPredPrelimit a := by exact .of_dense _) : |
| 132 | + comap ((↑) : Ioi a → X) (𝓝[>] a) = atBot := |
| 133 | + comap_coe_nhdsGT_of_Ioo_subset Subset.rfl (fun ⟨x, hx⟩ => ⟨x, hx, Ioo_subset_Ioi_self⟩) ha |
| 134 | + |
| 135 | +@[simp] |
| 136 | +theorem comap_coe_Iio_nhdsLT (a : X) (ha : IsSuccPrelimit a := by exact .of_dense _) : |
| 137 | + comap ((↑) : Iio a → X) (𝓝[<] a) = atTop := |
| 138 | + comap_coe_Ioi_nhdsGT (toDual a) ha.dual |
| 139 | + |
| 140 | +@[simp] |
| 141 | +theorem map_coe_Ioo_atTop (h : a < b) (hb : IsSuccPrelimit b := by exact .of_dense _) : |
| 142 | + map ((↑) : Ioo a b → X) atTop = 𝓝[<] b := |
| 143 | + map_coe_atTop_of_Ioo_subset Ioo_subset_Iio_self (fun _ _ => ⟨_, h, Subset.rfl⟩) hb |
| 144 | + |
| 145 | +@[simp] |
| 146 | +theorem map_coe_Ioo_atBot (h : a < b) (ha : IsPredPrelimit a := by exact .of_dense _) : |
| 147 | + map ((↑) : Ioo a b → X) atBot = 𝓝[>] a := |
| 148 | + map_coe_atBot_of_Ioo_subset Ioo_subset_Ioi_self (fun _ _ => ⟨_, h, Subset.rfl⟩) ha |
| 149 | + |
| 150 | +@[simp] |
| 151 | +theorem map_coe_Ioi_atBot (a : X) (ha : IsPredPrelimit a := by exact .of_dense _) : |
| 152 | + map ((↑) : Ioi a → X) atBot = 𝓝[>] a := |
| 153 | + map_coe_atBot_of_Ioo_subset Subset.rfl (fun b hb => ⟨b, hb, Ioo_subset_Ioi_self⟩) ha |
| 154 | + |
| 155 | +@[simp] |
| 156 | +theorem map_coe_Iio_atTop (a : X) (ha : IsSuccPrelimit a := by exact .of_dense _) : |
| 157 | + map ((↑) : Iio a → X) atTop = 𝓝[<] a := |
| 158 | + map_coe_Ioi_atBot (toDual a) ha.dual |
| 159 | + |
| 160 | +variable {α : Type*} {l : Filter α} {f : X → α} |
| 161 | + |
| 162 | +@[simp] |
| 163 | +theorem tendsto_comp_coe_Ioo_atTop (h : a < b) (hb : IsSuccPrelimit b := by exact .of_dense _) : |
| 164 | + Tendsto (fun x : Ioo a b => f x) atTop l ↔ Tendsto f (𝓝[<] b) l := by |
| 165 | + rw [← map_coe_Ioo_atTop h hb, tendsto_map'_iff, Function.comp_def] |
| 166 | + |
| 167 | +@[simp] |
| 168 | +theorem tendsto_comp_coe_Ioo_atBot (h : a < b) (ha : IsPredPrelimit a := by exact .of_dense _) : |
| 169 | + Tendsto (fun x : Ioo a b => f x) atBot l ↔ Tendsto f (𝓝[>] a) l := by |
| 170 | + rw [← map_coe_Ioo_atBot h ha, tendsto_map'_iff, Function.comp_def] |
| 171 | + |
| 172 | +@[simp] |
| 173 | +theorem tendsto_comp_coe_Ioi_atBot (ha : IsPredPrelimit a := by exact .of_dense _) : |
| 174 | + Tendsto (fun x : Ioi a => f x) atBot l ↔ Tendsto f (𝓝[>] a) l := by |
| 175 | + rw [← map_coe_Ioi_atBot a ha, tendsto_map'_iff, Function.comp_def] |
| 176 | + |
| 177 | +@[simp] |
| 178 | +theorem tendsto_comp_coe_Iio_atTop (ha : IsSuccPrelimit a := by exact .of_dense _) : |
| 179 | + Tendsto (fun x : Iio a => f x) atTop l ↔ Tendsto f (𝓝[<] a) l := by |
| 180 | + rw [← map_coe_Iio_atTop a ha, tendsto_map'_iff, Function.comp_def] |
| 181 | + |
| 182 | +@[simp] |
| 183 | +theorem tendsto_Ioo_atTop {f : α → Ioo a b} (hb : IsSuccPrelimit b := by exact .of_dense _) : |
| 184 | + Tendsto f l atTop ↔ Tendsto (fun x => (f x : X)) l (𝓝[<] b) := by |
| 185 | + rw [← comap_coe_Ioo_nhdsLT a b hb, tendsto_comap_iff, Function.comp_def] |
| 186 | + |
| 187 | +@[simp] |
| 188 | +theorem tendsto_Ioo_atBot {f : α → Ioo a b} (ha : IsPredPrelimit a := by exact .of_dense _) : |
| 189 | + Tendsto f l atBot ↔ Tendsto (fun x => (f x : X)) l (𝓝[>] a) := by |
| 190 | + rw [← comap_coe_Ioo_nhdsGT a b ha, tendsto_comap_iff, Function.comp_def] |
| 191 | + |
| 192 | +@[simp] |
| 193 | +theorem tendsto_Ioi_atBot {f : α → Ioi a} (ha : IsPredPrelimit a := by exact .of_dense _) : |
| 194 | + Tendsto f l atBot ↔ Tendsto (fun x => (f x : X)) l (𝓝[>] a) := by |
| 195 | + rw [← comap_coe_Ioi_nhdsGT a ha, tendsto_comap_iff, Function.comp_def] |
| 196 | + |
| 197 | +@[simp] |
| 198 | +theorem tendsto_Iio_atTop {f : α → Iio a} (ha : IsSuccPrelimit a := by exact .of_dense _) : |
| 199 | + Tendsto f l atTop ↔ Tendsto (fun x => (f x : X)) l (𝓝[<] a) := by |
| 200 | + rw [← comap_coe_Iio_nhdsLT a ha, tendsto_comap_iff, Function.comp_def] |
0 commit comments