Skip to content

Commit 1f80678

Browse files
urkudADedeckerjcommelin
committed
feat: port Topology.UniformSpace.UniformConvergence (#2051)
Co-authored-by: Anatole Dedecker <anatolededecker@gmail.com> Co-authored-by: Johan Commelin <johan@commelin.net>
1 parent b933c66 commit 1f80678

File tree

4 files changed

+1000
-6
lines changed

4 files changed

+1000
-6
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,7 @@ import Mathlib.Topology.UniformSpace.Basic
994994
import Mathlib.Topology.UniformSpace.Cauchy
995995
import Mathlib.Topology.UniformSpace.Pi
996996
import Mathlib.Topology.UniformSpace.Separation
997+
import Mathlib.Topology.UniformSpace.UniformConvergence
997998
import Mathlib.Topology.UniformSpace.UniformEmbedding
998999
import Mathlib.Util.AtomM
9991000
import Mathlib.Util.Export

Mathlib/Order/Filter/Prod.lean

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,21 @@ theorem prod_comm : f ×ᶠ g = map (fun p : β × α => (p.2, p.1)) (g ×ᶠ f)
251251
rfl
252252
#align filter.prod_comm Filter.prod_comm
253253

254+
theorem mem_prod_iff_left {s : Set (α × β)} {f : Filter α} {g : Filter β} :
255+
s ∈ f ×ᶠ g ↔ ∃ t ∈ f, ∀ᶠ y in g, ∀ x ∈ t, (x, y) ∈ s := by
256+
simp only [mem_prod_iff, prod_subset_iff]
257+
refine exists_congr fun _ => Iff.rfl.and <| Iff.trans ?_ exists_mem_subset_iff
258+
exact exists_congr fun _ => Iff.rfl.and forall₂_swap
259+
260+
theorem mem_prod_iff_right {s : Set (α × β)} {f : Filter α} {g : Filter β} :
261+
s ∈ f ×ᶠ g ↔ ∃ t ∈ g, ∀ᶠ x in f, ∀ y ∈ t, (x, y) ∈ s := by
262+
rw [prod_comm, mem_map, mem_prod_iff_left]; rfl
263+
254264
@[simp]
255265
theorem map_fst_prod (f : Filter α) (g : Filter β) [NeBot g] : map Prod.fst (f ×ᶠ g) = f := by
256-
refine' le_antisymm tendsto_fst fun s hs => _
257-
rw [mem_map, mem_prod_iff] at hs
258-
rcases hs with ⟨t₁, h₁, t₂, h₂, hs⟩
259-
rw [← image_subset_iff, fst_image_prod] at hs
260-
exacts[mem_of_superset h₁ hs, nonempty_of_mem h₂]
266+
ext s
267+
simp only [mem_map, mem_prod_iff_left, mem_preimage, eventually_const, ← subset_def,
268+
exists_mem_subset_iff]
261269
#align filter.map_fst_prod Filter.map_fst_prod
262270

263271
@[simp]
@@ -340,6 +348,14 @@ theorem prod_map_map_eq' {α₁ : Type _} {α₂ : Type _} {β₁ : Type _} {β
340348
prod_map_map_eq
341349
#align filter.prod_map_map_eq' Filter.prod_map_map_eq'
342350

351+
theorem prod_map_left (f : α → β) (F : Filter α) (G : Filter γ) :
352+
map f F ×ᶠ G = map (Prod.map f id) (F ×ᶠ G) := by
353+
rw [← prod_map_map_eq', map_id]
354+
355+
theorem prod_map_right (f : β → γ) (F : Filter α) (G : Filter β) :
356+
F ×ᶠ map f G = map (Prod.map id f) (F ×ᶠ G) := by
357+
rw [← prod_map_map_eq', map_id]
358+
343359
theorem le_prod_map_fst_snd {f : Filter (α × β)} : f ≤ map Prod.fst f ×ᶠ map Prod.snd f :=
344360
le_inf le_comap_map le_comap_map
345361
#align filter.le_prod_map_fst_snd Filter.le_prod_map_fst_snd
@@ -370,6 +386,12 @@ theorem prod_inf_prod {f₁ f₂ : Filter α} {g₁ g₂ : Filter β} :
370386
simp only [Filter.prod, comap_inf, inf_comm, inf_assoc, inf_left_comm]
371387
#align filter.prod_inf_prod Filter.prod_inf_prod
372388

389+
theorem inf_prod {f₁ f₂ : Filter α} {g : Filter β} : (f₁ ⊓ f₂) ×ᶠ g = (f₁ ×ᶠ g) ⊓ (f₂ ×ᶠ g) := by
390+
rw [prod_inf_prod, inf_idem]
391+
392+
theorem prod_inf {f : Filter α} {g₁ g₂ : Filter β} : f ×ᶠ (g₁ ⊓ g₂) = (f ×ᶠ g₁) ⊓ (f ×ᶠ g₂) := by
393+
rw [prod_inf_prod, inf_idem]
394+
373395
@[simp]
374396
theorem prod_principal_principal {s : Set α} {t : Set β} : 𝓟 s ×ᶠ 𝓟 t = 𝓟 (s ×ˢ t) := by
375397
simp only [Filter.prod, comap_principal, principal_eq_iff_eq, comap_principal, inf_principal]; rfl

Mathlib/Topology/ContinuousOn.lean

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,12 @@ theorem nhdsWithin_eq_nhdsWithin {a : α} {s t u : Set α} (h₀ : a ∈ s) (h
231231
rw [nhdsWithin_restrict t h₀ h₁, nhdsWithin_restrict u h₀ h₁, h₂]
232232
#align nhds_within_eq_nhds_within nhdsWithin_eq_nhdsWithin
233233

234+
-- porting note: new lemma; todo: make it `@[simp]`
235+
theorem nhdsWithin_eq_nhds {a : α} {s : Set α} : 𝓝[s] a = 𝓝 a ↔ s ∈ 𝓝 a :=
236+
inf_eq_left.trans le_principal_iff
237+
234238
theorem IsOpen.nhdsWithin_eq {a : α} {s : Set α} (h : IsOpen s) (ha : a ∈ s) : 𝓝[s] a = 𝓝 a :=
235-
inf_eq_left.2 <| le_principal_iff.2 <| IsOpen.mem_nhds h ha
239+
nhdsWithin_eq_nhds.2 <| h.mem_nhds ha
236240
#align is_open.nhds_within_eq IsOpen.nhdsWithin_eq
237241

238242
theorem preimage_nhds_within_coinduced {π : α → β} {s : Set β} {t : Set α} {a : α} (h : a ∈ t)

0 commit comments

Comments
 (0)