File: Mathlib/Topology/PartialHomeomorph.lean

full_name: PartialHomeomorph
code: /-- Partial homeomorphisms, defined on open subsets of the space -/
-- Porting note(#5171): this linter isn't ported yet. @[nolint has_nonempty_instance]
structure PartialHomeomorph (X : Type*) (Y : Type*) [TopologicalSpace X]
  [TopologicalSpace Y] extends PartialEquiv X Y where
  open_source : IsOpen source
  open_target : IsOpen target
  continuousOn_toFun : ContinuousOn toFun source
  continuousOn_invFun : ContinuousOn invFun target
goal: Type (max u_7 u_8)

full_name: PartialHomeomorph.continuousOn_toFun
code: /-- Partial homeomorphisms, defined on open subsets of the space -/
-- Porting note(#5171): this linter isn't ported yet. @[nolint has_nonempty_instance]
structure PartialHomeomorph (X : Type*) (Y : Type*) [TopologicalSpace X]
  [TopologicalSpace Y] extends PartialEquiv X Y where
  open_source : IsOpen source
  open_target : IsOpen target
  continuousOn_toFun : ContinuousOn toFun source
  continuousOn_invFun : ContinuousOn invFun target
goal: ContinuousOn (↑self.toPartialEquiv) self.source

full_name: PartialHomeomorph.continuousOn_invFun
code: /-- Partial homeomorphisms, defined on open subsets of the space -/
-- Porting note(#5171): this linter isn't ported yet. @[nolint has_nonempty_instance]
structure PartialHomeomorph (X : Type*) (Y : Type*) [TopologicalSpace X]
  [TopologicalSpace Y] extends PartialEquiv X Y where
  open_source : IsOpen source
  open_target : IsOpen target
  continuousOn_toFun : ContinuousOn toFun source
  continuousOn_invFun : ContinuousOn invFun target
goal: ContinuousOn self.invFun self.target

full_name: PartialHomeomorph.open_source
code: /-- Partial homeomorphisms, defined on open subsets of the space -/
-- Porting note(#5171): this linter isn't ported yet. @[nolint has_nonempty_instance]
structure PartialHomeomorph (X : Type*) (Y : Type*) [TopologicalSpace X]
  [TopologicalSpace Y] extends PartialEquiv X Y where
  open_source : IsOpen source
  open_target : IsOpen target
  continuousOn_toFun : ContinuousOn toFun source
  continuousOn_invFun : ContinuousOn invFun target
goal: IsOpen self.source

full_name: PartialHomeomorph.open_target
code: /-- Partial homeomorphisms, defined on open subsets of the space -/
-- Porting note(#5171): this linter isn't ported yet. @[nolint has_nonempty_instance]
structure PartialHomeomorph (X : Type*) (Y : Type*) [TopologicalSpace X]
  [TopologicalSpace Y] extends PartialEquiv X Y where
  open_source : IsOpen source
  open_target : IsOpen target
  continuousOn_toFun : ContinuousOn toFun source
  continuousOn_invFun : ContinuousOn invFun target
goal: IsOpen self.target

full_name: PartialHomeomorph.toFun'
code: /-- Coercion of a partial homeomorphisms to a function. We don't use `e.toFun` because it is
actually `e.toPartialEquiv.toFun`, so `simp` will apply lemmas about `toPartialEquiv`.
While we may want to switch to this behavior later, doing it mid-port will break a lot of proofs. -/
@[coe] def toFun' : X → Y 
goal: X → Y

full_name: PartialHomeomorph.instCoeFunForall
code: /-- Coercion of a `PartialHomeomorph` to function.
Note that a `PartialHomeomorph` is not `DFunLike`. -/
instance : CoeFun (PartialHomeomorph X Y) fun _ => X → Y 
goal: CoeFun (PartialHomeomorph X Y) fun x => X → Y

full_name: PartialHomeomorph.symm
code: /-- The inverse of a partial homeomorphism -/
@[symm]
protected def symm : PartialHomeomorph Y X 
goal: PartialHomeomorph Y X

full_name: PartialHomeomorph.Simps.apply
code: /-- See Note [custom simps projection]. We need to specify this projection explicitly in this case,
  because it is a composition of multiple projections. -/
def Simps.apply (e : PartialHomeomorph X Y) : X → Y 
goal: X → Y

full_name: PartialHomeomorph.Simps.symm_apply
code: /-- See Note [custom simps projection] -/
def Simps.symm_apply (e : PartialHomeomorph X Y) : Y → X 
goal: Y → X

full_name: PartialHomeomorph.continuousOn
code: protected theorem continuousOn : ContinuousOn e e.source 
goal: ContinuousOn (↑e) e.source

full_name: PartialHomeomorph.continuousOn_symm
code: theorem continuousOn_symm : ContinuousOn e.symm e.target 
goal: ContinuousOn (↑e.symm) e.target

full_name: PartialHomeomorph.mk_coe
code: @[simp, mfld_simps]
theorem mk_coe (e : PartialEquiv X Y) (a b c d) : (PartialHomeomorph.mk e a b c d : X → Y) = e 
goal: ↑{ toPartialEquiv := e, open_source := a, open_target := b, continuousOn_toFun := c, continuousOn_invFun := d } = ↑e

full_name: PartialHomeomorph.mk_coe_symm
code: @[simp, mfld_simps]
theorem mk_coe_symm (e : PartialEquiv X Y) (a b c d) :
    ((PartialHomeomorph.mk e a b c d).symm : Y → X) = e.symm 
goal: ↑{ toPartialEquiv := e, open_source := a, open_target := b, continuousOn_toFun := c, continuousOn_invFun := d }.symm =
  ↑e.symm

full_name: PartialHomeomorph.toPartialEquiv_injective
code: theorem toPartialEquiv_injective :
    Injective (toPartialEquiv : PartialHomeomorph X Y → PartialEquiv X Y)
  
goal: Function.Injective PartialHomeomorph.toPartialEquiv

full_name: PartialHomeomorph.toFun_eq_coe
code: @[simp, mfld_simps]
theorem toFun_eq_coe (e : PartialHomeomorph X Y) : e.toFun = e 
goal: ↑e.toPartialEquiv = ↑e

full_name: PartialHomeomorph.invFun_eq_coe
code: @[simp, mfld_simps]
theorem invFun_eq_coe (e : PartialHomeomorph X Y) : e.invFun = e.symm 
goal: e.invFun = ↑e.symm

full_name: PartialHomeomorph.coe_coe
code: @[simp, mfld_simps]
theorem coe_coe : (e.toPartialEquiv : X → Y) = e 
goal: ↑e.toPartialEquiv = ↑e

full_name: PartialHomeomorph.coe_coe_symm
code: @[simp, mfld_simps]
theorem coe_coe_symm : (e.toPartialEquiv.symm : Y → X) = e.symm 
goal: ↑e.symm = ↑e.symm

full_name: PartialHomeomorph.map_source
code: @[simp, mfld_simps]
theorem map_source {x : X} (h : x ∈ e.source) : e x ∈ e.target 
goal: ↑e x ∈ e.target

full_name: PartialHomeomorph.map_source''
code: /-- Variant of `map_source`, stated for images of subsets of `source`. -/
lemma map_source'' : e '' e.source ⊆ e.target 
goal: ↑e '' e.source ⊆ e.target

full_name: PartialHomeomorph.map_target
code: @[simp, mfld_simps]
theorem map_target {x : Y} (h : x ∈ e.target) : e.symm x ∈ e.source 
goal: ↑e.symm x ∈ e.source

full_name: PartialHomeomorph.left_inv
code: @[simp, mfld_simps]
theorem left_inv {x : X} (h : x ∈ e.source) : e.symm (e x) = x 
goal: ↑e.symm (↑e x) = x

full_name: PartialHomeomorph.right_inv
code: @[simp, mfld_simps]
theorem right_inv {x : Y} (h : x ∈ e.target) : e (e.symm x) = x 
goal: ↑e (↑e.symm x) = x

full_name: PartialHomeomorph.eq_symm_apply
code: theorem eq_symm_apply {x : X} {y : Y} (hx : x ∈ e.source) (hy : y ∈ e.target) :
    x = e.symm y ↔ e x = y 
goal: x = ↑e.symm y ↔ ↑e x = y

full_name: PartialHomeomorph.mapsTo
code: protected theorem mapsTo : MapsTo e e.source e.target 
goal: Set.MapsTo (↑e) e.source e.target

full_name: PartialHomeomorph.symm_mapsTo
code: protected theorem symm_mapsTo : MapsTo e.symm e.target e.source 
goal: Set.MapsTo (↑e.symm) e.target e.source

full_name: PartialHomeomorph.leftInvOn
code: protected theorem leftInvOn : LeftInvOn e.symm e e.source 
goal: Set.LeftInvOn (↑e.symm) (↑e) e.source

full_name: PartialHomeomorph.rightInvOn
code: protected theorem rightInvOn : RightInvOn e.symm e e.target 
goal: Set.RightInvOn (↑e.symm) (↑e) e.target

full_name: PartialHomeomorph.invOn
code: protected theorem invOn : InvOn e.symm e e.source e.target 
goal: Set.InvOn (↑e.symm) (↑e) e.source e.target

full_name: PartialHomeomorph.injOn
code: protected theorem injOn : InjOn e e.source 
goal: Set.InjOn (↑e) e.source

full_name: PartialHomeomorph.bijOn
code: protected theorem bijOn : BijOn e e.source e.target 
goal: Set.BijOn (↑e) e.source e.target

full_name: PartialHomeomorph.surjOn
code: protected theorem surjOn : SurjOn e e.source e.target 
goal: Set.SurjOn (↑e) e.source e.target

full_name: Homeomorph.toPartialHomeomorphOfImageEq_source
code: /-- Interpret a `Homeomorph` as a `PartialHomeomorph` by restricting it
to an open set `s` in the domain and to `t` in the codomain. -/
@[simps! (config := .asFn) apply symm_apply toPartialEquiv,
  simps! (config := .lemmasOnly) source target]
def _root_.Homeomorph.toPartialHomeomorphOfImageEq (e : X ≃ₜ Y) (s : Set X) (hs : IsOpen s)
    (t : Set Y) (h : e '' s = t) : PartialHomeomorph X Y 
goal: (e.toPartialHomeomorphOfImageEq s hs t h).source = s

full_name: Homeomorph.toPartialHomeomorphOfImageEq_toPartialEquiv
code: /-- Interpret a `Homeomorph` as a `PartialHomeomorph` by restricting it
to an open set `s` in the domain and to `t` in the codomain. -/
@[simps! (config := .asFn) apply symm_apply toPartialEquiv,
  simps! (config := .lemmasOnly) source target]
def _root_.Homeomorph.toPartialHomeomorphOfImageEq (e : X ≃ₜ Y) (s : Set X) (hs : IsOpen s)
    (t : Set Y) (h : e '' s = t) : PartialHomeomorph X Y 
goal: (e.toPartialHomeomorphOfImageEq s hs t h).toPartialEquiv = e.toPartialEquivOfImageEq s t h

full_name: Homeomorph.toPartialHomeomorphOfImageEq
code: /-- Interpret a `Homeomorph` as a `PartialHomeomorph` by restricting it
to an open set `s` in the domain and to `t` in the codomain. -/
@[simps! (config := .asFn) apply symm_apply toPartialEquiv,
  simps! (config := .lemmasOnly) source target]
def _root_.Homeomorph.toPartialHomeomorphOfImageEq (e : X ≃ₜ Y) (s : Set X) (hs : IsOpen s)
    (t : Set Y) (h : e '' s = t) : PartialHomeomorph X Y 
goal: PartialHomeomorph X Y

full_name: Homeomorph.toPartialHomeomorphOfImageEq_symm_apply
code: /-- Interpret a `Homeomorph` as a `PartialHomeomorph` by restricting it
to an open set `s` in the domain and to `t` in the codomain. -/
@[simps! (config := .asFn) apply symm_apply toPartialEquiv,
  simps! (config := .lemmasOnly) source target]
def _root_.Homeomorph.toPartialHomeomorphOfImageEq (e : X ≃ₜ Y) (s : Set X) (hs : IsOpen s)
    (t : Set Y) (h : e '' s = t) : PartialHomeomorph X Y 
goal: ↑(e.toPartialHomeomorphOfImageEq s hs t h).symm = ⇑e.symm

full_name: Homeomorph.toPartialHomeomorphOfImageEq_apply
code: /-- Interpret a `Homeomorph` as a `PartialHomeomorph` by restricting it
to an open set `s` in the domain and to `t` in the codomain. -/
@[simps! (config := .asFn) apply symm_apply toPartialEquiv,
  simps! (config := .lemmasOnly) source target]
def _root_.Homeomorph.toPartialHomeomorphOfImageEq (e : X ≃ₜ Y) (s : Set X) (hs : IsOpen s)
    (t : Set Y) (h : e '' s = t) : PartialHomeomorph X Y 
goal: ↑(e.toPartialHomeomorphOfImageEq s hs t h) = ⇑e

full_name: Homeomorph.toPartialHomeomorphOfImageEq_target
code: /-- Interpret a `Homeomorph` as a `PartialHomeomorph` by restricting it
to an open set `s` in the domain and to `t` in the codomain. -/
@[simps! (config := .asFn) apply symm_apply toPartialEquiv,
  simps! (config := .lemmasOnly) source target]
def _root_.Homeomorph.toPartialHomeomorphOfImageEq (e : X ≃ₜ Y) (s : Set X) (hs : IsOpen s)
    (t : Set Y) (h : e '' s = t) : PartialHomeomorph X Y 
goal: (e.toPartialHomeomorphOfImageEq s hs t h).target = t

full_name: Homeomorph.toPartialHomeomorph_source
code: /-- A homeomorphism induces a partial homeomorphism on the whole space -/
@[simps! (config := mfld_cfg)]
def _root_.Homeomorph.toPartialHomeomorph (e : X ≃ₜ Y) : PartialHomeomorph X Y 
goal: e.toPartialHomeomorph.source = Set.univ

full_name: Homeomorph.toPartialHomeomorph_apply
code: /-- A homeomorphism induces a partial homeomorphism on the whole space -/
@[simps! (config := mfld_cfg)]
def _root_.Homeomorph.toPartialHomeomorph (e : X ≃ₜ Y) : PartialHomeomorph X Y 
goal: ↑e.toPartialHomeomorph = ⇑e

full_name: Homeomorph.toPartialHomeomorph_target
code: /-- A homeomorphism induces a partial homeomorphism on the whole space -/
@[simps! (config := mfld_cfg)]
def _root_.Homeomorph.toPartialHomeomorph (e : X ≃ₜ Y) : PartialHomeomorph X Y 
goal: e.toPartialHomeomorph.target = Set.univ

full_name: Homeomorph.toPartialHomeomorph_symm_apply
code: /-- A homeomorphism induces a partial homeomorphism on the whole space -/
@[simps! (config := mfld_cfg)]
def _root_.Homeomorph.toPartialHomeomorph (e : X ≃ₜ Y) : PartialHomeomorph X Y 
goal: ↑e.toPartialHomeomorph.symm = ⇑e.symm

full_name: Homeomorph.toPartialHomeomorph
code: /-- A homeomorphism induces a partial homeomorphism on the whole space -/
@[simps! (config := mfld_cfg)]
def _root_.Homeomorph.toPartialHomeomorph (e : X ≃ₜ Y) : PartialHomeomorph X Y 
goal: PartialHomeomorph X Y

full_name: PartialHomeomorph.replaceEquiv
code: /-- Replace `toPartialEquiv` field to provide better definitional equalities. -/
def replaceEquiv (e : PartialHomeomorph X Y) (e' : PartialEquiv X Y) (h : e.toPartialEquiv = e') :
    PartialHomeomorph X Y 
goal: PartialHomeomorph X Y

full_name: PartialHomeomorph.replaceEquiv_eq_self
code: theorem replaceEquiv_eq_self (e' : PartialEquiv X Y)
    (h : e.toPartialEquiv = e') : e.replaceEquiv e' h = e 
goal: e.replaceEquiv e' h = e

full_name: PartialHomeomorph.source_preimage_target
code: theorem source_preimage_target : e.source ⊆ e ⁻¹' e.target 
goal: e.source ⊆ ↑e ⁻¹' e.target

full_name: PartialHomeomorph.eq_of_partialEquiv_eq
code: @[deprecated toPartialEquiv_injective (since := "2023-02-18")]
theorem eq_of_partialEquiv_eq {e e' : PartialHomeomorph X Y}
    (h : e.toPartialEquiv = e'.toPartialEquiv) : e = e' 
goal: e = e'

full_name: PartialHomeomorph.eventually_left_inverse
code: theorem eventually_left_inverse {x} (hx : x ∈ e.source) :
    ∀ᶠ y in 𝓝 x, e.symm (e y) = y 
goal: ∀ᶠ (y : X) in 𝓝 x, ↑e.symm (↑e y) = y

full_name: PartialHomeomorph.eventually_left_inverse'
code: theorem eventually_left_inverse' {x} (hx : x ∈ e.target) :
    ∀ᶠ y in 𝓝 (e.symm x), e.symm (e y) = y 
goal: ∀ᶠ (y : X) in 𝓝 (↑e.symm x), ↑e.symm (↑e y) = y

full_name: PartialHomeomorph.eventually_right_inverse
code: theorem eventually_right_inverse {x} (hx : x ∈ e.target) :
    ∀ᶠ y in 𝓝 x, e (e.symm y) = y 
goal: ∀ᶠ (y : Y) in 𝓝 x, ↑e (↑e.symm y) = y

full_name: PartialHomeomorph.eventually_right_inverse'
code: theorem eventually_right_inverse' {x} (hx : x ∈ e.source) :
    ∀ᶠ y in 𝓝 (e x), e (e.symm y) = y 
goal: ∀ᶠ (y : Y) in 𝓝 (↑e x), ↑e (↑e.symm y) = y

full_name: PartialHomeomorph.eventually_ne_nhdsWithin
code: theorem eventually_ne_nhdsWithin {x} (hx : x ∈ e.source) :
    ∀ᶠ x' in 𝓝[≠] x, e x' ≠ e x 
goal: ∀ᶠ (x' : X) in 𝓝[≠] x, ↑e x' ≠ ↑e x

full_name: PartialHomeomorph.nhdsWithin_source_inter
code: theorem nhdsWithin_source_inter {x} (hx : x ∈ e.source) (s : Set X) : 𝓝[e.source ∩ s] x = 𝓝[s] x 
goal: 𝓝[e.source ∩ s] x = 𝓝[s] x

full_name: PartialHomeomorph.nhdsWithin_target_inter
code: theorem nhdsWithin_target_inter {x} (hx : x ∈ e.target) (s : Set Y) : 𝓝[e.target ∩ s] x = 𝓝[s] x 
goal: 𝓝[e.target ∩ s] x = 𝓝[s] x

full_name: PartialHomeomorph.image_eq_target_inter_inv_preimage
code: theorem image_eq_target_inter_inv_preimage {s : Set X} (h : s ⊆ e.source) :
    e '' s = e.target ∩ e.symm ⁻¹' s 
goal: ↑e '' s = e.target ∩ ↑e.symm ⁻¹' s

full_name: PartialHomeomorph.image_source_inter_eq'
code: theorem image_source_inter_eq' (s : Set X) : e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' s 
goal: ↑e '' (e.source ∩ s) = e.target ∩ ↑e.symm ⁻¹' s

full_name: PartialHomeomorph.image_source_inter_eq
code: theorem image_source_inter_eq (s : Set X) :
    e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' (e.source ∩ s) 
goal: ↑e '' (e.source ∩ s) = e.target ∩ ↑e.symm ⁻¹' (e.source ∩ s)

full_name: PartialHomeomorph.symm_image_eq_source_inter_preimage
code: theorem symm_image_eq_source_inter_preimage {s : Set Y} (h : s ⊆ e.target) :
    e.symm '' s = e.source ∩ e ⁻¹' s 
goal: ↑e.symm '' s = e.source ∩ ↑e ⁻¹' s

full_name: PartialHomeomorph.symm_image_target_inter_eq
code: theorem symm_image_target_inter_eq (s : Set Y) :
    e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' (e.target ∩ s) 
goal: ↑e.symm '' (e.target ∩ s) = e.source ∩ ↑e ⁻¹' (e.target ∩ s)

full_name: PartialHomeomorph.source_inter_preimage_inv_preimage
code: theorem source_inter_preimage_inv_preimage (s : Set X) :
    e.source ∩ e ⁻¹' (e.symm ⁻¹' s) = e.source ∩ s 
goal: e.source ∩ ↑e ⁻¹' (↑e.symm ⁻¹' s) = e.source ∩ s

full_name: PartialHomeomorph.target_inter_inv_preimage_preimage
code: theorem target_inter_inv_preimage_preimage (s : Set Y) :
    e.target ∩ e.symm ⁻¹' (e ⁻¹' s) = e.target ∩ s 
goal: e.target ∩ ↑e.symm ⁻¹' (↑e ⁻¹' s) = e.target ∩ s

full_name: PartialHomeomorph.source_inter_preimage_target_inter
code: theorem source_inter_preimage_target_inter (s : Set Y) :
    e.source ∩ e ⁻¹' (e.target ∩ s) = e.source ∩ e ⁻¹' s 
goal: e.source ∩ ↑e ⁻¹' (e.target ∩ s) = e.source ∩ ↑e ⁻¹' s

full_name: PartialHomeomorph.image_source_eq_target
code: theorem image_source_eq_target : e '' e.source = e.target 
goal: ↑e '' e.source = e.target

full_name: PartialHomeomorph.symm_image_target_eq_source
code: theorem symm_image_target_eq_source : e.symm '' e.target = e.source 
goal: ↑e.symm '' e.target = e.source

full_name: PartialHomeomorph.ext
code: /-- Two partial homeomorphisms are equal when they have equal `toFun`, `invFun` and `source`.
It is not sufficient to have equal `toFun` and `source`, as this only determines `invFun` on
the target. This would only be true for a weaker notion of equality, arguably the right one,
called `EqOnSource`. -/
@[ext]
protected theorem ext (e' : PartialHomeomorph X Y) (h : ∀ x, e x = e' x)
    (hinv : ∀ x, e.symm x = e'.symm x) (hs : e.source = e'.source) : e = e' 
goal: e = e'

full_name: PartialHomeomorph.ext_iff
code: protected theorem ext_iff {e e' : PartialHomeomorph X Y} :
    e = e' ↔ (∀ x, e x = e' x) ∧ (∀ x, e.symm x = e'.symm x) ∧ e.source = e'.source 
goal: e = e' ↔ (∀ (x : X), ↑e x = ↑e' x) ∧ (∀ (x : Y), ↑e.symm x = ↑e'.symm x) ∧ e.source = e'.source

full_name: PartialHomeomorph.symm_toPartialEquiv
code: @[simp, mfld_simps]
theorem symm_toPartialEquiv : e.symm.toPartialEquiv = e.toPartialEquiv.symm 
goal: e.symm.toPartialEquiv = e.symm

full_name: PartialHomeomorph.symm_source
code: theorem symm_source : e.symm.source = e.target 
goal: e.symm.source = e.target

full_name: PartialHomeomorph.symm_target
code: theorem symm_target : e.symm.target = e.source 
goal: e.symm.target = e.source

full_name: PartialHomeomorph.symm_symm
code: @[simp, mfld_simps] theorem symm_symm : e.symm.symm = e 
goal: e.symm.symm = e

full_name: PartialHomeomorph.symm_bijective
code: theorem symm_bijective : Function.Bijective
    (PartialHomeomorph.symm : PartialHomeomorph X Y → PartialHomeomorph Y X) 
goal: Function.Bijective PartialHomeomorph.symm

full_name: PartialHomeomorph.continuousAt
code: /-- A partial homeomorphism is continuous at any point of its source -/
protected theorem continuousAt {x : X} (h : x ∈ e.source) : ContinuousAt e x 
goal: ContinuousAt (↑e) x

full_name: PartialHomeomorph.continuousAt_symm
code: /-- A partial homeomorphism inverse is continuous at any point of its target -/
theorem continuousAt_symm {x : Y} (h : x ∈ e.target) : ContinuousAt e.symm x 
goal: ContinuousAt (↑e.symm) x

full_name: PartialHomeomorph.tendsto_symm
code: theorem tendsto_symm {x} (hx : x ∈ e.source) : Tendsto e.symm (𝓝 (e x)) (𝓝 x) 
goal: Filter.Tendsto (↑e.symm) (𝓝 (↑e x)) (𝓝 x)

full_name: PartialHomeomorph.map_nhds_eq
code: theorem map_nhds_eq {x} (hx : x ∈ e.source) : map e (𝓝 x) = 𝓝 (e x) 
goal: Filter.map (↑e) (𝓝 x) = 𝓝 (↑e x)

full_name: PartialHomeomorph.symm_map_nhds_eq
code: theorem symm_map_nhds_eq {x} (hx : x ∈ e.source) : map e.symm (𝓝 (e x)) = 𝓝 x 
goal: Filter.map (↑e.symm) (𝓝 (↑e x)) = 𝓝 x

full_name: PartialHomeomorph.image_mem_nhds
code: theorem image_mem_nhds {x} (hx : x ∈ e.source) {s : Set X} (hs : s ∈ 𝓝 x) : e '' s ∈ 𝓝 (e x) 
goal: ↑e '' s ∈ 𝓝 (↑e x)

full_name: PartialHomeomorph.map_nhdsWithin_eq
code: theorem map_nhdsWithin_eq {x} (hx : x ∈ e.source) (s : Set X) :
    map e (𝓝[s] x) = 𝓝[e '' (e.source ∩ s)] e x 
goal: Filter.map (↑e) (𝓝[s] x) = 𝓝[↑e '' (e.source ∩ s)] ↑e x

full_name: PartialHomeomorph.map_nhdsWithin_preimage_eq
code: theorem map_nhdsWithin_preimage_eq {x} (hx : x ∈ e.source) (s : Set Y) :
    map e (𝓝[e ⁻¹' s] x) = 𝓝[s] e x 
goal: Filter.map (↑e) (𝓝[↑e ⁻¹' s] x) = 𝓝[s] ↑e x

full_name: PartialHomeomorph.eventually_nhds
code: theorem eventually_nhds {x : X} (p : Y → Prop) (hx : x ∈ e.source) :
    (∀ᶠ y in 𝓝 (e x), p y) ↔ ∀ᶠ x in 𝓝 x, p (e x) 
goal: (∀ᶠ (y : Y) in 𝓝 (↑e x), p y) ↔ ∀ᶠ (x : X) in 𝓝 x, p (↑e x)

full_name: PartialHomeomorph.eventually_nhds'
code: theorem eventually_nhds' {x : X} (p : X → Prop) (hx : x ∈ e.source) :
    (∀ᶠ y in 𝓝 (e x), p (e.symm y)) ↔ ∀ᶠ x in 𝓝 x, p x 
goal: (∀ᶠ (y : Y) in 𝓝 (↑e x), p (↑e.symm y)) ↔ ∀ᶠ (x : X) in 𝓝 x, p x

full_name: PartialHomeomorph.eventually_nhdsWithin
code: theorem eventually_nhdsWithin {x : X} (p : Y → Prop) {s : Set X}
    (hx : x ∈ e.source) : (∀ᶠ y in 𝓝[e.symm ⁻¹' s] e x, p y) ↔ ∀ᶠ x in 𝓝[s] x, p (e x) 
goal: (∀ᶠ (y : Y) in 𝓝[↑e.symm ⁻¹' s] ↑e x, p y) ↔ ∀ᶠ (x : X) in 𝓝[s] x, p (↑e x)

full_name: PartialHomeomorph.eventually_nhdsWithin'
code: theorem eventually_nhdsWithin' {x : X} (p : X → Prop) {s : Set X}
    (hx : x ∈ e.source) : (∀ᶠ y in 𝓝[e.symm ⁻¹' s] e x, p (e.symm y)) ↔ ∀ᶠ x in 𝓝[s] x, p x 
goal: (∀ᶠ (y : Y) in 𝓝[↑e.symm ⁻¹' s] ↑e x, p (↑e.symm y)) ↔ ∀ᶠ (x : X) in 𝓝[s] x, p x

full_name: PartialHomeomorph.preimage_eventuallyEq_target_inter_preimage_inter
code: /-- This lemma is useful in the manifold library in the case that `e` is a chart. It states that
  locally around `e x` the set `e.symm ⁻¹' s` is the same as the set intersected with the target
  of `e` and some other neighborhood of `f x` (which will be the source of a chart on `Z`).  -/
theorem preimage_eventuallyEq_target_inter_preimage_inter {e : PartialHomeomorph X Y} {s : Set X}
    {t : Set Z} {x : X} {f : X → Z} (hf : ContinuousWithinAt f s x) (hxe : x ∈ e.source)
    (ht : t ∈ 𝓝 (f x)) :
    e.symm ⁻¹' s =ᶠ[𝓝 (e x)] (e.target ∩ e.symm ⁻¹' (s ∩ f ⁻¹' t) : Set Y) 
goal: ↑e.symm ⁻¹' s =ᶠ[𝓝 (↑e x)] e.target ∩ ↑e.symm ⁻¹' (s ∩ f ⁻¹' t)

full_name: PartialHomeomorph.isOpen_inter_preimage
code: theorem isOpen_inter_preimage {s : Set Y} (hs : IsOpen s) : IsOpen (e.source ∩ e ⁻¹' s) 
goal: IsOpen (e.source ∩ ↑e ⁻¹' s)

full_name: PartialHomeomorph.isOpen_inter_preimage_symm
code: theorem isOpen_inter_preimage_symm {s : Set X} (hs : IsOpen s) : IsOpen (e.target ∩ e.symm ⁻¹' s) 
goal: IsOpen (e.target ∩ ↑e.symm ⁻¹' s)

full_name: PartialHomeomorph.isOpen_image_of_subset_source
code: /-- A partial homeomorphism is an open map on its source:
  the image of an open subset of the source is open. -/
lemma isOpen_image_of_subset_source {s : Set X} (hs : IsOpen s) (hse : s ⊆ e.source) :
    IsOpen (e '' s) 
goal: IsOpen (↑e '' s)

full_name: PartialHomeomorph.isOpen_image_source_inter
code: /-- The image of the restriction of an open set to the source is open. -/
theorem isOpen_image_source_inter {s : Set X} (hs : IsOpen s) :
    IsOpen (e '' (e.source ∩ s)) 
goal: IsOpen (↑e '' (e.source ∩ s))

full_name: PartialHomeomorph.isOpen_image_symm_of_subset_target
code: /-- The inverse of a partial homeomorphism `e` is an open map on `e.target`. -/
lemma isOpen_image_symm_of_subset_target {t : Set Y} (ht : IsOpen t) (hte : t ⊆ e.target) :
    IsOpen (e.symm '' t) 
goal: IsOpen (↑e.symm '' t)

full_name: PartialHomeomorph.isOpen_symm_image_iff_of_subset_target
code: lemma isOpen_symm_image_iff_of_subset_target {t : Set Y} (hs : t ⊆ e.target) :
    IsOpen (e.symm '' t) ↔ IsOpen t 
goal: IsOpen (↑e.symm '' t) ↔ IsOpen t

full_name: PartialHomeomorph.isOpen_image_iff_of_subset_source
code: theorem isOpen_image_iff_of_subset_source {s : Set X} (hs : s ⊆ e.source) :
    IsOpen (e '' s) ↔ IsOpen s 
goal: IsOpen (↑e '' s) ↔ IsOpen s

full_name: PartialHomeomorph.IsImage
code: /-- We say that `t : Set Y` is an image of `s : Set X` under a partial homeomorphism `e`
if any of the following equivalent conditions hold:

* `e '' (e.source ∩ s) = e.target ∩ t`;
* `e.source ∩ e ⁻¹ t = e.source ∩ s`;
* `∀ x ∈ e.source, e x ∈ t ↔ x ∈ s` (this one is used in the definition).
-/
def IsImage (s : Set X) (t : Set Y) : Prop 
goal: Prop

full_name: PartialHomeomorph.IsImage.toPartialEquiv
code: theorem toPartialEquiv (h : e.IsImage s t) : e.toPartialEquiv.IsImage s t 
goal: e.IsImage s t

full_name: PartialHomeomorph.IsImage.apply_mem_iff
code: theorem apply_mem_iff (h : e.IsImage s t) (hx : x ∈ e.source) : e x ∈ t ↔ x ∈ s 
goal: ↑e x ∈ t ↔ x ∈ s

full_name: PartialHomeomorph.IsImage.symm
code: protected theorem symm (h : e.IsImage s t) : e.symm.IsImage t s 
goal: e.symm.IsImage t s

full_name: PartialHomeomorph.IsImage.symm_apply_mem_iff
code: theorem symm_apply_mem_iff (h : e.IsImage s t) (hy : y ∈ e.target) : e.symm y ∈ s ↔ y ∈ t 
goal: ↑e.symm y ∈ s ↔ y ∈ t

full_name: PartialHomeomorph.IsImage.symm_iff
code: @[simp]
theorem symm_iff : e.symm.IsImage t s ↔ e.IsImage s t 
goal: e.symm.IsImage t s ↔ e.IsImage s t

full_name: PartialHomeomorph.IsImage.mapsTo
code: protected theorem mapsTo (h : e.IsImage s t) : MapsTo e (e.source ∩ s) (e.target ∩ t) 
goal: Set.MapsTo (↑e) (e.source ∩ s) (e.target ∩ t)

full_name: PartialHomeomorph.IsImage.symm_mapsTo
code: theorem symm_mapsTo (h : e.IsImage s t) : MapsTo e.symm (e.target ∩ t) (e.source ∩ s) 
goal: Set.MapsTo (↑e.symm) (e.target ∩ t) (e.source ∩ s)

full_name: PartialHomeomorph.IsImage.image_eq
code: theorem image_eq (h : e.IsImage s t) : e '' (e.source ∩ s) = e.target ∩ t 
goal: ↑e '' (e.source ∩ s) = e.target ∩ t

full_name: PartialHomeomorph.IsImage.symm_image_eq
code: theorem symm_image_eq (h : e.IsImage s t) : e.symm '' (e.target ∩ t) = e.source ∩ s 
goal: ↑e.symm '' (e.target ∩ t) = e.source ∩ s

full_name: PartialHomeomorph.IsImage.iff_preimage_eq
code: theorem iff_preimage_eq : e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source ∩ s 
goal: e.IsImage s t ↔ e.source ∩ ↑e ⁻¹' t = e.source ∩ s

full_name: PartialHomeomorph.IsImage.iff_symm_preimage_eq
code: theorem iff_symm_preimage_eq : e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' s = e.target ∩ t 
goal: e.IsImage s t ↔ e.target ∩ ↑e.symm ⁻¹' s = e.target ∩ t

full_name: PartialHomeomorph.IsImage.iff_symm_preimage_eq'
code: theorem iff_symm_preimage_eq' :
    e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' (e.source ∩ s) = e.target ∩ t 
goal: e.IsImage s t ↔ e.target ∩ ↑e.symm ⁻¹' (e.source ∩ s) = e.target ∩ t

full_name: PartialHomeomorph.IsImage.iff_preimage_eq'
code: theorem iff_preimage_eq' : e.IsImage s t ↔ e.source ∩ e ⁻¹' (e.target ∩ t) = e.source ∩ s 
goal: e.IsImage s t ↔ e.source ∩ ↑e ⁻¹' (e.target ∩ t) = e.source ∩ s

full_name: PartialHomeomorph.IsImage.of_image_eq
code: theorem of_image_eq (h : e '' (e.source ∩ s) = e.target ∩ t) : e.IsImage s t 
goal: e.IsImage s t

full_name: PartialHomeomorph.IsImage.of_symm_image_eq
code: theorem of_symm_image_eq (h : e.symm '' (e.target ∩ t) = e.source ∩ s) : e.IsImage s t 
goal: e.IsImage s t

full_name: PartialHomeomorph.IsImage.compl
code: protected theorem compl (h : e.IsImage s t) : e.IsImage sᶜ tᶜ 
goal: e.IsImage sᶜ tᶜ

full_name: PartialHomeomorph.IsImage.inter
code: protected theorem inter {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
    e.IsImage (s ∩ s') (t ∩ t') 
goal: e.IsImage (s ∩ s') (t ∩ t')

full_name: PartialHomeomorph.IsImage.union
code: protected theorem union {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
    e.IsImage (s ∪ s') (t ∪ t') 
goal: e.IsImage (s ∪ s') (t ∪ t')

full_name: PartialHomeomorph.IsImage.diff
code: protected theorem diff {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
    e.IsImage (s \ s') (t \ t') 
goal: e.IsImage (s \ s') (t \ t')

full_name: PartialHomeomorph.IsImage.leftInvOn_piecewise
code: theorem leftInvOn_piecewise {e' : PartialHomeomorph X Y} [∀ i, Decidable (i ∈ s)]
    [∀ i, Decidable (i ∈ t)] (h : e.IsImage s t) (h' : e'.IsImage s t) :
    LeftInvOn (t.piecewise e.symm e'.symm) (s.piecewise e e') (s.ite e.source e'.source) 
goal: Set.LeftInvOn (t.piecewise ↑e.symm ↑e'.symm) (s.piecewise ↑e ↑e') (s.ite e.source e'.source)

full_name: PartialHomeomorph.IsImage.inter_eq_of_inter_eq_of_eqOn
code: theorem inter_eq_of_inter_eq_of_eqOn {e' : PartialHomeomorph X Y} (h : e.IsImage s t)
    (h' : e'.IsImage s t) (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
    e.target ∩ t = e'.target ∩ t 
goal: e.target ∩ t = e'.target ∩ t

full_name: PartialHomeomorph.IsImage.symm_eqOn_of_inter_eq_of_eqOn
code: theorem symm_eqOn_of_inter_eq_of_eqOn {e' : PartialHomeomorph X Y} (h : e.IsImage s t)
    (hs : e.source ∩ s = e'.source ∩ s) (Heq : EqOn e e' (e.source ∩ s)) :
    EqOn e.symm e'.symm (e.target ∩ t) 
goal: Set.EqOn (↑e.symm) (↑e'.symm) (e.target ∩ t)

full_name: PartialHomeomorph.IsImage.map_nhdsWithin_eq
code: theorem map_nhdsWithin_eq (h : e.IsImage s t) (hx : x ∈ e.source) : map e (𝓝[s] x) = 𝓝[t] e x 
goal: Filter.map (↑e) (𝓝[s] x) = 𝓝[t] ↑e x

full_name: PartialHomeomorph.IsImage.closure
code: protected theorem closure (h : e.IsImage s t) : e.IsImage (closure s) (closure t) 
goal: e.IsImage (closure s) (closure t)

full_name: PartialHomeomorph.IsImage.interior
code: protected theorem interior (h : e.IsImage s t) : e.IsImage (interior s) (interior t) 
goal: e.IsImage (interior s) (interior t)

full_name: PartialHomeomorph.IsImage.frontier
code: protected theorem frontier (h : e.IsImage s t) : e.IsImage (frontier s) (frontier t) 
goal: e.IsImage (frontier s) (frontier t)

full_name: PartialHomeomorph.IsImage.isOpen_iff
code: theorem isOpen_iff (h : e.IsImage s t) : IsOpen (e.source ∩ s) ↔ IsOpen (e.target ∩ t) 
goal: IsOpen (e.source ∩ s) ↔ IsOpen (e.target ∩ t)

full_name: PartialHomeomorph.IsImage.restr_toPartialEquiv
code: /-- Restrict a `PartialHomeomorph` to a pair of corresponding open sets. -/
@[simps toPartialEquiv]
def restr (h : e.IsImage s t) (hs : IsOpen (e.source ∩ s)) : PartialHomeomorph X Y 
goal: (h.restr hs).toPartialEquiv = ⋯.restr

full_name: PartialHomeomorph.IsImage.restr
code: /-- Restrict a `PartialHomeomorph` to a pair of corresponding open sets. -/
@[simps toPartialEquiv]
def restr (h : e.IsImage s t) (hs : IsOpen (e.source ∩ s)) : PartialHomeomorph X Y 
goal: PartialHomeomorph X Y

full_name: PartialHomeomorph.isImage_source_target
code: theorem isImage_source_target : e.IsImage e.source e.target 
goal: e.IsImage e.source e.target

full_name: PartialHomeomorph.isImage_source_target_of_disjoint
code: theorem isImage_source_target_of_disjoint (e' : PartialHomeomorph X Y)
    (hs : Disjoint e.source e'.source) (ht : Disjoint e.target e'.target) :
    e.IsImage e'.source e'.target 
goal: e.IsImage e'.source e'.target

full_name: PartialHomeomorph.preimage_interior
code: /-- Preimage of interior or interior of preimage coincide for partial homeomorphisms,
when restricted to the source. -/
theorem preimage_interior (s : Set Y) :
    e.source ∩ e ⁻¹' interior s = e.source ∩ interior (e ⁻¹' s) 
goal: e.source ∩ ↑e ⁻¹' interior s = e.source ∩ interior (↑e ⁻¹' s)

full_name: PartialHomeomorph.preimage_closure
code: theorem preimage_closure (s : Set Y) : e.source ∩ e ⁻¹' closure s = e.source ∩ closure (e ⁻¹' s) 
goal: e.source ∩ ↑e ⁻¹' closure s = e.source ∩ closure (↑e ⁻¹' s)

full_name: PartialHomeomorph.preimage_frontier
code: theorem preimage_frontier (s : Set Y) :
    e.source ∩ e ⁻¹' frontier s = e.source ∩ frontier (e ⁻¹' s) 
goal: e.source ∩ ↑e ⁻¹' frontier s = e.source ∩ frontier (↑e ⁻¹' s)

full_name: PartialHomeomorph.ofContinuousOpenRestrict
code: /-- A `PartialEquiv` with continuous open forward map and open source is a `PartialHomeomorph`. -/
def ofContinuousOpenRestrict (e : PartialEquiv X Y) (hc : ContinuousOn e e.source)
    (ho : IsOpenMap (e.source.restrict e)) (hs : IsOpen e.source) : PartialHomeomorph X Y 
goal: PartialHomeomorph X Y

full_name: PartialHomeomorph.ofContinuousOpen
code: /-- A `PartialEquiv` with continuous open forward map and open source is a `PartialHomeomorph`. -/
def ofContinuousOpen (e : PartialEquiv X Y) (hc : ContinuousOn e e.source) (ho : IsOpenMap e)
    (hs : IsOpen e.source) : PartialHomeomorph X Y 
goal: PartialHomeomorph X Y

full_name: PartialHomeomorph.restrOpen
code: /-- Restricting a partial homeomorphism `e` to `e.source ∩ s` when `s` is open.
This is sometimes hard to use because of the openness assumption, but it has the advantage that
when it can be used then its `PartialEquiv` is defeq to `PartialEquiv.restr`. -/
protected def restrOpen (s : Set X) (hs : IsOpen s) : PartialHomeomorph X Y 
goal: PartialHomeomorph X Y

full_name: PartialHomeomorph.restrOpen_toPartialEquiv
code: @[simp, mfld_simps]
theorem restrOpen_toPartialEquiv (s : Set X) (hs : IsOpen s) :
    (e.restrOpen s hs).toPartialEquiv = e.toPartialEquiv.restr s 
goal: (e.restrOpen s hs).toPartialEquiv = e.restr s

full_name: PartialHomeomorph.restrOpen_source
code: theorem restrOpen_source (s : Set X) (hs : IsOpen s) : (e.restrOpen s hs).source = e.source ∩ s 
goal: (e.restrOpen s hs).source = e.source ∩ s

full_name: PartialHomeomorph.restr
code: /-- Restricting a partial homeomorphism `e` to `e.source ∩ interior s`. We use the interior to make
sure that the restriction is well defined whatever the set s, since partial homeomorphisms are by
definition defined on open sets. In applications where `s` is open, this coincides with the
restriction of partial equivalences -/
@[simps! (config := mfld_cfg) apply symm_apply, simps! (config := .lemmasOnly) source target]
protected def restr (s : Set X) : PartialHomeomorph X Y 
goal: PartialHomeomorph X Y

full_name: PartialHomeomorph.restr_source
code: /-- Restricting a partial homeomorphism `e` to `e.source ∩ interior s`. We use the interior to make
sure that the restriction is well defined whatever the set s, since partial homeomorphisms are by
definition defined on open sets. In applications where `s` is open, this coincides with the
restriction of partial equivalences -/
@[simps! (config := mfld_cfg) apply symm_apply, simps! (config := .lemmasOnly) source target]
protected def restr (s : Set X) : PartialHomeomorph X Y 
goal: (e.restr s).source = e.source ∩ interior s

full_name: PartialHomeomorph.restr_symm_apply
code: /-- Restricting a partial homeomorphism `e` to `e.source ∩ interior s`. We use the interior to make
sure that the restriction is well defined whatever the set s, since partial homeomorphisms are by
definition defined on open sets. In applications where `s` is open, this coincides with the
restriction of partial equivalences -/
@[simps! (config := mfld_cfg) apply symm_apply, simps! (config := .lemmasOnly) source target]
protected def restr (s : Set X) : PartialHomeomorph X Y 
goal: ↑(e.restr s).symm = ↑e.symm

full_name: PartialHomeomorph.restr_apply
code: /-- Restricting a partial homeomorphism `e` to `e.source ∩ interior s`. We use the interior to make
sure that the restriction is well defined whatever the set s, since partial homeomorphisms are by
definition defined on open sets. In applications where `s` is open, this coincides with the
restriction of partial equivalences -/
@[simps! (config := mfld_cfg) apply symm_apply, simps! (config := .lemmasOnly) source target]
protected def restr (s : Set X) : PartialHomeomorph X Y 
goal: ↑(e.restr s) = ↑e

full_name: PartialHomeomorph.restr_target
code: /-- Restricting a partial homeomorphism `e` to `e.source ∩ interior s`. We use the interior to make
sure that the restriction is well defined whatever the set s, since partial homeomorphisms are by
definition defined on open sets. In applications where `s` is open, this coincides with the
restriction of partial equivalences -/
@[simps! (config := mfld_cfg) apply symm_apply, simps! (config := .lemmasOnly) source target]
protected def restr (s : Set X) : PartialHomeomorph X Y 
goal: (e.restr s).target = e.target ∩ ↑e.symm ⁻¹' interior s

full_name: PartialHomeomorph.restr_toPartialEquiv
code: @[simp, mfld_simps]
theorem restr_toPartialEquiv (s : Set X) :
    (e.restr s).toPartialEquiv = e.toPartialEquiv.restr (interior s) 
goal: (e.restr s).toPartialEquiv = e.restr (interior s)

full_name: PartialHomeomorph.restr_source'
code: theorem restr_source' (s : Set X) (hs : IsOpen s) : (e.restr s).source = e.source ∩ s 
goal: (e.restr s).source = e.source ∩ s

full_name: PartialHomeomorph.restr_toPartialEquiv'
code: theorem restr_toPartialEquiv' (s : Set X) (hs : IsOpen s) :
    (e.restr s).toPartialEquiv = e.toPartialEquiv.restr s 
goal: (e.restr s).toPartialEquiv = e.restr s

full_name: PartialHomeomorph.restr_eq_of_source_subset
code: theorem restr_eq_of_source_subset {e : PartialHomeomorph X Y} {s : Set X} (h : e.source ⊆ s) :
    e.restr s = e 
goal: e.restr s = e

full_name: PartialHomeomorph.restr_univ
code: @[simp, mfld_simps]
theorem restr_univ {e : PartialHomeomorph X Y} : e.restr univ = e 
goal: e.restr Set.univ = e

full_name: PartialHomeomorph.restr_source_inter
code: theorem restr_source_inter (s : Set X) : e.restr (e.source ∩ s) = e.restr s 
goal: e.restr (e.source ∩ s) = e.restr s

full_name: PartialHomeomorph.refl
code: /-- The identity on the whole space as a partial homeomorphism. -/
@[simps! (config := mfld_cfg) apply, simps! (config := .lemmasOnly) source target]
protected def refl (X : Type*) [TopologicalSpace X] : PartialHomeomorph X X 
goal: PartialHomeomorph X X

full_name: PartialHomeomorph.refl_source
code: /-- The identity on the whole space as a partial homeomorphism. -/
@[simps! (config := mfld_cfg) apply, simps! (config := .lemmasOnly) source target]
protected def refl (X : Type*) [TopologicalSpace X] : PartialHomeomorph X X 
goal: (PartialHomeomorph.refl X).source = Set.univ

full_name: PartialHomeomorph.refl_target
code: /-- The identity on the whole space as a partial homeomorphism. -/
@[simps! (config := mfld_cfg) apply, simps! (config := .lemmasOnly) source target]
protected def refl (X : Type*) [TopologicalSpace X] : PartialHomeomorph X X 
goal: (PartialHomeomorph.refl X).target = Set.univ

full_name: PartialHomeomorph.refl_apply
code: /-- The identity on the whole space as a partial homeomorphism. -/
@[simps! (config := mfld_cfg) apply, simps! (config := .lemmasOnly) source target]
protected def refl (X : Type*) [TopologicalSpace X] : PartialHomeomorph X X 
goal: ↑(PartialHomeomorph.refl X) = id

full_name: PartialHomeomorph.refl_partialEquiv
code: @[simp, mfld_simps]
theorem refl_partialEquiv : (PartialHomeomorph.refl X).toPartialEquiv = PartialEquiv.refl X 
goal: (PartialHomeomorph.refl X).toPartialEquiv = PartialEquiv.refl X

full_name: PartialHomeomorph.refl_symm
code: @[simp, mfld_simps]
theorem refl_symm : (PartialHomeomorph.refl X).symm = PartialHomeomorph.refl X 
goal: (PartialHomeomorph.refl X).symm = PartialHomeomorph.refl X

full_name: PartialHomeomorph.ofSet_source
code: /-- The identity partial equivalence on a set `s` -/
@[simps! (config := mfld_cfg) apply, simps! (config := .lemmasOnly) source target]
def ofSet (s : Set X) (hs : IsOpen s) : PartialHomeomorph X X 
goal: (PartialHomeomorph.ofSet s hs).source = s

full_name: PartialHomeomorph.ofSet
code: /-- The identity partial equivalence on a set `s` -/
@[simps! (config := mfld_cfg) apply, simps! (config := .lemmasOnly) source target]
def ofSet (s : Set X) (hs : IsOpen s) : PartialHomeomorph X X 
goal: PartialHomeomorph X X

full_name: PartialHomeomorph.ofSet_target
code: /-- The identity partial equivalence on a set `s` -/
@[simps! (config := mfld_cfg) apply, simps! (config := .lemmasOnly) source target]
def ofSet (s : Set X) (hs : IsOpen s) : PartialHomeomorph X X 
goal: (PartialHomeomorph.ofSet s hs).target = s

full_name: PartialHomeomorph.ofSet_apply
code: /-- The identity partial equivalence on a set `s` -/
@[simps! (config := mfld_cfg) apply, simps! (config := .lemmasOnly) source target]
def ofSet (s : Set X) (hs : IsOpen s) : PartialHomeomorph X X 
goal: ↑(PartialHomeomorph.ofSet s hs) = id

full_name: PartialHomeomorph.ofSet_toPartialEquiv
code: @[simp, mfld_simps]
theorem ofSet_toPartialEquiv : (ofSet s hs).toPartialEquiv = PartialEquiv.ofSet s 
goal: (PartialHomeomorph.ofSet s hs).toPartialEquiv = PartialEquiv.ofSet s

full_name: PartialHomeomorph.ofSet_symm
code: @[simp, mfld_simps]
theorem ofSet_symm : (ofSet s hs).symm = ofSet s hs 
goal: (PartialHomeomorph.ofSet s hs).symm = PartialHomeomorph.ofSet s hs

full_name: PartialHomeomorph.ofSet_univ_eq_refl
code: @[simp, mfld_simps]
theorem ofSet_univ_eq_refl : ofSet univ isOpen_univ = PartialHomeomorph.refl X 
goal: PartialHomeomorph.ofSet Set.univ ⋯ = PartialHomeomorph.refl X

full_name: PartialHomeomorph.trans'_source
code: /-- Composition of two partial homeomorphisms when the target of the first and the source of
the second coincide. -/
@[simps! apply symm_apply toPartialEquiv, simps! (config := .lemmasOnly) source target]
protected def trans' (h : e.target = e'.source) : PartialHomeomorph X Z 
goal: (e.trans' e' h).source = e.source

full_name: PartialHomeomorph.trans'_target
code: /-- Composition of two partial homeomorphisms when the target of the first and the source of
the second coincide. -/
@[simps! apply symm_apply toPartialEquiv, simps! (config := .lemmasOnly) source target]
protected def trans' (h : e.target = e'.source) : PartialHomeomorph X Z 
goal: (e.trans' e' h).target = e'.target

full_name: PartialHomeomorph.trans'
code: /-- Composition of two partial homeomorphisms when the target of the first and the source of
the second coincide. -/
@[simps! apply symm_apply toPartialEquiv, simps! (config := .lemmasOnly) source target]
protected def trans' (h : e.target = e'.source) : PartialHomeomorph X Z 
goal: PartialHomeomorph X Z

full_name: PartialHomeomorph.trans'_apply
code: /-- Composition of two partial homeomorphisms when the target of the first and the source of
the second coincide. -/
@[simps! apply symm_apply toPartialEquiv, simps! (config := .lemmasOnly) source target]
protected def trans' (h : e.target = e'.source) : PartialHomeomorph X Z 
goal: ∀ (a : X), ↑(e.trans' e' h) a = ↑e' (↑e a)

full_name: PartialHomeomorph.trans'_toPartialEquiv
code: /-- Composition of two partial homeomorphisms when the target of the first and the source of
the second coincide. -/
@[simps! apply symm_apply toPartialEquiv, simps! (config := .lemmasOnly) source target]
protected def trans' (h : e.target = e'.source) : PartialHomeomorph X Z 
goal: (e.trans' e' h).toPartialEquiv = e.trans' e'.toPartialEquiv h

full_name: PartialHomeomorph.trans'_symm_apply
code: /-- Composition of two partial homeomorphisms when the target of the first and the source of
the second coincide. -/
@[simps! apply symm_apply toPartialEquiv, simps! (config := .lemmasOnly) source target]
protected def trans' (h : e.target = e'.source) : PartialHomeomorph X Z 
goal: ∀ (a : Z), ↑(e.trans' e' h).symm a = ↑e.symm (↑e'.symm a)

full_name: PartialHomeomorph.trans
code: /-- Composing two partial homeomorphisms, by restricting to the maximal domain where their
composition is well defined. -/
@[trans]
protected def trans : PartialHomeomorph X Z 
goal: PartialHomeomorph X Z

full_name: PartialHomeomorph.trans_toPartialEquiv
code: @[simp, mfld_simps]
theorem trans_toPartialEquiv :
    (e.trans e').toPartialEquiv = e.toPartialEquiv.trans e'.toPartialEquiv 
goal: (e.trans e').toPartialEquiv = e.trans e'.toPartialEquiv

full_name: PartialHomeomorph.coe_trans
code: @[simp, mfld_simps]
theorem coe_trans : (e.trans e' : X → Z) = e' ∘ e 
goal: ↑(e.trans e') = ↑e' ∘ ↑e

full_name: PartialHomeomorph.coe_trans_symm
code: @[simp, mfld_simps]
theorem coe_trans_symm : ((e.trans e').symm : Z → X) = e.symm ∘ e'.symm 
goal: ↑(e.trans e').symm = ↑e.symm ∘ ↑e'.symm

full_name: PartialHomeomorph.trans_apply
code: theorem trans_apply {x : X} : (e.trans e') x = e' (e x) 
goal: ↑(e.trans e') x = ↑e' (↑e x)

full_name: PartialHomeomorph.trans_symm_eq_symm_trans_symm
code: theorem trans_symm_eq_symm_trans_symm : (e.trans e').symm = e'.symm.trans e.symm 
goal: (e.trans e').symm = e'.symm.trans e.symm

full_name: PartialHomeomorph.trans_source
code: theorem trans_source : (e.trans e').source = e.source ∩ e ⁻¹' e'.source 
goal: (e.trans e').source = e.source ∩ ↑e ⁻¹' e'.source

full_name: PartialHomeomorph.trans_source'
code: theorem trans_source' : (e.trans e').source = e.source ∩ e ⁻¹' (e.target ∩ e'.source) 
goal: (e.trans e').source = e.source ∩ ↑e ⁻¹' (e.target ∩ e'.source)

full_name: PartialHomeomorph.trans_source''
code: theorem trans_source'' : (e.trans e').source = e.symm '' (e.target ∩ e'.source) 
goal: (e.trans e').source = ↑e.symm '' (e.target ∩ e'.source)

full_name: PartialHomeomorph.image_trans_source
code: theorem image_trans_source : e '' (e.trans e').source = e.target ∩ e'.source 
goal: ↑e '' (e.trans e').source = e.target ∩ e'.source

full_name: PartialHomeomorph.trans_target
code: theorem trans_target : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' e.target 
goal: (e.trans e').target = e'.target ∩ ↑e'.symm ⁻¹' e.target

full_name: PartialHomeomorph.trans_target'
code: theorem trans_target' : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' (e'.source ∩ e.target) 
goal: (e.trans e').target = e'.target ∩ ↑e'.symm ⁻¹' (e'.source ∩ e.target)

full_name: PartialHomeomorph.trans_target''
code: theorem trans_target'' : (e.trans e').target = e' '' (e'.source ∩ e.target) 
goal: (e.trans e').target = ↑e' '' (e'.source ∩ e.target)

full_name: PartialHomeomorph.inv_image_trans_target
code: theorem inv_image_trans_target : e'.symm '' (e.trans e').target = e'.source ∩ e.target 
goal: ↑e'.symm '' (e.trans e').target = e'.source ∩ e.target

full_name: PartialHomeomorph.trans_assoc
code: theorem trans_assoc (e'' : PartialHomeomorph Z Z') :
    (e.trans e').trans e'' = e.trans (e'.trans e'') 
goal: (e.trans e').trans e'' = e.trans (e'.trans e'')

full_name: PartialHomeomorph.trans_refl
code: @[simp, mfld_simps]
theorem trans_refl : e.trans (PartialHomeomorph.refl Y) = e 
goal: e.trans (PartialHomeomorph.refl Y) = e

full_name: PartialHomeomorph.refl_trans
code: @[simp, mfld_simps]
theorem refl_trans : (PartialHomeomorph.refl X).trans e = e 
goal: (PartialHomeomorph.refl X).trans e = e

full_name: PartialHomeomorph.trans_ofSet
code: theorem trans_ofSet {s : Set Y} (hs : IsOpen s) : e.trans (ofSet s hs) = e.restr (e ⁻¹' s) 
goal: e.trans (PartialHomeomorph.ofSet s hs) = e.restr (↑e ⁻¹' s)

full_name: PartialHomeomorph.trans_of_set'
code: theorem trans_of_set' {s : Set Y} (hs : IsOpen s) :
    e.trans (ofSet s hs) = e.restr (e.source ∩ e ⁻¹' s) 
goal: e.trans (PartialHomeomorph.ofSet s hs) = e.restr (e.source ∩ ↑e ⁻¹' s)

full_name: PartialHomeomorph.ofSet_trans
code: theorem ofSet_trans {s : Set X} (hs : IsOpen s) : (ofSet s hs).trans e = e.restr s 
goal: (PartialHomeomorph.ofSet s hs).trans e = e.restr s

full_name: PartialHomeomorph.ofSet_trans'
code: theorem ofSet_trans' {s : Set X} (hs : IsOpen s) :
    (ofSet s hs).trans e = e.restr (e.source ∩ s) 
goal: (PartialHomeomorph.ofSet s hs).trans e = e.restr (e.source ∩ s)

full_name: PartialHomeomorph.ofSet_trans_ofSet
code: @[simp, mfld_simps]
theorem ofSet_trans_ofSet {s : Set X} (hs : IsOpen s) {s' : Set X} (hs' : IsOpen s') :
    (ofSet s hs).trans (ofSet s' hs') = ofSet (s ∩ s') (IsOpen.inter hs hs') 
goal: (PartialHomeomorph.ofSet s hs).trans (PartialHomeomorph.ofSet s' hs') = PartialHomeomorph.ofSet (s ∩ s') ⋯

full_name: PartialHomeomorph.restr_trans
code: theorem restr_trans (s : Set X) : (e.restr s).trans e' = (e.trans e').restr s 
goal: (e.restr s).trans e' = (e.trans e').restr s

full_name: PartialHomeomorph.EqOnSource
code: /-- `EqOnSource e e'` means that `e` and `e'` have the same source, and coincide there. They
should really be considered the same partial equivalence. -/
def EqOnSource (e e' : PartialHomeomorph X Y) : Prop 
goal: Prop

full_name: PartialHomeomorph.eqOnSource_iff
code: theorem eqOnSource_iff (e e' : PartialHomeomorph X Y) :
    EqOnSource e e' ↔ PartialEquiv.EqOnSource e.toPartialEquiv e'.toPartialEquiv 
goal: e.EqOnSource e' ↔ e.EqOnSource e'.toPartialEquiv

full_name: PartialHomeomorph.eqOnSourceSetoid
code: /-- `EqOnSource` is an equivalence relation. -/
instance eqOnSourceSetoid : Setoid (PartialHomeomorph X Y) 
goal: Setoid (PartialHomeomorph X Y)

full_name: PartialHomeomorph.eqOnSource_refl
code: theorem eqOnSource_refl : e ≈ e 
goal: e ≈ e

full_name: PartialHomeomorph.EqOnSource.symm'
code: /-- If two partial homeomorphisms are equivalent, so are their inverses. -/
theorem EqOnSource.symm' {e e' : PartialHomeomorph X Y} (h : e ≈ e') : e.symm ≈ e'.symm 
goal: e.symm ≈ e'.symm

full_name: PartialHomeomorph.EqOnSource.source_eq
code: /-- Two equivalent partial homeomorphisms have the same source. -/
theorem EqOnSource.source_eq {e e' : PartialHomeomorph X Y} (h : e ≈ e') : e.source = e'.source 
goal: e.source = e'.source

full_name: PartialHomeomorph.EqOnSource.target_eq
code: /-- Two equivalent partial homeomorphisms have the same target. -/
theorem EqOnSource.target_eq {e e' : PartialHomeomorph X Y} (h : e ≈ e') : e.target = e'.target 
goal: e.target = e'.target

full_name: PartialHomeomorph.EqOnSource.eqOn
code: /-- Two equivalent partial homeomorphisms have coinciding `toFun` on the source -/
theorem EqOnSource.eqOn {e e' : PartialHomeomorph X Y} (h : e ≈ e') : EqOn e e' e.source 
goal: Set.EqOn (↑e) (↑e') e.source

full_name: PartialHomeomorph.EqOnSource.symm_eqOn_target
code: /-- Two equivalent partial homeomorphisms have coinciding `invFun` on the target -/
theorem EqOnSource.symm_eqOn_target {e e' : PartialHomeomorph X Y} (h : e ≈ e') :
    EqOn e.symm e'.symm e.target 
goal: Set.EqOn (↑e.symm) (↑e'.symm) e.target

full_name: PartialHomeomorph.EqOnSource.trans'
code: /-- Composition of partial homeomorphisms respects equivalence. -/
theorem EqOnSource.trans' {e e' : PartialHomeomorph X Y} {f f' : PartialHomeomorph Y Z}
    (he : e ≈ e') (hf : f ≈ f') : e.trans f ≈ e'.trans f' 
goal: e.trans f ≈ e'.trans f'

full_name: PartialHomeomorph.EqOnSource.restr
code: /-- Restriction of partial homeomorphisms respects equivalence -/
theorem EqOnSource.restr {e e' : PartialHomeomorph X Y} (he : e ≈ e') (s : Set X) :
    e.restr s ≈ e'.restr s 
goal: e.restr s ≈ e'.restr s

full_name: PartialHomeomorph.Set.EqOn.restr_eqOn_source
code: /-- Two equivalent partial homeomorphisms are equal when the source and target are `univ`. -/
theorem Set.EqOn.restr_eqOn_source {e e' : PartialHomeomorph X Y}
    (h : EqOn e e' (e.source ∩ e'.source)) : e.restr e'.source ≈ e'.restr e.source 
goal: e.restr e'.source ≈ e'.restr e.source

full_name: PartialHomeomorph.self_trans_symm
code: /-- Composition of a partial homeomorphism and its inverse is equivalent to the restriction of the
identity to the source -/
theorem self_trans_symm : e.trans e.symm ≈ PartialHomeomorph.ofSet e.source e.open_source 
goal: e.trans e.symm ≈ PartialHomeomorph.ofSet e.source ⋯

full_name: PartialHomeomorph.symm_trans_self
code: theorem symm_trans_self : e.symm.trans e ≈ PartialHomeomorph.ofSet e.target e.open_target 
goal: e.symm.trans e ≈ PartialHomeomorph.ofSet e.target ⋯

full_name: PartialHomeomorph.eq_of_eqOnSource_univ
code: theorem eq_of_eqOnSource_univ {e e' : PartialHomeomorph X Y} (h : e ≈ e') (s : e.source = univ)
    (t : e.target = univ) : e = e' 
goal: e = e'

full_name: PartialHomeomorph.prod
code: /-- The product of two partial homeomorphisms, as a partial homeomorphism on the product space. -/
@[simps! (config := mfld_cfg) toPartialEquiv apply,
  simps! (config := .lemmasOnly) source target symm_apply]
def prod (eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') :
    PartialHomeomorph (X × Y) (X' × Y') 
goal: PartialHomeomorph (X × Y) (X' × Y')

full_name: PartialHomeomorph.prod_source
code: /-- The product of two partial homeomorphisms, as a partial homeomorphism on the product space. -/
@[simps! (config := mfld_cfg) toPartialEquiv apply,
  simps! (config := .lemmasOnly) source target symm_apply]
def prod (eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') :
    PartialHomeomorph (X × Y) (X' × Y') 
goal: (eX.prod eY).source = eX.source ×ˢ eY.source

full_name: PartialHomeomorph.prod_symm_apply
code: /-- The product of two partial homeomorphisms, as a partial homeomorphism on the product space. -/
@[simps! (config := mfld_cfg) toPartialEquiv apply,
  simps! (config := .lemmasOnly) source target symm_apply]
def prod (eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') :
    PartialHomeomorph (X × Y) (X' × Y') 
goal: ↑(eX.prod eY).symm p = (↑eX.symm p.1, ↑eY.symm p.2)

full_name: PartialHomeomorph.prod_target
code: /-- The product of two partial homeomorphisms, as a partial homeomorphism on the product space. -/
@[simps! (config := mfld_cfg) toPartialEquiv apply,
  simps! (config := .lemmasOnly) source target symm_apply]
def prod (eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') :
    PartialHomeomorph (X × Y) (X' × Y') 
goal: (eX.prod eY).target = eX.target ×ˢ eY.target

full_name: PartialHomeomorph.prod_apply
code: /-- The product of two partial homeomorphisms, as a partial homeomorphism on the product space. -/
@[simps! (config := mfld_cfg) toPartialEquiv apply,
  simps! (config := .lemmasOnly) source target symm_apply]
def prod (eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') :
    PartialHomeomorph (X × Y) (X' × Y') 
goal: ↑(eX.prod eY) = fun p => (↑eX p.1, ↑eY p.2)

full_name: PartialHomeomorph.prod_toPartialEquiv
code: /-- The product of two partial homeomorphisms, as a partial homeomorphism on the product space. -/
@[simps! (config := mfld_cfg) toPartialEquiv apply,
  simps! (config := .lemmasOnly) source target symm_apply]
def prod (eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') :
    PartialHomeomorph (X × Y) (X' × Y') 
goal: (eX.prod eY).toPartialEquiv = eX.prod eY.toPartialEquiv

full_name: PartialHomeomorph.prod_symm
code: @[simp, mfld_simps]
theorem prod_symm (eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') :
    (eX.prod eY).symm = eX.symm.prod eY.symm 
goal: (eX.prod eY).symm = eX.symm.prod eY.symm

full_name: PartialHomeomorph.refl_prod_refl
code: @[simp]
theorem refl_prod_refl :
    (PartialHomeomorph.refl X).prod (PartialHomeomorph.refl Y) = PartialHomeomorph.refl (X × Y) 
goal: (PartialHomeomorph.refl X).prod (PartialHomeomorph.refl Y) = PartialHomeomorph.refl (X × Y)

full_name: PartialHomeomorph.prod_trans
code: @[simp, mfld_simps]
theorem prod_trans (e : PartialHomeomorph X Y) (f : PartialHomeomorph Y Z)
    (e' : PartialHomeomorph X' Y') (f' : PartialHomeomorph Y' Z') :
    (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f') 
goal: (e.prod e').trans (f.prod f') = (e.trans f).prod (e'.trans f')

full_name: PartialHomeomorph.prod_eq_prod_of_nonempty
code: theorem prod_eq_prod_of_nonempty {eX eX' : PartialHomeomorph X X'} {eY eY' : PartialHomeomorph Y Y'}
    (h : (eX.prod eY).source.Nonempty) : eX.prod eY = eX'.prod eY' ↔ eX = eX' ∧ eY = eY' 
goal: eX.prod eY = eX'.prod eY' ↔ eX = eX' ∧ eY = eY'

full_name: PartialHomeomorph.prod_eq_prod_of_nonempty'
code: theorem prod_eq_prod_of_nonempty'
    {eX eX' : PartialHomeomorph X X'} {eY eY' : PartialHomeomorph Y Y'}
    (h : (eX'.prod eY').source.Nonempty) : eX.prod eY = eX'.prod eY' ↔ eX = eX' ∧ eY = eY' 
goal: eX.prod eY = eX'.prod eY' ↔ eX = eX' ∧ eY = eY'

full_name: PartialHomeomorph.pi_toPartialEquiv
code: /-- The product of a finite family of `PartialHomeomorph`s. -/
@[simps toPartialEquiv]
def pi : PartialHomeomorph (∀ i, X i) (∀ i, Y i) 
goal: (PartialHomeomorph.pi ei).toPartialEquiv = PartialEquiv.pi fun i => (ei i).toPartialEquiv

full_name: PartialHomeomorph.pi
code: /-- The product of a finite family of `PartialHomeomorph`s. -/
@[simps toPartialEquiv]
def pi : PartialHomeomorph (∀ i, X i) (∀ i, Y i) 
goal: PartialHomeomorph ((i : ι) → X i) ((i : ι) → Y i)

full_name: PartialHomeomorph.piecewise_toPartialEquiv
code: /-- Combine two `PartialHomeomorph`s using `Set.piecewise`. The source of the new
`PartialHomeomorph` is `s.ite e.source e'.source = e.source ∩ s ∪ e'.source \ s`, and similarly for
target.  The function sends `e.source ∩ s` to `e.target ∩ t` using `e` and
`e'.source \ s` to `e'.target \ t` using `e'`, and similarly for the inverse function.
To ensure the maps `toFun` and `invFun` are inverse of each other on the new `source` and `target`,
the definition assumes that the sets `s` and `t` are related both by `e.is_image` and `e'.is_image`.
To ensure that the new maps are continuous on `source`/`target`, it also assumes that `e.source` and
`e'.source` meet `frontier s` on the same set and `e x = e' x` on this intersection. -/
@[simps! (config := .asFn) toPartialEquiv apply]
def piecewise (e e' : PartialHomeomorph X Y) (s : Set X) (t : Set Y) [∀ x, Decidable (x ∈ s)]
    [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t)
    (Hs : e.source ∩ frontier s = e'.source ∩ frontier s)
    (Heq : EqOn e e' (e.source ∩ frontier s)) : PartialHomeomorph X Y 
goal: (e.piecewise e' s t H H' Hs Heq).toPartialEquiv = e.piecewise e'.toPartialEquiv s t H H'

full_name: PartialHomeomorph.piecewise
code: /-- Combine two `PartialHomeomorph`s using `Set.piecewise`. The source of the new
`PartialHomeomorph` is `s.ite e.source e'.source = e.source ∩ s ∪ e'.source \ s`, and similarly for
target.  The function sends `e.source ∩ s` to `e.target ∩ t` using `e` and
`e'.source \ s` to `e'.target \ t` using `e'`, and similarly for the inverse function.
To ensure the maps `toFun` and `invFun` are inverse of each other on the new `source` and `target`,
the definition assumes that the sets `s` and `t` are related both by `e.is_image` and `e'.is_image`.
To ensure that the new maps are continuous on `source`/`target`, it also assumes that `e.source` and
`e'.source` meet `frontier s` on the same set and `e x = e' x` on this intersection. -/
@[simps! (config := .asFn) toPartialEquiv apply]
def piecewise (e e' : PartialHomeomorph X Y) (s : Set X) (t : Set Y) [∀ x, Decidable (x ∈ s)]
    [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t)
    (Hs : e.source ∩ frontier s = e'.source ∩ frontier s)
    (Heq : EqOn e e' (e.source ∩ frontier s)) : PartialHomeomorph X Y 
goal: PartialHomeomorph X Y

full_name: PartialHomeomorph.piecewise_apply
code: /-- Combine two `PartialHomeomorph`s using `Set.piecewise`. The source of the new
`PartialHomeomorph` is `s.ite e.source e'.source = e.source ∩ s ∪ e'.source \ s`, and similarly for
target.  The function sends `e.source ∩ s` to `e.target ∩ t` using `e` and
`e'.source \ s` to `e'.target \ t` using `e'`, and similarly for the inverse function.
To ensure the maps `toFun` and `invFun` are inverse of each other on the new `source` and `target`,
the definition assumes that the sets `s` and `t` are related both by `e.is_image` and `e'.is_image`.
To ensure that the new maps are continuous on `source`/`target`, it also assumes that `e.source` and
`e'.source` meet `frontier s` on the same set and `e x = e' x` on this intersection. -/
@[simps! (config := .asFn) toPartialEquiv apply]
def piecewise (e e' : PartialHomeomorph X Y) (s : Set X) (t : Set Y) [∀ x, Decidable (x ∈ s)]
    [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t)
    (Hs : e.source ∩ frontier s = e'.source ∩ frontier s)
    (Heq : EqOn e e' (e.source ∩ frontier s)) : PartialHomeomorph X Y 
goal: ↑(e.piecewise e' s t H H' Hs Heq) = s.piecewise ↑e ↑e'

full_name: PartialHomeomorph.symm_piecewise
code: @[simp]
theorem symm_piecewise (e e' : PartialHomeomorph X Y) {s : Set X} {t : Set Y}
    [∀ x, Decidable (x ∈ s)] [∀ y, Decidable (y ∈ t)] (H : e.IsImage s t) (H' : e'.IsImage s t)
    (Hs : e.source ∩ frontier s = e'.source ∩ frontier s)
    (Heq : EqOn e e' (e.source ∩ frontier s)) :
    (e.piecewise e' s t H H' Hs Heq).symm =
      e.symm.piecewise e'.symm t s H.symm H'.symm
        (H.frontier.inter_eq_of_inter_eq_of_eqOn H'.frontier Hs Heq)
        (H.frontier.symm_eqOn_of_inter_eq_of_eqOn Hs Heq) 
goal: (e.piecewise e' s t H H' Hs Heq).symm = e.symm.piecewise e'.symm t s ⋯ ⋯ ⋯ ⋯

full_name: PartialHomeomorph.disjointUnion
code: /-- Combine two `PartialHomeomorph`s with disjoint sources and disjoint targets. We reuse
`PartialHomeomorph.piecewise` then override `toPartialEquiv` to `PartialEquiv.disjointUnion`.
This way we have better definitional equalities for `source` and `target`. -/
def disjointUnion (e e' : PartialHomeomorph X Y) [∀ x, Decidable (x ∈ e.source)]
    [∀ y, Decidable (y ∈ e.target)] (Hs : Disjoint e.source e'.source)
    (Ht : Disjoint e.target e'.target) : PartialHomeomorph X Y 
goal: PartialHomeomorph X Y

full_name: PartialHomeomorph.continuousWithinAt_iff_continuousWithinAt_comp_right
code: /-- Continuity within a set at a point can be read under right composition with a local
homeomorphism, if the point is in its target -/
theorem continuousWithinAt_iff_continuousWithinAt_comp_right {f : Y → Z} {s : Set Y} {x : Y}
    (h : x ∈ e.target) :
    ContinuousWithinAt f s x ↔ ContinuousWithinAt (f ∘ e) (e ⁻¹' s) (e.symm x) 
goal: ContinuousWithinAt f s x ↔ ContinuousWithinAt (f ∘ ↑e) (↑e ⁻¹' s) (↑e.symm x)

full_name: PartialHomeomorph.continuousAt_iff_continuousAt_comp_right
code: /-- Continuity at a point can be read under right composition with a partial homeomorphism, if the
point is in its target -/
theorem continuousAt_iff_continuousAt_comp_right {f : Y → Z} {x : Y} (h : x ∈ e.target) :
    ContinuousAt f x ↔ ContinuousAt (f ∘ e) (e.symm x) 
goal: ContinuousAt f x ↔ ContinuousAt (f ∘ ↑e) (↑e.symm x)

full_name: PartialHomeomorph.continuousOn_iff_continuousOn_comp_right
code: /-- A function is continuous on a set if and only if its composition with a partial homeomorphism
on the right is continuous on the corresponding set. -/
theorem continuousOn_iff_continuousOn_comp_right {f : Y → Z} {s : Set Y} (h : s ⊆ e.target) :
    ContinuousOn f s ↔ ContinuousOn (f ∘ e) (e.source ∩ e ⁻¹' s) 
goal: ContinuousOn f s ↔ ContinuousOn (f ∘ ↑e) (e.source ∩ ↑e ⁻¹' s)

full_name: PartialHomeomorph.continuousWithinAt_iff_continuousWithinAt_comp_left
code: /-- Continuity within a set at a point can be read under left composition with a local
homeomorphism if a neighborhood of the initial point is sent to the source of the local
homeomorphism-/
theorem continuousWithinAt_iff_continuousWithinAt_comp_left {f : Z → X} {s : Set Z} {x : Z}
    (hx : f x ∈ e.source) (h : f ⁻¹' e.source ∈ 𝓝[s] x) :
    ContinuousWithinAt f s x ↔ ContinuousWithinAt (e ∘ f) s x 
goal: ContinuousWithinAt f s x ↔ ContinuousWithinAt (↑e ∘ f) s x

full_name: PartialHomeomorph.continuousAt_iff_continuousAt_comp_left
code: /-- Continuity at a point can be read under left composition with a partial homeomorphism if a
neighborhood of the initial point is sent to the source of the partial homeomorphism-/
theorem continuousAt_iff_continuousAt_comp_left {f : Z → X} {x : Z} (h : f ⁻¹' e.source ∈ 𝓝 x) :
    ContinuousAt f x ↔ ContinuousAt (e ∘ f) x 
goal: ContinuousAt f x ↔ ContinuousAt (↑e ∘ f) x

full_name: PartialHomeomorph.continuousOn_iff_continuousOn_comp_left
code: /-- A function is continuous on a set if and only if its composition with a partial homeomorphism
on the left is continuous on the corresponding set. -/
theorem continuousOn_iff_continuousOn_comp_left {f : Z → X} {s : Set Z} (h : s ⊆ f ⁻¹' e.source) :
    ContinuousOn f s ↔ ContinuousOn (e ∘ f) s 
goal: ContinuousOn f s ↔ ContinuousOn (↑e ∘ f) s

full_name: PartialHomeomorph.continuous_iff_continuous_comp_left
code: /-- A function is continuous if and only if its composition with a partial homeomorphism
on the left is continuous and its image is contained in the source. -/
theorem continuous_iff_continuous_comp_left {f : Z → X} (h : f ⁻¹' e.source = univ) :
    Continuous f ↔ Continuous (e ∘ f) 
goal: Continuous f ↔ Continuous (↑e ∘ f)

full_name: PartialHomeomorph.homeomorphOfImageSubsetSource_symm_apply
code: /-- The homeomorphism obtained by restricting a `PartialHomeomorph` to a subset of the source. -/
@[simps]
def homeomorphOfImageSubsetSource {s : Set X} {t : Set Y} (hs : s ⊆ e.source) (ht : e '' s = t) :
    s ≃ₜ t 
goal: ∀ (a : ↑t), (e.homeomorphOfImageSubsetSource hs ht).symm a = Set.MapsTo.restrict (↑e.symm) t s ⋯ a

full_name: PartialHomeomorph.homeomorphOfImageSubsetSource
code: /-- The homeomorphism obtained by restricting a `PartialHomeomorph` to a subset of the source. -/
@[simps]
def homeomorphOfImageSubsetSource {s : Set X} {t : Set Y} (hs : s ⊆ e.source) (ht : e '' s = t) :
    s ≃ₜ t 
goal: ↑s ≃ₜ ↑t

full_name: PartialHomeomorph.homeomorphOfImageSubsetSource_apply
code: /-- The homeomorphism obtained by restricting a `PartialHomeomorph` to a subset of the source. -/
@[simps]
def homeomorphOfImageSubsetSource {s : Set X} {t : Set Y} (hs : s ⊆ e.source) (ht : e '' s = t) :
    s ≃ₜ t 
goal: ∀ (a : ↑s), (e.homeomorphOfImageSubsetSource hs ht) a = Set.MapsTo.restrict (↑e) s t ⋯ a

full_name: PartialHomeomorph.toHomeomorphSourceTarget
code: /-- A partial homeomorphism defines a homeomorphism between its source and target. -/
@[simps!] -- Porting note: new `simps`
def toHomeomorphSourceTarget : e.source ≃ₜ e.target 
goal: ↑e.source ≃ₜ ↑e.target

full_name: PartialHomeomorph.toHomeomorphSourceTarget_symm_apply_coe
code: /-- A partial homeomorphism defines a homeomorphism between its source and target. -/
@[simps!] -- Porting note: new `simps`
def toHomeomorphSourceTarget : e.source ≃ₜ e.target 
goal: ∀ (a : ↑e.target), ↑(e.toHomeomorphSourceTarget.symm a) = ↑e.symm ↑a

full_name: PartialHomeomorph.toHomeomorphSourceTarget_apply_coe
code: /-- A partial homeomorphism defines a homeomorphism between its source and target. -/
@[simps!] -- Porting note: new `simps`
def toHomeomorphSourceTarget : e.source ≃ₜ e.target 
goal: ∀ (a : ↑e.source), ↑(e.toHomeomorphSourceTarget a) = ↑e ↑a

full_name: PartialHomeomorph.secondCountableTopology_source
code: theorem secondCountableTopology_source [SecondCountableTopology Y] :
    SecondCountableTopology e.source 
goal: SecondCountableTopology ↑e.source

full_name: PartialHomeomorph.nhds_eq_comap_inf_principal
code: theorem nhds_eq_comap_inf_principal {x} (hx : x ∈ e.source) :
    𝓝 x = comap e (𝓝 (e x)) ⊓ 𝓟 e.source 
goal: 𝓝 x = Filter.comap (↑e) (𝓝 (↑e x)) ⊓ 𝓟 e.source

full_name: PartialHomeomorph.toHomeomorphOfSourceEqUnivTargetEqUniv_apply
code: /-- If a partial homeomorphism has source and target equal to univ, then it induces a homeomorphism
between the whole spaces, expressed in this definition. -/
@[simps (config := mfld_cfg) apply symm_apply]
-- Porting note (#11215): TODO: add a `PartialEquiv` version
def toHomeomorphOfSourceEqUnivTargetEqUniv (h : e.source = (univ : Set X)) (h' : e.target = univ) :
    X ≃ₜ Y 
goal: ⇑(e.toHomeomorphOfSourceEqUnivTargetEqUniv h h') = ↑e

full_name: PartialHomeomorph.toHomeomorphOfSourceEqUnivTargetEqUniv_symm_apply
code: /-- If a partial homeomorphism has source and target equal to univ, then it induces a homeomorphism
between the whole spaces, expressed in this definition. -/
@[simps (config := mfld_cfg) apply symm_apply]
-- Porting note (#11215): TODO: add a `PartialEquiv` version
def toHomeomorphOfSourceEqUnivTargetEqUniv (h : e.source = (univ : Set X)) (h' : e.target = univ) :
    X ≃ₜ Y 
goal: ⇑(e.toHomeomorphOfSourceEqUnivTargetEqUniv h h').symm = ↑e.symm

full_name: PartialHomeomorph.toHomeomorphOfSourceEqUnivTargetEqUniv
code: /-- If a partial homeomorphism has source and target equal to univ, then it induces a homeomorphism
between the whole spaces, expressed in this definition. -/
@[simps (config := mfld_cfg) apply symm_apply]
-- Porting note (#11215): TODO: add a `PartialEquiv` version
def toHomeomorphOfSourceEqUnivTargetEqUniv (h : e.source = (univ : Set X)) (h' : e.target = univ) :
    X ≃ₜ Y 
goal: X ≃ₜ Y

full_name: PartialHomeomorph.openEmbedding_restrict
code: theorem openEmbedding_restrict : OpenEmbedding (e.source.restrict e) 
goal: OpenEmbedding (e.source.restrict ↑e)

full_name: PartialHomeomorph.to_openEmbedding
code: /-- A partial homeomorphism whose source is all of `X` defines an open embedding of `X` into `Y`.
The converse is also true; see `OpenEmbedding.toPartialHomeomorph`. -/
theorem to_openEmbedding (h : e.source = Set.univ) : OpenEmbedding e 
goal: OpenEmbedding ↑e

full_name: Homeomorph.refl_toPartialHomeomorph
code: @[simp, mfld_simps]
theorem refl_toPartialHomeomorph :
    (Homeomorph.refl X).toPartialHomeomorph = PartialHomeomorph.refl X 
goal: (Homeomorph.refl X).toPartialHomeomorph = PartialHomeomorph.refl X

full_name: Homeomorph.symm_toPartialHomeomorph
code: @[simp, mfld_simps]
theorem symm_toPartialHomeomorph : e.symm.toPartialHomeomorph = e.toPartialHomeomorph.symm 
goal: e.symm.toPartialHomeomorph = e.toPartialHomeomorph.symm

full_name: Homeomorph.trans_toPartialHomeomorph
code: @[simp, mfld_simps]
theorem trans_toPartialHomeomorph :
    (e.trans e').toPartialHomeomorph = e.toPartialHomeomorph.trans e'.toPartialHomeomorph 
goal: (e.trans e').toPartialHomeomorph = e.toPartialHomeomorph.trans e'.toPartialHomeomorph

full_name: Homeomorph.transPartialHomeomorph_target
code: /-- Precompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transPartialHomeomorph (e : X ≃ₜ Y) (f' : PartialHomeomorph Y Z) : PartialHomeomorph X Z 
goal: (e.transPartialHomeomorph f').target = f'.target

full_name: Homeomorph.transPartialHomeomorph_source
code: /-- Precompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transPartialHomeomorph (e : X ≃ₜ Y) (f' : PartialHomeomorph Y Z) : PartialHomeomorph X Z 
goal: (e.transPartialHomeomorph f').source = ⇑e ⁻¹' f'.source

full_name: Homeomorph.transPartialHomeomorph_apply
code: /-- Precompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transPartialHomeomorph (e : X ≃ₜ Y) (f' : PartialHomeomorph Y Z) : PartialHomeomorph X Z 
goal: ↑(e.transPartialHomeomorph f') = ↑f' ∘ ⇑e

full_name: Homeomorph.transPartialHomeomorph
code: /-- Precompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transPartialHomeomorph (e : X ≃ₜ Y) (f' : PartialHomeomorph Y Z) : PartialHomeomorph X Z 
goal: PartialHomeomorph X Z

full_name: Homeomorph.transPartialHomeomorph_symm_apply
code: /-- Precompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transPartialHomeomorph (e : X ≃ₜ Y) (f' : PartialHomeomorph Y Z) : PartialHomeomorph X Z 
goal: ↑(e.transPartialHomeomorph f').symm = ⇑e.symm ∘ ↑f'.symm

full_name: Homeomorph.transPartialHomeomorph_eq_trans
code: theorem transPartialHomeomorph_eq_trans (e : X ≃ₜ Y) (f' : PartialHomeomorph Y Z) :
    e.transPartialHomeomorph f' = e.toPartialHomeomorph.trans f' 
goal: e.transPartialHomeomorph f' = e.toPartialHomeomorph.trans f'

full_name: Homeomorph.transPartialHomeomorph_trans
code: @[simp, mfld_simps]
theorem transPartialHomeomorph_trans (e : X ≃ₜ Y) (f : PartialHomeomorph Y Z)
    (f' : PartialHomeomorph Z Z') :
    (e.transPartialHomeomorph f).trans f' = e.transPartialHomeomorph (f.trans f') 
goal: (e.transPartialHomeomorph f).trans f' = e.transPartialHomeomorph (f.trans f')

full_name: Homeomorph.trans_transPartialHomeomorph
code: @[simp, mfld_simps]
theorem trans_transPartialHomeomorph (e : X ≃ₜ Y) (e' : Y ≃ₜ Z) (f'' : PartialHomeomorph Z Z') :
    (e.trans e').transPartialHomeomorph f'' =
      e.transPartialHomeomorph (e'.transPartialHomeomorph f'') 
goal: (e.trans e').transPartialHomeomorph f'' = e.transPartialHomeomorph (e'.transPartialHomeomorph f'')

full_name: OpenEmbedding.toPartialHomeomorph_source
code: /-- An open embedding of `X` into `Y`, with `X` nonempty, defines a partial homeomorphism
whose source is all of `X`. The converse is also true; see `PartialHomeomorph.to_openEmbedding`. -/
@[simps! (config := mfld_cfg) apply source target]
noncomputable def toPartialHomeomorph [Nonempty X] : PartialHomeomorph X Y 
goal: (OpenEmbedding.toPartialHomeomorph f h).source = Set.univ

full_name: OpenEmbedding.toPartialHomeomorph_apply
code: /-- An open embedding of `X` into `Y`, with `X` nonempty, defines a partial homeomorphism
whose source is all of `X`. The converse is also true; see `PartialHomeomorph.to_openEmbedding`. -/
@[simps! (config := mfld_cfg) apply source target]
noncomputable def toPartialHomeomorph [Nonempty X] : PartialHomeomorph X Y 
goal: ↑(OpenEmbedding.toPartialHomeomorph f h) = f

full_name: OpenEmbedding.toPartialHomeomorph_target
code: /-- An open embedding of `X` into `Y`, with `X` nonempty, defines a partial homeomorphism
whose source is all of `X`. The converse is also true; see `PartialHomeomorph.to_openEmbedding`. -/
@[simps! (config := mfld_cfg) apply source target]
noncomputable def toPartialHomeomorph [Nonempty X] : PartialHomeomorph X Y 
goal: (OpenEmbedding.toPartialHomeomorph f h).target = Set.range f

full_name: OpenEmbedding.toPartialHomeomorph
code: /-- An open embedding of `X` into `Y`, with `X` nonempty, defines a partial homeomorphism
whose source is all of `X`. The converse is also true; see `PartialHomeomorph.to_openEmbedding`. -/
@[simps! (config := mfld_cfg) apply source target]
noncomputable def toPartialHomeomorph [Nonempty X] : PartialHomeomorph X Y 
goal: PartialHomeomorph X Y

full_name: OpenEmbedding.toPartialHomeomorph_left_inv
code: lemma toPartialHomeomorph_left_inv {x : X} : (h.toPartialHomeomorph f).symm (f x) = x 
goal: ↑(OpenEmbedding.toPartialHomeomorph f h).symm (f x) = x

full_name: OpenEmbedding.toPartialHomeomorph_right_inv
code: lemma toPartialHomeomorph_right_inv {x : Y} (hx : x ∈ Set.range f) :
    f ((h.toPartialHomeomorph f).symm x) = x 
goal: f (↑(OpenEmbedding.toPartialHomeomorph f h).symm x) = x

full_name: TopologicalSpace.Opens.partialHomeomorphSubtypeCoe
code: /-- The inclusion of an open subset `s` of a space `X` into `X` is a partial homeomorphism from the
subtype `s` to `X`. -/
noncomputable def partialHomeomorphSubtypeCoe : PartialHomeomorph s X 
goal: PartialHomeomorph (↥s) X

full_name: TopologicalSpace.Opens.partialHomeomorphSubtypeCoe_coe
code: @[simp, mfld_simps]
theorem partialHomeomorphSubtypeCoe_coe : (s.partialHomeomorphSubtypeCoe hs : s → X) = (↑) 
goal: ↑(s.partialHomeomorphSubtypeCoe hs) = Subtype.val

full_name: TopologicalSpace.Opens.partialHomeomorphSubtypeCoe_source
code: @[simp, mfld_simps]
theorem partialHomeomorphSubtypeCoe_source : (s.partialHomeomorphSubtypeCoe hs).source = Set.univ 
goal: (s.partialHomeomorphSubtypeCoe hs).source = Set.univ

full_name: TopologicalSpace.Opens.partialHomeomorphSubtypeCoe_target
code: @[simp, mfld_simps]
theorem partialHomeomorphSubtypeCoe_target : (s.partialHomeomorphSubtypeCoe hs).target = s 
goal: (s.partialHomeomorphSubtypeCoe hs).target = ↑s

full_name: PartialHomeomorph.transHomeomorph_symm_apply
code: /-- Postcompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transHomeomorph (e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) : PartialHomeomorph X Z 
goal: ↑(e.transHomeomorph f').symm = ↑e.symm ∘ ⇑f'.symm

full_name: PartialHomeomorph.transHomeomorph
code: /-- Postcompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transHomeomorph (e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) : PartialHomeomorph X Z 
goal: PartialHomeomorph X Z

full_name: PartialHomeomorph.transHomeomorph_apply
code: /-- Postcompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transHomeomorph (e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) : PartialHomeomorph X Z 
goal: ↑(e.transHomeomorph f') = ⇑f' ∘ ↑e

full_name: PartialHomeomorph.transHomeomorph_target
code: /-- Postcompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transHomeomorph (e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) : PartialHomeomorph X Z 
goal: (e.transHomeomorph f').target = ⇑f'.symm ⁻¹' e.target

full_name: PartialHomeomorph.transHomeomorph_source
code: /-- Postcompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! (config := .asFn)]
def transHomeomorph (e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) : PartialHomeomorph X Z 
goal: (e.transHomeomorph f').source = e.source

full_name: PartialHomeomorph.transHomeomorph_eq_trans
code: theorem transHomeomorph_eq_trans (e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) :
    e.transHomeomorph f' = e.trans f'.toPartialHomeomorph 
goal: e.transHomeomorph f' = e.trans f'.toPartialHomeomorph

full_name: PartialHomeomorph.transHomeomorph_transHomeomorph
code: @[simp, mfld_simps]
theorem transHomeomorph_transHomeomorph (e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) (f'' : Z ≃ₜ Z') :
    (e.transHomeomorph f').transHomeomorph f'' = e.transHomeomorph (f'.trans f'') 
goal: (e.transHomeomorph f').transHomeomorph f'' = e.transHomeomorph (f'.trans f'')

full_name: PartialHomeomorph.trans_transHomeomorph
code: @[simp, mfld_simps]
theorem trans_transHomeomorph (e : PartialHomeomorph X Y) (e' : PartialHomeomorph Y Z)
    (f'' : Z ≃ₜ Z') :
    (e.trans e').transHomeomorph f'' = e.trans (e'.transHomeomorph f'') 
goal: (e.trans e').transHomeomorph f'' = e.trans (e'.transHomeomorph f'')

full_name: PartialHomeomorph.subtypeRestr
code: /-- The restriction of a partial homeomorphism `e` to an open subset `s` of the domain type
produces a partial homeomorphism whose domain is the subtype `s`. -/
noncomputable def subtypeRestr : PartialHomeomorph s Y 
goal: PartialHomeomorph (↥s) Y

full_name: PartialHomeomorph.subtypeRestr_def
code: theorem subtypeRestr_def : e.subtypeRestr hs = (s.partialHomeomorphSubtypeCoe hs).trans e 
goal: e.subtypeRestr hs = (s.partialHomeomorphSubtypeCoe hs).trans e

full_name: PartialHomeomorph.subtypeRestr_coe
code: @[simp, mfld_simps]
theorem subtypeRestr_coe :
    ((e.subtypeRestr hs : PartialHomeomorph s Y) : s → Y) = Set.restrict ↑s (e : X → Y) 
goal: ↑(e.subtypeRestr hs) = (↑s).restrict ↑e

full_name: PartialHomeomorph.subtypeRestr_source
code: @[simp, mfld_simps]
theorem subtypeRestr_source : (e.subtypeRestr hs).source = (↑) ⁻¹' e.source 
goal: (e.subtypeRestr hs).source = Subtype.val ⁻¹' e.source

full_name: PartialHomeomorph.map_subtype_source
code: theorem map_subtype_source {x : s} (hxe : (x : X) ∈ e.source) :
    e x ∈ (e.subtypeRestr hs).target 
goal: ↑e ↑x ∈ (e.subtypeRestr hs).target

full_name: PartialHomeomorph.subtypeRestr_symm_trans_subtypeRestr
code: /-- This lemma characterizes the transition functions of an open subset in terms of the transition
functions of the original space. -/
theorem subtypeRestr_symm_trans_subtypeRestr (f f' : PartialHomeomorph X Y) :
    (f.subtypeRestr hs).symm.trans (f'.subtypeRestr hs) ≈
      (f.symm.trans f').restr (f.target ∩ f.symm ⁻¹' s) 
goal: (f.subtypeRestr hs).symm.trans (f'.subtypeRestr hs) ≈ (f.symm.trans f').restr (f.target ∩ ↑f.symm ⁻¹' ↑s)

full_name: PartialHomeomorph.subtypeRestr_symm_eqOn
code: theorem subtypeRestr_symm_eqOn {U : Opens X} (hU : Nonempty U) :
    EqOn e.symm (Subtype.val ∘ (e.subtypeRestr hU).symm) (e.subtypeRestr hU).target 
goal: Set.EqOn (↑e.symm) (Subtype.val ∘ ↑(e.subtypeRestr hU).symm) (e.subtypeRestr hU).target

full_name: PartialHomeomorph.subtypeRestr_symm_eqOn_of_le
code: theorem subtypeRestr_symm_eqOn_of_le {U V : Opens X} (hU : Nonempty U) (hV : Nonempty V)
    (hUV : U ≤ V) : EqOn (e.subtypeRestr hV).symm (Set.inclusion hUV ∘ (e.subtypeRestr hU).symm)
      (e.subtypeRestr hU).target 
goal: Set.EqOn (↑(e.subtypeRestr hV).symm) (Set.inclusion hUV ∘ ↑(e.subtypeRestr hU).symm) (e.subtypeRestr hU).target