Skip to content

Commit ea26f90

Browse files
committed
chore(Topology/ContinuousOn): re-use variables (#22691)
1 parent c229649 commit ea26f90

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

Mathlib/Topology/ContinuousOn.lean

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ alias nhdsWithin_compl_singleton_sup_pure := nhdsNE_sup_pure
286286
@[simp]
287287
theorem pure_sup_nhdsNE (a : α) : pure a ⊔ 𝓝[≠] a = 𝓝 a := by rw [← sup_comm, nhdsNE_sup_pure]
288288

289-
theorem nhdsWithin_prod {α : Type*} [TopologicalSpace α] {β : Type*} [TopologicalSpace β]
289+
theorem nhdsWithin_prod [TopologicalSpace β]
290290
{s u : Set α} {t v : Set β} {a : α} {b : β} (hu : u ∈ 𝓝[s] a) (hv : v ∈ 𝓝[t] b) :
291291
u ×ˢ v ∈ 𝓝[s ×ˢ t] (a, b) := by
292292
rw [nhdsWithin_prod_eq]
@@ -455,7 +455,7 @@ theorem Filter.EventuallyEq.eq_of_nhdsWithin {s : Set α} {f g : α → β} {a :
455455
(hmem : a ∈ s) : f a = g a :=
456456
h.self_of_nhdsWithin hmem
457457

458-
theorem eventually_nhdsWithin_of_eventually_nhds {α : Type*} [TopologicalSpace α] {s : Set α}
458+
theorem eventually_nhdsWithin_of_eventually_nhds {s : Set α}
459459
{a : α} {p : α → Prop} (h : ∀ᶠ x in 𝓝 a, p x) : ∀ᶠ x in 𝓝[s] a, p x :=
460460
mem_nhdsWithin_of_mem_nhds h
461461

@@ -993,10 +993,8 @@ theorem Continuous.comp_continuousOn {g : β → γ} {f : α → β} {s : Set α
993993
/-- Variant of `Continuous.comp_continuousOn` using the form `fun y ↦ g (f y)`
994994
instead of `g ∘ f`. -/
995995
@[fun_prop]
996-
theorem Continuous.comp_continuousOn'
997-
{α β γ : Type*} [TopologicalSpace α] [TopologicalSpace β] [TopologicalSpace γ] {g : β → γ}
998-
{f : α → β} {s : Set α} (hg : Continuous g) (hf : ContinuousOn f s) :
999-
ContinuousOn (fun x ↦ g (f x)) s :=
996+
theorem Continuous.comp_continuousOn' {g : β → γ} {f : α → β} {s : Set α} (hg : Continuous g)
997+
(hf : ContinuousOn f s) : ContinuousOn (fun x ↦ g (f x)) s :=
1000998
hg.comp_continuousOn hf
1001999

10021000
theorem ContinuousOn.comp_continuous {g : β → γ} {f : α → β} {s : Set β} (hg : ContinuousOn g s)
@@ -1495,9 +1493,7 @@ theorem continuousOn_piecewise_ite [∀ x, Decidable (x ∈ t)]
14951493

14961494
/-- If `f` is continuous on an open set `s` and continuous at each point of another
14971495
set `t` then `f` is continuous on `s ∪ t`. -/
1498-
lemma ContinuousOn.union_continuousAt
1499-
{X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]
1500-
{s t : Set X} {f : X → Y} (s_op : IsOpen s)
1496+
lemma ContinuousOn.union_continuousAt {f : α → β} (s_op : IsOpen s)
15011497
(hs : ContinuousOn f s) (ht : ∀ x ∈ t, ContinuousAt f x) :
15021498
ContinuousOn f (s ∪ t) :=
15031499
continuousOn_of_forall_continuousAt <| fun _ hx => hx.elim
@@ -1506,8 +1502,8 @@ lemma ContinuousOn.union_continuousAt
15061502

15071503
open Classical in
15081504
/-- If a function is continuous on two closed sets, it is also continuous on their union. -/
1509-
theorem ContinuousOn.union_isClosed {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]
1510-
{s t : Set X} (hs : IsClosed s) (ht : IsClosed t) {f : XY} (hfs : ContinuousOn f s)
1505+
theorem ContinuousOn.union_isClosed (hs : IsClosed s)
1506+
(ht : IsClosed t) {f : αβ} (hfs : ContinuousOn f s)
15111507
(hft : ContinuousOn f t) : ContinuousOn f (s ∪ t) := by
15121508
refine fun x hx ↦ .union ?_ ?_
15131509
· refine if hx : x ∈ s then hfs x hx else continuousWithinAt_of_not_mem_closure ?_

0 commit comments

Comments
 (0)