Skip to content

Commit

Permalink
chore: rename LocalHomeomorph to PartialHomeomorph (#8982)
Browse files Browse the repository at this point in the history
`LocalHomeomorph` evokes a "local homeomorphism": this is *not* what this means.
Instead, this is a homeomorphism on an open set of the domain (extended to the whole space, by the junk value pattern). Hence, partial homeomorphism is more appropriate, and avoids confusion with `IsLocallyHomeomorph`.

A future PR will rename `LocalEquiv` to `PartialEquiv`.

[Zulip discussion](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Naming.20around.20local.20homeomorphisms/near/407090631)
  • Loading branch information
grunweg committed Dec 11, 2023
1 parent 556f648 commit bbc6e56
Show file tree
Hide file tree
Showing 49 changed files with 1,019 additions and 1,014 deletions.
2 changes: 1 addition & 1 deletion Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3585,7 +3585,6 @@ import Mathlib.Topology.IsLocalHomeomorph
import Mathlib.Topology.List
import Mathlib.Topology.LocalAtTarget
import Mathlib.Topology.LocalExtr
import Mathlib.Topology.LocalHomeomorph
import Mathlib.Topology.LocallyConstant.Algebra
import Mathlib.Topology.LocallyConstant.Basic
import Mathlib.Topology.LocallyFinite
Expand Down Expand Up @@ -3643,6 +3642,7 @@ import Mathlib.Topology.Order.Priestley
import Mathlib.Topology.Order.ScottTopology
import Mathlib.Topology.Order.UpperLowerSetTopology
import Mathlib.Topology.Partial
import Mathlib.Topology.PartialHomeomorph
import Mathlib.Topology.PartitionOfUnity
import Mathlib.Topology.Perfect
import Mathlib.Topology.ProperMap
Expand Down
28 changes: 14 additions & 14 deletions Mathlib/Analysis/Asymptotics/Asymptotics.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Authors: Jeremy Avigad, Yury Kudryashov
import Mathlib.Analysis.Normed.Group.InfiniteSum
import Mathlib.Analysis.NormedSpace.Basic
import Mathlib.Topology.Algebra.Order.LiminfLimsup
import Mathlib.Topology.LocalHomeomorph
import Mathlib.Topology.PartialHomeomorph

#align_import analysis.asymptotics.asymptotics from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"

Expand Down Expand Up @@ -2233,14 +2233,14 @@ lemma Asymptotics.IsBigO.comp_summable_norm {ι E F : Type*}
summable_of_isBigO hg <| hf.norm_norm.comp_tendsto <|
tendsto_zero_iff_norm_tendsto_zero.2 hg.tendsto_cofinite_zero

namespace LocalHomeomorph
namespace PartialHomeomorph

variable {α : Type*} {β : Type*} [TopologicalSpace α] [TopologicalSpace β]

variable {E : Type*} [Norm E] {F : Type*} [Norm F]

/-- Transfer `IsBigOWith` over a `LocalHomeomorph`. -/
theorem isBigOWith_congr (e : LocalHomeomorph α β) {b : β} (hb : b ∈ e.target) {f : β → E}
/-- Transfer `IsBigOWith` over a `PartialHomeomorph`. -/
theorem isBigOWith_congr (e : PartialHomeomorph α β) {b : β} (hb : b ∈ e.target) {f : β → E}
{g : β → F} {C : ℝ} : IsBigOWith C (𝓝 b) f g ↔ IsBigOWith C (𝓝 (e.symm b)) (f ∘ e) (g ∘ e) :=
fun h =>
h.comp_tendsto <| by
Expand All @@ -2251,25 +2251,25 @@ theorem isBigOWith_congr (e : LocalHomeomorph α β) {b : β} (hb : b ∈ e.targ
((e.eventually_right_inverse hb).mono fun x hx => congr_arg f hx)
((e.eventually_right_inverse hb).mono fun x hx => congr_arg g hx)⟩
set_option linter.uppercaseLean3 false in
#align local_homeomorph.is_O_with_congr LocalHomeomorph.isBigOWith_congr
#align local_homeomorph.is_O_with_congr PartialHomeomorph.isBigOWith_congr

/-- Transfer `IsBigO` over a `LocalHomeomorph`. -/
theorem isBigO_congr (e : LocalHomeomorph α β) {b : β} (hb : b ∈ e.target) {f : β → E} {g : β → F} :
f =O[𝓝 b] g ↔ (f ∘ e) =O[𝓝 (e.symm b)] (g ∘ e) := by
/-- Transfer `IsBigO` over a `PartialHomeomorph`. -/
theorem isBigO_congr (e : PartialHomeomorph α β) {b : β} (hb : b ∈ e.target) {f : β → E}
{g : β → F} : f =O[𝓝 b] g ↔ (f ∘ e) =O[𝓝 (e.symm b)] (g ∘ e) := by
simp only [IsBigO_def]
exact exists_congr fun C => e.isBigOWith_congr hb
set_option linter.uppercaseLean3 false in
#align local_homeomorph.is_O_congr LocalHomeomorph.isBigO_congr
#align local_homeomorph.is_O_congr PartialHomeomorph.isBigO_congr

/-- Transfer `IsLittleO` over a `LocalHomeomorph`. -/
theorem isLittleO_congr (e : LocalHomeomorph α β) {b : β} (hb : b ∈ e.target) {f : β → E}
/-- Transfer `IsLittleO` over a `PartialHomeomorph`. -/
theorem isLittleO_congr (e : PartialHomeomorph α β) {b : β} (hb : b ∈ e.target) {f : β → E}
{g : β → F} : f =o[𝓝 b] g ↔ (f ∘ e) =o[𝓝 (e.symm b)] (g ∘ e) := by
simp only [IsLittleO_def]
exact forall₂_congr fun c _hc => e.isBigOWith_congr hb
set_option linter.uppercaseLean3 false in
#align local_homeomorph.is_o_congr LocalHomeomorph.isLittleO_congr
#align local_homeomorph.is_o_congr PartialHomeomorph.isLittleO_congr

end LocalHomeomorph
end PartialHomeomorph

namespace Homeomorph

Expand All @@ -2282,7 +2282,7 @@ open Asymptotics
/-- Transfer `IsBigOWith` over a `Homeomorph`. -/
theorem isBigOWith_congr (e : α ≃ₜ β) {b : β} {f : β → E} {g : β → F} {C : ℝ} :
IsBigOWith C (𝓝 b) f g ↔ IsBigOWith C (𝓝 (e.symm b)) (f ∘ e) (g ∘ e) :=
e.toLocalHomeomorph.isBigOWith_congr trivial
e.toPartialHomeomorph.isBigOWith_congr trivial
set_option linter.uppercaseLean3 false in
#align homeomorph.is_O_with_congr Homeomorph.isBigOWith_congr

Expand Down
22 changes: 11 additions & 11 deletions Mathlib/Analysis/Calculus/ContDiff/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,7 @@ then `f.symm` is `n` times continuously differentiable at the point `a`.
This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
theorem LocalHomeomorph.contDiffAt_symm [CompleteSpace E] (f : LocalHomeomorph E F)
theorem PartialHomeomorph.contDiffAt_symm [CompleteSpace E] (f : PartialHomeomorph E F)
{f₀' : E ≃L[𝕜] F} {a : F} (ha : a ∈ f.target)
(hf₀' : HasFDerivAt f (f₀' : E →L[𝕜] F) (f.symm a)) (hf : ContDiffAt 𝕜 n f (f.symm a)) :
ContDiffAt 𝕜 n f.symm a := by
Expand Down Expand Up @@ -1855,7 +1855,7 @@ theorem LocalHomeomorph.contDiffAt_symm [CompleteSpace E] (f : LocalHomeomorph E
· refine' contDiffAt_top.mpr _
intro n
exact Itop n (contDiffAt_top.mp hf n)
#align local_homeomorph.cont_diff_at_symm LocalHomeomorph.contDiffAt_symm
#align local_homeomorph.cont_diff_at_symm PartialHomeomorph.contDiffAt_symm

/-- If `f` is an `n` times continuously differentiable homeomorphism,
and if the derivative of `f` at each point is a continuous linear equivalence,
Expand All @@ -1867,7 +1867,7 @@ theorem Homeomorph.contDiff_symm [CompleteSpace E] (f : E ≃ₜ F) {f₀' : E
(hf₀' : ∀ a, HasFDerivAt f (f₀' a : E →L[𝕜] F) a) (hf : ContDiff 𝕜 n (f : E → F)) :
ContDiff 𝕜 n (f.symm : F → E) :=
contDiff_iff_contDiffAt.2 fun x =>
f.toLocalHomeomorph.contDiffAt_symm (mem_univ x) (hf₀' _) hf.contDiffAt
f.toPartialHomeomorph.contDiffAt_symm (mem_univ x) (hf₀' _) hf.contDiffAt
#align homeomorph.cont_diff_symm Homeomorph.contDiff_symm

/-- Let `f` be a local homeomorphism of a nontrivially normed field, let `a` be a point in its
Expand All @@ -1876,11 +1876,11 @@ target. if `f` is `n` times continuously differentiable at `f.symm a`, and if th
This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
theorem LocalHomeomorph.contDiffAt_symm_deriv [CompleteSpace 𝕜] (f : LocalHomeomorph 𝕜 𝕜)
theorem PartialHomeomorph.contDiffAt_symm_deriv [CompleteSpace 𝕜] (f : PartialHomeomorph 𝕜 𝕜)
{f₀' a : 𝕜} (h₀ : f₀' ≠ 0) (ha : a ∈ f.target) (hf₀' : HasDerivAt f f₀' (f.symm a))
(hf : ContDiffAt 𝕜 n f (f.symm a)) : ContDiffAt 𝕜 n f.symm a :=
f.contDiffAt_symm ha (hf₀'.hasFDerivAt_equiv h₀) hf
#align local_homeomorph.cont_diff_at_symm_deriv LocalHomeomorph.contDiffAt_symm_deriv
#align local_homeomorph.cont_diff_at_symm_deriv PartialHomeomorph.contDiffAt_symm_deriv

/-- Let `f` be an `n` times continuously differentiable homeomorphism of a nontrivially normed
field. Suppose that the derivative of `f` is never equal to zero. Then `f.symm` is `n` times
Expand All @@ -1892,10 +1892,10 @@ theorem Homeomorph.contDiff_symm_deriv [CompleteSpace 𝕜] (f : 𝕜 ≃ₜ
(h₀ : ∀ x, f' x ≠ 0) (hf' : ∀ x, HasDerivAt f (f' x) x) (hf : ContDiff 𝕜 n (f : 𝕜 → 𝕜)) :
ContDiff 𝕜 n (f.symm : 𝕜 → 𝕜) :=
contDiff_iff_contDiffAt.2 fun x =>
f.toLocalHomeomorph.contDiffAt_symm_deriv (h₀ _) (mem_univ x) (hf' _) hf.contDiffAt
f.toPartialHomeomorph.contDiffAt_symm_deriv (h₀ _) (mem_univ x) (hf' _) hf.contDiffAt
#align homeomorph.cont_diff_symm_deriv Homeomorph.contDiff_symm_deriv

namespace LocalHomeomorph
namespace PartialHomeomorph

variable (𝕜)

Expand All @@ -1906,21 +1906,21 @@ such that `f` is `C^n` at `x` and `f.symm` is `C^n` at `y`.
Note that `n` is a natural number, not `∞`,
because the set of points of `C^∞`-smoothness of `f` is not guaranteed to be open. -/
@[simps! apply symm_apply source target]
def restrContDiff (f : LocalHomeomorph E F) (n : ℕ) : LocalHomeomorph E F :=
def restrContDiff (f : PartialHomeomorph E F) (n : ℕ) : PartialHomeomorph E F :=
haveI H : f.IsImage {x | ContDiffAt 𝕜 n f x ∧ ContDiffAt 𝕜 n f.symm (f x)}
{y | ContDiffAt 𝕜 n f.symm y ∧ ContDiffAt 𝕜 n f (f.symm y)} := fun x hx ↦ by
simp [hx, and_comm]
H.restr <| isOpen_iff_mem_nhds.2 <| fun x ⟨hxs, hxf, hxf'⟩ ↦
inter_mem (f.open_source.mem_nhds hxs) <| hxf.eventually.and <|
f.continuousAt hxs hxf'.eventually

lemma contDiffOn_restrContDiff_source (f : LocalHomeomorph E F) (n : ℕ) :
lemma contDiffOn_restrContDiff_source (f : PartialHomeomorph E F) (n : ℕ) :
ContDiffOn 𝕜 n f (f.restrContDiff 𝕜 n).source := fun _x hx ↦ hx.2.1.contDiffWithinAt

lemma contDiffOn_restrContDiff_target (f : LocalHomeomorph E F) (n : ℕ) :
lemma contDiffOn_restrContDiff_target (f : PartialHomeomorph E F) (n : ℕ) :
ContDiffOn 𝕜 n f.symm (f.restrContDiff 𝕜 n).target := fun _x hx ↦ hx.2.1.contDiffWithinAt

end LocalHomeomorph
end PartialHomeomorph

end FunctionInverse

Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Analysis/Calculus/Deriv/Inverse.lean
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ at `a` in the strict sense.
This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
theorem LocalHomeomorph.hasStrictDerivAt_symm (f : LocalHomeomorph 𝕜 𝕜) {a f' : 𝕜}
theorem PartialHomeomorph.hasStrictDerivAt_symm (f : PartialHomeomorph 𝕜 𝕜) {a f' : 𝕜}
(ha : a ∈ f.target) (hf' : f' ≠ 0) (htff' : HasStrictDerivAt f f' (f.symm a)) :
HasStrictDerivAt f.symm f'⁻¹ a :=
htff'.of_local_left_inverse (f.symm.continuousAt ha) hf' (f.eventually_right_inverse ha)
#align local_homeomorph.has_strict_deriv_at_symm LocalHomeomorph.hasStrictDerivAt_symm
#align local_homeomorph.has_strict_deriv_at_symm PartialHomeomorph.hasStrictDerivAt_symm

/-- If `f (g y) = y` for `y` in some neighborhood of `a`, `g` is continuous at `a`, and `f` has an
invertible derivative `f'` at `g a`, then `g` has the derivative `f'⁻¹` at `a`.
Expand All @@ -98,10 +98,10 @@ nonzero derivative `f'` at `f.symm a`, then `f.symm` has the derivative `f'⁻¹
This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
theorem LocalHomeomorph.hasDerivAt_symm (f : LocalHomeomorph 𝕜 𝕜) {a f' : 𝕜} (ha : a ∈ f.target)
theorem PartialHomeomorph.hasDerivAt_symm (f : PartialHomeomorph 𝕜 𝕜) {a f' : 𝕜} (ha : a ∈ f.target)
(hf' : f' ≠ 0) (htff' : HasDerivAt f f' (f.symm a)) : HasDerivAt f.symm f'⁻¹ a :=
htff'.of_local_left_inverse (f.symm.continuousAt ha) hf' (f.eventually_right_inverse ha)
#align local_homeomorph.has_deriv_at_symm LocalHomeomorph.hasDerivAt_symm
#align local_homeomorph.has_deriv_at_symm PartialHomeomorph.hasDerivAt_symm

theorem HasDerivAt.eventually_ne (h : HasDerivAt f f' x) (hf' : f' ≠ 0) :
∀ᶠ z in 𝓝[≠] x, f z ≠ f x :=
Expand Down
10 changes: 5 additions & 5 deletions Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -410,22 +410,22 @@ the derivative `f'⁻¹` at `a`.
This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
theorem LocalHomeomorph.hasStrictFDerivAt_symm (f : LocalHomeomorph E F) {f' : E ≃L[𝕜] F} {a : F}
(ha : a ∈ f.target) (htff' : HasStrictFDerivAt f (f' : E →L[𝕜] F) (f.symm a)) :
theorem PartialHomeomorph.hasStrictFDerivAt_symm (f : PartialHomeomorph E F) {f' : E ≃L[𝕜] F}
{a : F} (ha : a ∈ f.target) (htff' : HasStrictFDerivAt f (f' : E →L[𝕜] F) (f.symm a)) :
HasStrictFDerivAt f.symm (f'.symm : F →L[𝕜] E) a :=
htff'.of_local_left_inverse (f.symm.continuousAt ha) (f.eventually_right_inverse ha)
#align local_homeomorph.has_strict_fderiv_at_symm LocalHomeomorph.hasStrictFDerivAt_symm
#align local_homeomorph.has_strict_fderiv_at_symm PartialHomeomorph.hasStrictFDerivAt_symm

/-- If `f` is a local homeomorphism defined on a neighbourhood of `f.symm a`, and `f` has an
invertible derivative `f'` at `f.symm a`, then `f.symm` has the derivative `f'⁻¹` at `a`.
This is one of the easy parts of the inverse function theorem: it assumes that we already have
an inverse function. -/
theorem LocalHomeomorph.hasFDerivAt_symm (f : LocalHomeomorph E F) {f' : E ≃L[𝕜] F} {a : F}
theorem PartialHomeomorph.hasFDerivAt_symm (f : PartialHomeomorph E F) {f' : E ≃L[𝕜] F} {a : F}
(ha : a ∈ f.target) (htff' : HasFDerivAt f (f' : E →L[𝕜] F) (f.symm a)) :
HasFDerivAt f.symm (f'.symm : F →L[𝕜] E) a :=
htff'.of_local_left_inverse (f.symm.continuousAt ha) (f.eventually_right_inverse ha)
#align local_homeomorph.has_fderiv_at_symm LocalHomeomorph.hasFDerivAt_symm
#align local_homeomorph.has_fderiv_at_symm PartialHomeomorph.hasFDerivAt_symm

theorem HasFDerivWithinAt.eventually_ne (h : HasFDerivWithinAt f f' s x)
(hf' : ∃ C, ∀ z, ‖z‖ ≤ C * ‖f' z‖) : ∀ᶠ z in 𝓝[s \ {x}] x, f z ≠ f x := by
Expand Down
Loading

0 comments on commit bbc6e56

Please sign in to comment.