Skip to content

Commit 0a5ab60

Browse files
committed
chore: use Filter.map instead of <$> (#25694)
`<$>` on `Filter` is not polymorphic and [not simp-normal form](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Order/Filter/Map.html#Filter.map_def).
1 parent c34d6ac commit 0a5ab60

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Mathlib/Order/Filter/Map.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ theorem map_eq_comap_of_inverse {f : Filter α} {m : α → β} {n : β → α}
748748
theorem comap_equiv_symm (e : α ≃ β) (f : Filter α) : comap e.symm f = map e f :=
749749
(map_eq_comap_of_inverse e.self_comp_symm e.symm_comp_self).symm
750750

751-
theorem map_swap_eq_comap_swap {f : Filter (α × β)} : Prod.swap <$> f = comap Prod.swap f :=
751+
theorem map_swap_eq_comap_swap {f : Filter (α × β)} : map Prod.swap f = comap Prod.swap f :=
752752
map_eq_comap_of_inverse Prod.swap_swap_eq Prod.swap_swap_eq
753753

754754
/-- A useful lemma when dealing with uniformities. -/

Mathlib/Topology/UniformSpace/Defs.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,10 +474,10 @@ theorem comp_symm_of_uniformity {s : Set (α × α)} (hs : s ∈ 𝓤 α) :
474474
let ⟨t', ht', ht'₁, ht'₂⟩ := symm_of_uniformity ht₁
475475
⟨t', ht', ht'₁ _ _, Subset.trans (monotone_id.compRel monotone_id ht'₂) ht₂⟩
476476

477-
theorem uniformity_le_symm : 𝓤 α ≤ @Prod.swap α α <$> 𝓤 α := by
477+
theorem uniformity_le_symm : 𝓤 α ≤ map Prod.swap (𝓤 α) := by
478478
rw [map_swap_eq_comap_swap]; exact tendsto_swap_uniformity.le_comap
479479

480-
theorem uniformity_eq_symm : 𝓤 α = @Prod.swap α α <$> 𝓤 α :=
480+
theorem uniformity_eq_symm : 𝓤 α = map Prod.swap (𝓤 α) :=
481481
le_antisymm uniformity_le_symm symm_le_uniformity
482482

483483
@[simp]
@@ -630,7 +630,7 @@ theorem mem_nhds_uniformity_iff_right {x : α} {s : Set α} :
630630
theorem mem_nhds_uniformity_iff_left {x : α} {s : Set α} :
631631
s ∈ 𝓝 x ↔ { p : α × α | p.2 = x → p.1 ∈ s } ∈ 𝓤 α := by
632632
rw [uniformity_eq_symm, mem_nhds_uniformity_iff_right]
633-
simp only [map_def, mem_map, preimage_setOf_eq, Prod.snd_swap, Prod.fst_swap]
633+
simp only [mem_map, preimage_setOf_eq, Prod.snd_swap, Prod.fst_swap]
634634

635635
theorem nhdsWithin_eq_comap_uniformity_of_mem {x : α} {T : Set α} (hx : x ∈ T) (S : Set α) :
636636
𝓝[S] x = (𝓤 α ⊓ 𝓟 (T ×ˢ S)).comap (Prod.mk x) := by

0 commit comments

Comments
 (0)